-
-
We used a Raspberry Pi 2 Model B
-
-
-
This project uses Python 2.7
-
-
- Breadboard
- LEDs (We used Red, Yellow, Green)
- Resistors (220 Ohms)
- Female to Male wires to go from GPIO to breadboard
There are two different versions to get pin numbers and you have to specify which one you're using. Below are pictures of the two ways you can use. Click here for more information
-
Run the command from the terminal in your workspace:
git clone https://github.com/flourtowel/LED-Web-Server.git
-
To run the Web Server do the following commands:
-
cd LED-Web-Server
-
sudo python LED_Webserver.py
-
-
Then from a different host (can be a laptop, desktop or phone) open a browser and in the address bar type:
http://192.168.1.10:5000
Note: You should run theifconfig
command in the terminal and use the correct IP Address for your Raspberry Pi in your local network.
The we ran the web server in the terminal:
The IP address below is the phone connecting to the web server:
This is what the web server interface looks like on an iPhone:
When you push the buttons on the phone you get the following messages in the terminal:
And the changes take place on the LEDs.