nanoFramework.Iot.Device.Max31865 1.2.952

Prefix Reserved
There is a newer prerelease version of this package available.
See the version list below for details.
dotnet add package nanoFramework.Iot.Device.Max31865 --version 1.2.952
                    
NuGet\Install-Package nanoFramework.Iot.Device.Max31865 -Version 1.2.952
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="nanoFramework.Iot.Device.Max31865" Version="1.2.952" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="nanoFramework.Iot.Device.Max31865" Version="1.2.952" />
                    
Directory.Packages.props
<PackageReference Include="nanoFramework.Iot.Device.Max31865" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add nanoFramework.Iot.Device.Max31865 --version 1.2.952
                    
#r "nuget: nanoFramework.Iot.Device.Max31865, 1.2.952"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package nanoFramework.Iot.Device.Max31865@1.2.952
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=nanoFramework.Iot.Device.Max31865&version=1.2.952
                    
Install as a Cake Addin
#tool nuget:?package=nanoFramework.Iot.Device.Max31865&version=1.2.952
                    
Install as a Cake Tool

MAX31865 - Resistance Temperature Detector Amplifier

The MAX31865 device is a SPI interface Resistance Temperature Detector to Digital Converter.

MAX31865

Documentation

Usage

Important: make sure you properly setup the SPI pins especially for ESP32 before creating the SpiDevice, make sure you install the nanoFramework.Hardware.ESP32 nuget:

//////////////////////////////////////////////////////////////////////
// when connecting to an ESP32 device, need to configure the SPI GPIOs
// used for the bus
Configuration.SetPinFunction(21, DeviceFunction.SPI1_MOSI);
Configuration.SetPinFunction(22, DeviceFunction.SPI1_MISO);
Configuration.SetPinFunction(23, DeviceFunction.SPI1_CLOCK);
// Make sure as well you are using the right chip select

For other devices like STM32, please make sure you're using the preset pins for the SPI bus you want to use. The chip select can as well be pre setup.

SpiConnectionSettings settings = new(1, 42)
{
    ClockFrequency = Max31865.SpiClockFrequency,
    Mode = Max31865.SpiMode1,
    DataFlow = Max31865.SpiDataFlow
};

using SpiDevice device = SpiDevice.Create(settings);
using Max31865 sensor = new(device, PlatinumResistanceThermometerType.PT1000, ResistanceTemperatureDetectorWires.ThreeWire, ElectricResistance.FromOhms(4300));

while (true)
{
    Debug.WriteLine($"Temperature: {sensor.Temperature.DegreesCelsius} ℃");

    // wait for 2000ms
    Thread.Sleep(2000);
}

Note: You can use any PT100 or PT1000 temperature sensor which has 2/3/4 wires.

Hardware Required

  • MAX31865
  • Male/Female Jumper Wires

Circuit

The following fritzing diagram illustrates one way to wire up the MAX31865 Resistance Temperature Detector to Digital Converter with a MCU

MCU circuit diagram

  • SDI - MOSI
  • SDO - MISO
  • CLK - SCLK
  • CS - CE0
  • VIN - 3V
  • GND - GND

Known limitations

This version only performs the one shot temperature conversion and not the continuous temperature conversion.

Product Compatible and additional computed target framework versions.
.NET Framework net is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
2.0.0-preview.16 30 3/10/2026
1.2.952 76 3/4/2026
1.2.931 290 11/10/2025
1.2.907 249 10/2/2025
1.2.889 232 7/28/2025
1.2.869 341 4/2/2025
1.2.864 297 4/2/2025
1.2.852 332 3/11/2025
1.2.846 319 3/10/2025
1.2.822 249 2/26/2025
1.2.775 286 2/4/2025
1.2.772 248 2/4/2025
1.2.755 251 1/31/2025
1.2.743 249 1/20/2025
1.2.737 227 1/13/2025
1.2.718 270 12/30/2024
1.2.704 239 12/18/2024
1.2.696 246 12/16/2024
1.2.673 250 10/23/2024
1.2.656 247 10/3/2024
Loading failed