Voting resources, early voting, and poll worker information - VOTE. ... Adafruit is open and shipping.
0

Max31856 and Adafruit Datalogger
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Max31856 and Adafruit Datalogger

by Hunterjo on Sat Apr 04, 2020 2:24 pm

Hi All,

I try to record temperature that iI read from a type K thermocouple with the MAX31856. I want to use the adafruit dataloggin shield and arduino uno rev3.
For now, I'm able to read temperature from the MAX31856.
I'm also able to see that my SD is working. I'm a bit confuse on how I should wire between the cataloguer and the MAX31856. I try to combine the code to record but dose not work.
Here are the error message that I get form the arduino IDE
Arduino:1.8.12 (Mac OS X), Carte : "Arduino Uno"

Datalogger:51:1: error: 'Serial' does not name a type
Serial.begin(115200);
^~~~~~
Datalogger:52:3: error: 'Serial' does not name a type
Serial.println("MAX31856 thermocouple test");
^~~~~~
Datalogger:54:3: error: 'maxthermo' does not name a type
maxthermo.begin();
^~~~~~~~~
Datalogger:56:3: error: 'maxthermo' does not name a type
maxthermo.setThermocoupleType(MAX31856_TCTYPE_K);
^~~~~~~~~
Datalogger:58:3: error: 'Serial' does not name a type
Serial.print("Thermocouple type: ");
^~~~~~
Datalogger:59:3: error: expected unqualified-id before 'switch'
switch (maxthermo.getThermocoupleType() ) {
^~~~~~
Datalogger:74:1: error: expected declaration before '}' token
}
^
exit status 1
'Serial' does not name a type

What should I try first to make it work?
Do you need more detail?

Thank you

Hunterjo
 
Posts: 1
Joined: Sat Apr 04, 2020 2:14 pm

Re: Max31856 and Adafruit Datalogger

by adafruit_support_carter on Mon Apr 06, 2020 12:20 pm

For now, I'm able to read temperature from the MAX31856.
I'm also able to see that my SD is working.


It sounds like you have both items working. Since the SD card and the MAX31856 are both SPI devices, you need to manage the chip select (CS) pin between both and make sure you are only talking to one a time.

However, your issue above appears to be more of a typo. Look for missing or extra }'s in your code.

adafruit_support_carter
 
Posts: 17282
Joined: Tue Nov 29, 2016 2:45 pm

Please be positive and constructive with your questions and comments.