Read temperature from RPI2 on Windows 10 IoT with MAX31865 failled

Romain THOMAS 6 Reputation points

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

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


Windows for IoT
Windows for IoT
A family of Microsoft operating systems designed for use in Internet of Things (IoT) devices.
381 questions
.NET Internet of things
.NET Internet of things
.NET: Microsoft Technologies based on the .NET software framework.Internet of things: A concept that aims to extend the benefits of the regular internet, including constant connectivity, remote control ability, and data sharing, to goods in the physical world.
28 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Romain THOMAS 6 Reputation points

    My bad

    I forgot to controle the CS pin

            controller = GpioController.GetDefault();
            var cs = controller.OpenPin(5, GpioSharingMode.Exclusive);
        public void writeRegister8(byte addr, byte data)
            Console.WriteLine($"Write at adress {addr}: {data}");
            addr |= 0x80; // make sure top bit is set
            addr &= 0xFF;
            byte[] buffer = { addr, data };
    1 person found this answer helpful.