PROGRAM 2 MAX31865 (PT100) IN ARDUINO

Good gtardes dear community, I am trying to connect 2 plates MAX31865 to an arduino UNO. I understand that each board must have its own assigned CS pin, however, I have problems to implement it. I have used the code of another user that I found on the internet, however, I can only see the reading of a pt100, but not the two pt100. I leave the code with which I am working, I hope you can help me.

#include <Adafruit_MAX31865.h>
#include <SPI.h>

[code]

#include <Adafruit_MAX31865.h>
#include <SPI.h>

// use hardware SPI, just pass in the CS pin
Adafruit_MAX31865 max_1 = Adafruit_MAX31865(5);
Adafruit_MAX31865 max_2 = Adafruit_MAX31865(9);
// The value of the Rref resistor. Use 430.0!
#define RREF 430.0


void setup() {
  Serial.begin(115200);
SPI.begin();
  max_1.begin(MAX31865_3WIRE);  // set to 2WIRE or 4WIRE as necessary
   max_2.begin(MAX31865_3WIRE);
}

void loop() {
  
  //TERMOPAR 1
  
  uint16_t rtd1 = max_1.readRTD();
  
  Serial.print("RTD value1: "); 
  Serial.println(rtd1);
  float ratio1 = rtd1;
  ratio1 /= 32768;
  Serial.print("Resistance1 = "); 
  Serial.println(RREF*ratio1,8);
  Serial.print("Temperature1 = "); 
  Serial.println(max_1.temperature(100, RREF));

  //TERMOPAR 2
  
  uint16_t rtd2 = max_2.readRTD();
  Serial.print("RTD value2: "); 
  Serial.println(rtd2);
  float ratio2 = rtd2;
  ratio2 /= 32768;
  Serial.print("Resistance2 = "); 
  Serial.println(RREF*ratio2,8);
  Serial.print("Temperature2 = ");
  Serial.println(max_2.temperature(100, RREF));

  // Check and print any faults

  //TERMOPAR 1
  
  //uint8_t fault1 = max_1.readFault();
  //if (fault1) {
   // Serial.print("Fault1 0x");
   // Serial.println(fault1, HEX);
  
  //if (fault1 & MAX31865_FAULT_HIGHTHRESH) {
   // Serial.println("RTD High Threshold");
//}
  //if (fault1 & MAX31865_FAULT_LOWTHRESH) {
   // Serial.println("RTD Low Threshold");
//}
  //if (fault1 & MAX31865_FAULT_REFINLOW) {
  //  Serial.println("REFIN- > 0.85 x Bias");
//}
  //if (fault1 & MAX31865_FAULT_REFINHIGH) {
   // Serial.println("REFIN- < 0.85 x Bias - FORCE- open");
//}
  //if (fault1 & MAX31865_FAULT_RTDINLOW) {
   // Serial.println("RTDIN- < 0.85 x Bias - FORCE- open");
//}
  //if (fault1 & MAX31865_FAULT_OVUV) {
   // Serial.println("Under/Over voltage");
//}
  //max_1.clearFault();
//}

  //TERMOPAR 2
  //uint8_t fault2 = max_2.readFault();
   //if (fault2) {
   // Serial.print("Fault2 0x");
   // Serial.println(fault2, HEX);
  
  //if (fault2 & MAX31865_FAULT_HIGHTHRESH) {
   // Serial.println("RTD High Threshold");
//}
  //if (fault2 & MAX31865_FAULT_LOWTHRESH) {
   // Serial.println("RTD Low Threshold");
//}
  //if (fault2 & MAX31865_FAULT_REFINLOW) {
   // Serial.println("REFIN- > 0.85 x Bias");
//}
  //if (fault2 & MAX31865_FAULT_REFINHIGH) {
   // Serial.println("REFIN- < 0.85 x Bias - FORCE- open");
//}
  //if (fault2 & MAX31865_FAULT_RTDINLOW) {
   // Serial.println("RTDIN- < 0.85 x Bias - FORCE- open");
//}
  //if (fault2 & MAX31865_FAULT_OVUV) {
   // Serial.println("Under/Over voltage");
//}
  //max_2.clearFault();
//}

  
  Serial.println();

  Serial.println(RREF*ratio1,8);

Printing a floating point value to 8 decimal places is unrealistic.

I do not understand what the problem is. The picture you posted (of text; do NOT do that again!) clearly shows different values from the two different devices.

Hi,

I also need to test 2 MAX31865 using Arduino and used your code. Same Serial Monitor output.

Has it got resolved? If so Can you please post your final code that would help me greatly.

Thanks..