corrected value code

I'm trying to set up two Max31865 boards and one of the boards is reading 8 deg different from the other. so I'm trying the implement the corecctedvalue code

CorrectedValue = (((RawValue – RawLow) * ReferenceRange) / RawRange) + ReferenceLow

I'm not sure how to implement it or what value to use for the Rawvalue in the code? I came up with this-
CorrectedValue = (((RawValue – -1.52) * 99.99) / 72) + 0.01 anyone able to help? Thank you,

void loop() {
  uint16_t rtd1 = thermo.readRTD();

  Serial.print("RTD value: "); Serial.println(rtd1);
  float ratio = rtd1;
  ratio /= 32768;
  
  Serial.print("Ratio = "); Serial.println(ratio, 8);
  Serial.print("Resistance = "); Serial.println(RREF * ratio, 8);
  Serial.print("Temperature = "); Serial.println(thermo.temperature(RNOMINAL, RREF) * 9 / 5 + 32);
 
  lcd.setCursor(0, 0);
  //lcd.print("Temperature = ");
  lcd.print("Deg.F= ");
  lcd.print(thermo.temperature(RNOMINAL, RREF) * 9 / 5 + 32);

8 degrees is a terrible error with precision RTDs. Why not fix the real problem?

If you wish to go that route, post the required details.

ok so must be something with the board? got any suggestions on what to look for?

Do you have a problem with posting the details of the sensors, the wiring and code, as described in the How to use this forum post?

You may want to give this a read:

What library and breakout board are you using?

Ron

here's the code I'm using. They are Max31865 boards. I've tried the code using a single board and the temp reading is the same so its definitely something with the board.

#include <Adafruit_MAX31865.h>
#include <Wire.h>
#include <LiquidCrystal_I2C.h>
#include <SPI.h>
// Define LCD pinout
const int  en = 2, rw = 1, rs = 0, d4 = 4, d5 = 5, d6 = 6, d7 = 7, bl = 3;

// Define I2C Address - change if reqiuired
const int i2c_addr = 0x27;

// DHT-22
//#define DHTPIN 7       // DHT-22 Output Pin connection
//#define DHTTYPE DHT11   // DHT Type is DHT 22 (AM2302)

// Define LCD display connections
LiquidCrystal_I2C lcd(i2c_addr, 16, 2);


// SPI.h: CS, DI, DO, CLK
Adafruit_MAX31865 thermo = Adafruit_MAX31865(10, 11, 12, 13);
Adafruit_MAX31865 thermo1 = Adafruit_MAX31865(9, 11, 12, 13);
// use hardware SPI, just pass in the CS pin
//Adafruit_MAX31865 thermo_1 = Adafruit_MAX31865(10);
//Adafruit_MAX31865 thermo_2 = Adafruit_MAX31865(9);

// The value of the Rref resistor. Use 430.0 for PT100 and 4300.0 for PT1000
#define RREF      430.0
// The 'nominal' 0-degrees-C resistance of the sensor
// 100.0 for PT100, 1000.0 for PT1000
#define RNOMINAL  100.0

void setup() {
  Serial.begin(115200);
  Serial.println("Adafruit MAX31865 PT100 Sensor Test!");
  lcd.init();
  // Set display type as 16 char, 2 rows
  lcd.begin(16, 2);
  lcd.backlight();

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


void loop() {
  uint16_t rtd1 = thermo.readRTD();

  Serial.print("RTD value: "); Serial.println(rtd1);
  float ratio = rtd1;
  ratio /= 32768;
  
  Serial.print("Ratio = "); Serial.println(ratio, 8);
  Serial.print("Resistance = "); Serial.println(RREF * ratio, 8);
  Serial.print("Temperature = "); Serial.println(thermo.temperature(RNOMINAL, RREF) * 9 / 5 + 32);
 
  lcd.setCursor(0, 0);
  //lcd.print("Temperature = ");
  lcd.print("Deg.F= ");
  lcd.print(thermo.temperature(RNOMINAL, RREF) * 9 / 5 + 32);
  
  uint16_t rtd2 = thermo1.readRTD();

  Serial.print("RTD value: "); Serial.println(rtd2);
  float ratio2 = rtd2;
  ratio2 /= 32768;
  Serial.print("Ratio2 = "); Serial.println(ratio2, 8);
  Serial.print("Resistance = "); Serial.println(RREF * ratio2, 8);
  Serial.print("Temperature = "); Serial.println(thermo1.temperature(RNOMINAL, RREF) * 9 / 5 + 32);
  lcd.setCursor(0, 3);
  //lcd.print("Temperature = ");
  lcd.print("Deg.F= ");
  lcd.print(thermo1.temperature(RNOMINAL, RREF) * 9 / 5 + 32);
 
  delay(1000);

Or the sensors. You forgot to post links to them, and a wiring diagram.

The photo doesn't tell us anything.