Board: Arduino UNO
Aim: do something by alarm scheduler
Current version features: a. show temperature b. electric ball Valve control (manual and alarm) c. turn on Relay (manual and alarm) Remember settings in EEPROM
- install platformio
- change COM port in platformio.ini file here
- run init.sh to download external libraries
- download NewLiquidCrystal library manual to ./library folder
- run run.sh to compile and upload sketch to arduino
- if #define LOGGING, you can see debug info reading COM port. run serial.sh
Valve has 3 pins(GND, open, close) by default 12V. But the power of Arduino is 5V. I invert power by solder and got PWR, open, close. Now I can use Transistor to move it. Arduino pins open Transistors and got GND on open or close pin.
Algorith:
- open pin turn on for 5 seconds (motor works).
- open pin turn off. Valve is open.
- enjoy
- closing pin turn on for 5 seconds (motor works).
- closing pin turn off. Valse is close.
- NewliquidCrystal - LCD 16x2 i2c display driver
- OneWire - 1-wire device support
- Arduino-Temperature-Control-Library - Dallas DS18B20 temperature sensor driver
- DS1307RTC - real time clock driver
- read/write EEPROM
- ArduinoMultiDesktop - easy 2 buttons change screen library
- ArduinoMenu - great library for print menu settings
- TimeAlarms - alarm library
- Time - needs to alarm library for time functions