examples/basic/leds_shell/README.md
The application leds_shell is a basic example, which allows easy, interactive
control of internal board LEDs, and basic GPIO for externally connected simple
devices (for e.g. additional LEDs, relay, motors - via dedicated drivers, etc.)
via the shell.
In particular, this example shows:
The following commands are available:
led: allows switching on/off or toggle internal board LEDs.gpio: allows initialization of GPIO port and set state to HIGH/LOW.help: default RIOT command, which shows available commands.BOARD=nativeleds_shell example application on the native target,
as Linux application:$ make all term
[...]
RIOT native interrupts/signals initialized.
RIOT native board initialized.
RIOT native hardware initialization complete.
main(): This is RIOT! (Version: 2021.07-devel-10893-gb2e97-example-leds_shell)
This board has 2 LEDs
>
> help
help
Command Description
---------------------------------------
gpio GPIO pin initialization and set port state HIGH/LOW
led Switch on/off or toggle on-board LEDs
native target has two virtual LEDs):> led 0 on
led 0 on
LED_RED_ON
> led 1 on
led 1 on
LED_GREEN_ON
BOARD=stm32f469i-discoleds_shell example application on sample board, for example
stm32f469i-disco target, which has 4 internal LEDs:$ make all BOARD=stm32f469i-disco flash term
[...]
main(): This is RIOT! (Version: 2021.07-devel-10894-g2ad22b9-example-leds_shell)
This board has 4 LEDs
> help
help
Command Description
---------------------------------------
gpio GPIO pin initialization and set port state HIGH/LOW
led Switch on/off or toggle on-board LEDs
led command and appropriate LED id.gpio init.gpio set and gpio clear.