I am an absolute beginner in programming and have a project to read a PT100 with an Arduino Uno and an adafruit Max31865. The error is still there and I cant find my mistake. I thought it is in the used signs and not a logical problem. Below you can find my reduced code. Thank you all for helping.
#include <Adafruit_MAX31865.h>
#include <LiquidCrystal_I2C.h>
#include <Wire.h> //Arduino Uno: SDA=A4, SCL=A5
#include <SPI.h>
#include <Adafruit_SPIDevice.h>
// The value of the Rref resistor. Use 430.0 for PT100 and 4300.0 for PT1000
#define RREF 430.0
#define RNOMINAL 100.0
LiquidCrystal_I2C lcd(0x27, 20,4); //Festlegung Art des Displays
// Use software SPI: CS, DI, DO, CLK
Adafruit_MAX31865 max = Adafruit_MAX31865(10, 11, 12, 13);
setup()
{
Serial.begin(115200);
Serial.println("Adafruit MAX31865 PT100 Sensor Test!");
max.begin(MAX31865_2WIRE);
lcd.init(); //Im Setup wird der LCD gestartet
lcd.backlight(); //Hintergrundbeleuchtung einschalten (lcd.noBacklight(); schaltet die Beleuchtung aus).
}
void PrintDisplay()
{
lcd.clear(); //erase previous content of display
lcd.setCursor(0, 0);
lcd.print("Temperature = ");
lcd.setCursor(0, 1);
lcd.print(max.temperature(RNOMINAL, RREF));
}
void loop()
{
PrintDisplay();
delay(1000);
}