#include "max6675.h" breaking SoftwareSerial

Breakout boards, sensors, other Adafruit kits, etc.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
EVRE
 
Posts: 59
Joined: Sat Feb 18, 2012 11:21 pm

#include "max6675.h" breaking SoftwareSerial

Post by EVRE »

using code and adding Software Serial as an example:
// this example is public domain. enjoy!
// www.ladyada.net/learn/sensors/thermocouple

#include "max6675.h"
#include <SoftwareSerial.h>
SoftwareSerial LCD1(0,12);

int thermoDO = 4;
int thermoCS = 5;
int thermoCLK = 6;

MAX6675 thermocouple(thermoCLK, thermoCS, thermoDO);
int vccPin = 3;
int gndPin = 2;

void setup() {
Serial.begin(9600);
// use Arduino pins
pinMode(vccPin, OUTPUT); digitalWrite(vccPin, HIGH);
pinMode(gndPin, OUTPUT); digitalWrite(gndPin, LOW);

Serial.println("MAX6675 test");
// wait for MAX chip to stabilize
delay(500);
}

void loop() {
// basic readout test, just print the current temp

Serial.print("C = ");
Serial.println(thermocouple.readCelsius());
Serial.print("F = ");
Serial.println(thermocouple.readFahrenheit());

delay(1000);
}
results in errors:
serialthermocouple.cpp.o: In function `__static_initialization_and_destruction_0':
C:\Users\TEVISC~1\AppData\Local\Temp\build3654529240356863777.tmp/serialthermocouple.cpp:9: undefined reference to `SoftwareSerial::SoftwareSerial(unsigned char, unsigned char, bool)'
C:\Users\TEVISC~1\AppData\Local\Temp\build3654529240356863777.tmp/serialthermocouple.cpp:9: undefined reference to `SoftwareSerial::~SoftwareSerial()'
This is a problem because my LCD display communicates via serial. =\

User avatar
adafruit_support_bill
 
Posts: 88142
Joined: Sat Feb 07, 2009 10:11 am

Re: #include "max6675.h" breaking SoftwareSerial

Post by adafruit_support_bill »

I was able to compile that with no problems. Perhaps you have a corrupted copy of SoftwareSerial. Try downloading a fresh install of the IDE.

Locked
Please be positive and constructive with your questions and comments.

Return to “Other Products from Adafruit”