Control Raspberry Pi LEDs from Web and Mobile

In this post, I’ll demonstrate controlling couple of LEDs connected to Raspberry Pi GPIO from Web. LEDs could be replaced with any devices so its a kind of basic IoT project too, so this core design can be extended to any scale and many devices can be controlled simultaneously. Programming is done in Python and for web interface I have used bottle framework.

Hardware Requirements
1 x Raspberry Pi
1 x Red LED
1 x Yellow LED
2 x Resistors (330 ohm)
1 x Breadboard
Few male-male Jumper wires (if used GPIO extensions)

Software Requirements
Python
RPi GPIO Library
Bottle Python Web Framework

To install bottle, run following command

pip install bottle

Below figure shows connections

RPi Connections
RPi Connections
Connections
Connections

Connections
Red LED is connected to GPIO18 thru 330ohm resistor and Yellow LED is connected to GPIO23

Remote control on Mobile would look like below

RPi Web Output
RPi Web Output

Source code is available on GitHub Raspberry Pi LEDs through Web

Comments
  1. Posted by Jesse Cooke
  2. Posted by mobile slot machines

Leave a Reply

Your email address will not be published.