Skip to content

Commit

Permalink
rename from confusing 'max' - no skip
Browse files Browse the repository at this point in the history
  • Loading branch information
ladyada committed Jan 3, 2020
1 parent ed03e2a commit cd3da3f
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
Empty file removed examples/max31865/.esp32.test.skip
Empty file.
Empty file.
14 changes: 7 additions & 7 deletions examples/max31865/max31865.ino
Expand Up @@ -17,9 +17,9 @@
#include <Adafruit_MAX31865.h>

// Use software SPI: CS, DI, DO, CLK
Adafruit_MAX31865 max = Adafruit_MAX31865(10, 11, 12, 13);
Adafruit_MAX31865 thermo = Adafruit_MAX31865(10, 11, 12, 13);
// use hardware SPI, just pass in the CS pin
//Adafruit_MAX31865 max = Adafruit_MAX31865(10);
//Adafruit_MAX31865 thermo = Adafruit_MAX31865(10);

// The value of the Rref resistor. Use 430.0 for PT100 and 4300.0 for PT1000
#define RREF 430.0
Expand All @@ -31,22 +31,22 @@ void setup() {
Serial.begin(115200);
Serial.println("Adafruit MAX31865 PT100 Sensor Test!");

max.begin(MAX31865_3WIRE); // set to 2WIRE or 4WIRE as necessary
thermo.begin(MAX31865_3WIRE); // set to 2WIRE or 4WIRE as necessary
}


void loop() {
uint16_t rtd = max.readRTD();
uint16_t rtd = thermo.readRTD();

Serial.print("RTD value: "); Serial.println(rtd);
float ratio = rtd;
ratio /= 32768;
Serial.print("Ratio = "); Serial.println(ratio,8);
Serial.print("Resistance = "); Serial.println(RREF*ratio,8);
Serial.print("Temperature = "); Serial.println(max.temperature(RNOMINAL, RREF));
Serial.print("Temperature = "); Serial.println(thermo.temperature(RNOMINAL, RREF));

// Check and print any faults
uint8_t fault = max.readFault();
uint8_t fault = thermo.readFault();
if (fault) {
Serial.print("Fault 0x"); Serial.println(fault, HEX);
if (fault & MAX31865_FAULT_HIGHTHRESH) {
Expand All @@ -67,7 +67,7 @@ void loop() {
if (fault & MAX31865_FAULT_OVUV) {
Serial.println("Under/Over voltage");
}
max.clearFault();
thermo.clearFault();
}
Serial.println();
delay(1000);
Expand Down

0 comments on commit cd3da3f

Please sign in to comment.