The LM75 is a temperature sensor, Delta-Sigma analog-to-digital converter, and digital over-temperature detector with I2C interface.
- LM75 datasheet
I2cConnectionSettings settings = new I2cConnectionSettings(1, Lm75.DefaultI2cAddress);
I2cDevice device = I2cDevice.Create(settings);
using(Lm75 sensor = new Lm75(device))
{
double temperature = sensor.Temperature.Celsius;
}
- SCL - SCL
- SDA - SDA
- VCC - 5V
- GND - GND
I2cConnectionSettings settings = new I2cConnectionSettings(1, Lm75.DefaultI2cAddress);
I2cDevice device = I2cDevice.Create(settings);
using(Lm75 sensor = new Lm75(device))
{
while (true)
{
Console.WriteLine($"Temperature: {sensor.Temperature.Celsius} ℃");
Console.WriteLine();
Thread.Sleep(1000);
}
}