Hello,
I have a Digital Loggers IoT Relay
(http://www.digital-loggers.com/iot.html) and I'm trying to use it to turn on a humidifier when the humidity drops below a certain level. I've got the LCD screen and DHT11 set up and working properly but I'm struggling to add the IoT relay in to it. Here is my code.
#include <dht.h>
#include <LiquidCrystal.h>
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);
dht DHT;
#define DHT11_PIN 7
//int iotRelay= 9; // LED connected to digital pin 13
void setup()
{
lcd.begin(16, 2);
// pinMode(iotRelay, OUTPUT); // sets the digital pin as output
}
void loop()
{
int chk = DHT.read11(DHT11_PIN);
lcd.setCursor(0,0);
lcd.print("Temp: ");
lcd.print(DHT.temperature);
lcd.setCursor(0,1);
lcd.print("Humidity: ");
lcd.print(DHT.humidity);
lcd.print("%");
delay(1000);
}
I've watched the tutorial Digital Loggers did and I can make the relay work for the Blink arduino project, but I can't figure out how to connect it and code it to work with my project. Any ideas are welcomed, thank you so much.