LED
The LED widget simulates an LED and it can be used as an indicator to present the status or amount of an input. As an example, you can use it to present the status of a switch or output value of a potentiometer attached to the Raspberry Pi.
You can add an LED widget onto your Blynk app with the Widget Box
by tapping LED
under DISPLAYS
. The LED widget costs 100
units of energy (see the following screenshot):
LED widget listed under DISPLAYS
Using virtual pins
The LED widget supports only virtual pins. Using a momentary push button with Raspberry Pi is a great way to learn how virtual pins work with inputs. In this example, you will see how the LED widget can be turned on and off according to the status of the momentary push button switch. Let's build the circuit using the following items:
- Momentary push button
- Breadboard
- Hookup wires
Build the circuit as shown in the following screenshot. Connect the push button between Raspberry Pi BCM_GPIO pin 23 (WiringPi pin 4) and the GND. If you want, you...