/*
Test program for splash controller.
Alex Pikkert
November 2020
Original design: https://photobuilds.co.uk/arduino-drop-controller/
this program shows the five button values on A1 on the serial monitor and
tests the three leds on D2, D3 and D11 and the LCD display.
*/

#include <Wire.h>
#include <LiquidCrystal_I2C.h>
#include <EEPROM.h>
LiquidCrystal_I2C lcd(0x27,16,2); 
int val;

void setup() {
  Serial.begin(9600); // open the serial port at 9600 bps:
  pinMode(A1,INPUT);
  pinMode(11,OUTPUT); digitalWrite(11,HIGH);
  pinMode(2,OUTPUT); digitalWrite(2,HIGH);
  pinMode(3,OUTPUT); digitalWrite(3,HIGH);

lcd.init();
  lcd.clear();
  lcd.backlight(); 
  lcd.setCursor(0,0);
  lcd.print("****************");
  lcd.setCursor(0,1);
  lcd.print("****************");
  delay(2000);

EEPROM.put(0,4);
for (int i=1; i<=8; i++) {EEPROM.put(i*2,55);}// write initial start values of 55 into EEPROM memory
}

void loop() {
  val=analogRead(A1);
  Serial.println(val);
  delay(700);
}
