A blinking LED, connected to the Raspberry Pi GPIO (General Purpose Input/Output Pins) controlled via Browser.
Functions: Start / Stop Blinking (Button), specify the blinking interval in ms (Input Field) and display LED status with blinking counter (Label).
Raspberry Pi, GPIO Extension Board, GPIO cable, Breadboard, 1 Resistor 330 ohm, 1 LED 3.3 V, several jumper wires.
Build the circuit (see also picture at the right)
The Pi GPIO is connected va a GPIO Extension Board (T-Cobbler) and GPIO cable to a Breadboard.
On the Breadboard, place the LED with a 330 ohm resistor in series with the GND (Physical Pin 6) and the GPIO18 Pin (Physical Pin 12, Pi4J GPIO1).
Create the Software
server application using the jPi4J Libary
(Raspberry Pi GPIO controller).
For detailed information about the project see Description below
or look up in project source.
Run the Experiment
On the Pi start the B4J-Bridge by login on as user Pi, open a terminal, go to folder /home/pi/b4j and run $sud0 java -jar b4-bridge.jar, note the MyIp address.
Open the B4J IDE and load bloinkingled.b4j, connect to the B4J-Bridge (Menu Tools > B4J Bridge > Connect > Enter IP address.
Run the application from the B4J IDE by pressing F5.
Open a Browser and enter as URL the Pi IP Address:port, like 192.168.0.57:51042.
Click the Switch Timer button and if all is well, the LED will start to blink.