Hello world! Today I wrote a simple code to control 4 relays with a keypad LCD shield for Arduino. You can add any device and the code is easy to modify. I used 1 lamp as a example device. The video displays dutch text on the LCD screen but the code I uploaded is in English, "apparaat" means device. Follow the next steps for the schematic, Code & Parts list.
Step 1: Parts list.
Just wire it up like the schematic, upload the code and it should work. If things don't work you probably don't have the library LiquidCrystal.h installed.
- Arduino Mega 2560, I used the RobotDyn Mega 2560
- 4 x 1 channel relay KY-019
- LCD shield with keypad. <- I bought a bunch of those. Shipping fast
- Jumper wires set MM/FF/MF
- Power cables + lamp sockets.(optional)