We are implementing temperature reading using PT100 (3 wires) and Raspberry 4 with .NET 6.
We are able to read the temperature using as reference this article.
SpiConnectionSettings settings = new(0, 0)
{
ClockFrequency = Max31865.SpiClockFrequency,
Mode = Max31865.SpiMode1,
DataFlow = Max31865.SpiDataFlow
};
using (SpiDevice device = SpiDevice.Create(settings))
{
using (Max31865 sensor = new(device, PlatinumResistanceThermometerType.Pt100, ResistanceTemperatureDetectorWires.ThreeWire, ElectricResistance.FromOhms(430)))
{
while (true)
{
Console.WriteLine(sensor.Faults.ToString());
Thread.Sleep(1000);
}
}
}
Actually to work the script need the CS pin of Max31865 connected to pin 12 of raspberry GPIO. We would like to connect more than one Max31865 in order to record some temperatures from different Pt100.
How we can specify the right/specific GPIO port in the C# script for every Max31865 CS output pin? Actually seems there are no properties to change that pin but this feature will permit us to read more than one sensor.