Raspberry Pi

The raspberry pi contains multiple files and scripts. It is also connected to the Arduino by a USB cable.

The web page file (index.html) is very simple and easy to use. It is composed of two buttons that can turn the LED lights on or off. It hosted on the raspberry pi using a python web framework called Flask. The website is accessible on port 80 of localhost.

The python web server script (arduino_web_server.py) receives input for the LED lights (ON or OFF) Using an other python script (arduino_serial_led.py), these inputs are then sent by serial communication to the Arduino Board.


Arduino

The Arduino contains a sketch to control the LED lights. It is also connected to them.

The sketch (arduino_led_serial.ino) receives input from the Raspberry Pi by serial communication. It then interprets it to control the LED lights. The led lights are on a breadboard. They form a circuit that is also composed of jumper wires and resistance.


Together, the Raspberry Pi and the Arduino make it possible to control the LED from a web page.