LED Bar (DS1101, DS1102, and WS1102)

The DS1101, DS1102, and WS1102 feature an LED bar comprised of five blue LEDs. The bar can be used for signal strength indication and other purposes.

Note: The green, red, and yellow status LEDs, which are present on all DS/WS110x devices, are described in the Status LEDs topic.


A diagram illustrating the LED bar of the DS1101/2 and WS1102.


DS1101 and DS1102

On these devices, each of the five LEDs is connected to a dedicated general-purpose I/O (GPIO) line of the CPU:

GPIO line

LED

PL_IO_NUM_23_SB5

LED5 (top, the strongest signal)

PL_IO_NUM_22_SB4

LED4

PL_IO_NUM_21_SB3

LED3

PL_IO_NUM_20_SB2

LED2

PL_IO_NUM_19_SB1

LED1 (bottom, "the lowest signal"

To turn an LED on, enable the corresponding I/O line (io.enabled = 1 — YES) and set this line LOW (io.state = 0 — LOW). Hint: these are properties of the io. object.


WS1102

On this wireless controller, the LEDs are controlled via Microchip's MCP23008 I/O expander IC. The I²C interface of this IC is connected to GPIO lines 5 and 6 of the WS1102's CPU, as shown in the diagram below.

A block diagram of the MCP23008 I/O expander IC.

Use the ssi. object to communicate with the MCP23008.

To turn an LED on, configure the corresponding line of the IC as an output and set it LOW. Refer to the MCP23008 datasheet for information on how to achieve this.

Please also see the Serial-over-IP (SoI) Application on GitHub.


LED Bar (DS1101, DS1102, and WS1102)

DS1101 and DS1102

WS1102