/*
***********************
Pump Shed Test Code
***********************
*/
#include <Wire.h>
#include <LiquidCrystal_I2C.h>
#include <TimeLib.h>
byte relayStatus[5] = {0, 0, 0, 0, 0};
// Reboot & Relay status (0=OFF or REBOOTED, 1=ON or ACTIVE)
// 0 = Reboot (Rebooted or Active)
// 1=Relay 1 (Pump)
// 2=Relay 2 (unused / spare)
// 3=Relay 3 (Sandhill)
// 4=Relay 4 (Flats)
byte relayPins[5] = {0, 2, 7, 8, 10}; // relayPins[0] not used
// Arduino pins...
// D2 for Relay1
// D7 for Relay2
// D8 for Relay3
// D10 for Relay4
LiquidCrystal_I2C lcd(0x27, 20, 4);
// set the LCD address to 0x27 for a 20 chars and 4 line display
void setup(){ // *******************************************************************
Serial.begin(9600);
// Set the pin modes
for(int i = 1; i < 5; i++){ // relayPins[0] not used
pinMode(relayPins[i], OUTPUT);
}
// Write all the pins to LOW (0 / OFF)
for(int i = 1; i < 5; i++){ // relayPins[0] not used
digitalWrite(relayPins[i], LOW);
}
// Setup the LCD display
lcd.init();
lcd.backlight();
lcd.setCursor(0, 0);
lcd.print("45.2C Time: 21:59:59");
lcd.setCursor(0, 1);
lcd.print("Start Time: 22:00:00");
lcd.setCursor(0, 2);
lcd.print("Cycles(min): 120/144");
lcd.setCursor(0, 3);
lcd.print("R1-OFF R3-OFF R4-OFF");
// lcd.clear();
}
void loop(){ // *******************************************************************
delay(500);
digitalWrite(2, HIGH);
delay(500);
digitalWrite(2, LOW);
}