SHT 31 + arrduino + LED signaling diode. has anyone tried to do so that by reading the temperature and humidity from the sensor, the Led diode lights up at a certain temperature?
Almost certainly.
1 Like
Please, read:
#include "Wire.h"
#include "SHT31.h"
#define LED_BUILTIN 13
#define SHT31_ADDRESS 0x44
SHT31 sht;
void setup()
{
pinMode(LED_BUILTIN, OUTPUT);
}
void loop()
{
if (sht.getTemperature() > 25)
digitalWrite(LED_BUILTIN, HIGH);
else
digitalWrite(LED_BUILTIN, LOW);
delay(2000);
}
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.