question

RomainTHOMAS avatar image
0 Votes"
RomainTHOMAS asked michaelxu-msft edited

Read temperature from RPI2 on Windows 10 IoT with MAX31865 failled

Hello,
I am trying to read the temperature on a PI2 with Windows 10 IoT but I always have 0 as returned value for MAX31865_CONFIG_REG or MAX31865_RTDMSB_REG

The sample in python works fine with Raspian
https://learn.adafruit.com/adafruit-max31865-rtd-pt100-amplifier/python-circuitpython

I tryed with .Net5 and UWP but I have the same result

Did someone already succeed in reading the temperature ?
Could you share your experience please ?

Thank you for your help

Romain

windows-iot-10coredotnet-iot
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

RomainTHOMAS avatar image
1 Vote"
RomainTHOMAS answered michaelxu-msft edited

My bad

I forgot to controle the CS pin

         controller = GpioController.GetDefault();
         var cs = controller.OpenPin(5, GpioSharingMode.Exclusive);
         cs.SetDriveMode(GpioPinDriveMode.Output);
         cs.Write(GpioPinValue.High);


     public void writeRegister8(byte addr, byte data)
     {
         cs.Write(GpioPinValue.Low);

         Console.WriteLine($"Write at adress {addr}: {data}");

         addr |= 0x80; // make sure top bit is set
         addr &= 0xFF;

         byte[] buffer = { addr, data };
         spi_dev.Write(buffer);

         cs.Write(GpioPinValue.High);
     }
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

@RomainTHOMAS-6075 , so this issue was fixed now? Please feel free let me know if there is any other issue.

0 Votes 0 ·