LED Bar Control
|Top Previous Next|
Five blue LEDs form an LED bar. They are intended primarily for the indication of the RF signal strength (i.e. of the Wi-Fi signal). These LEDs are controlled through three GPIO lines 46, 47, and 48.
GPIO46 is the reset line of the LED bar. Clearing this line sets all five outputs LOW and this turns all LEDs ON. GPIO47 is a clock line- a positive (LOW-to-HIGH) transition on this line "shifts in" the data on the data line. The LED control circuit is shown below.
If you want to switch an LED ON then set the corresponding data line LOW. In the following example we set the LEDs like this:
Assuming all the LEDs were off previously (shown in gray), these are our steps. Each step represents one cycle of the clock line (HIGH-LOW-HIGH):
The reset line is not really necessary. You can be certain what pattern is displayed by the LEDs for as long as you generate five clock cycles every time you send new data into this circuit.
Here is our library code for controlling the LED bar: