Arduino Power – DLI IoT Power Relay

The IoT Relay from Digital Loggers Inc allows to easily and safely control standard american powered appliances such as fans, dehumidifiers, pumps and such.

It is important to realize how the 4 power ports work. One is Always ON. One is Normally ON, and the other Two are Normally OFF. When the signal is sent the Normally ON, turns OFF and the Normally OFF ports turn ON.

Parts:

Basic Analog Temperature Project:

#define sensorPin A5
#define powerPin 7

void setup() {

  pinMode(powerPin, OUTPUT);
  Serial.begin(9600);
}

void loop() {

  int reading = analogRead(sensorPin);
  float voltage = reading * 5.0;
  voltage /= 1024.0;
  float temperatureC = (voltage - 0.5) * 100 ;
  float temperatureF = (temperatureC * 9.0 / 5.0) + 32.0;

  Serial.println(temperatureF);

  if (temperatureF > 80){
    digitalWrite(powerPin, HIGH);  
  } else {
    digitalWrite(powerPin, LOW);
  }

  delay(1000);
}

Be the first to comment

Leave a Reply