This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
products:sbc:common:applications:gpio:led [2022/07/12 04:58] nick |
products:sbc:common:applications:gpio:led [2023/07/07 03:36] ivan [VIM1/2/3/3L] |
||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ~~tag> | ||
====== LED ====== | ====== LED ====== | ||
===== Introduction ===== | ===== Introduction ===== | ||
+ | /* | ||
+ | This page mainly describes the onboard LEDs and leads you to control the LEDs. | ||
+ | */ | ||
+ | This page introduces the usage of Onboard LED indicators under Linux, and leads you to control the LEDs. | ||
- | This document mainly describes the onboard LEDs. You will learn how to control the LEDs. | + | ===== Device LED configurations ===== |
- | ===== LED Nodes ===== | + | ^ Device |
+ | ^ VIM1/ | ||
+ | ^ VIM3/ | ||
+ | | ::: | ||
+ | ^ VIM1S/ | ||
+ | ^ Edge1 | ||
+ | | ::: | ||
+ | ^ Edge2 | ||
+ | | ::: | ||
+ | | ::: | ||
- | <tabbox VIM1/2> | ||
- | |||
- | VIM1/VIM2 has only one node. | ||
- | |||
- | <code shell> | ||
- | $ ls / | ||
- | sys_led | ||
- | </ | ||
- | |||
- | <tabbox VIM3/3L> | ||
- | |||
- | VIM3/VIM3L has two nodes. | ||
- | |||
- | <code shell> | ||
- | ls / | ||
- | red_led | ||
- | </ | ||
- | |||
- | <tabbox VIM4> | ||
- | |||
- | VIM4 has only one node which is a PWM LED. | ||
- | |||
- | <code shell> | ||
- | $ ls / | ||
- | pwmled | ||
- | </ | ||
- | <tabbox Edge1> | ||
- | |||
- | Edge1 has two nodes. | ||
- | |||
- | ```shell | ||
- | $ ls / | ||
- | read_led | ||
- | ``` | ||
- | <tabbox Edge2> | ||
- | |||
- | </ | ||
===== Setup LED ===== | ===== Setup LED ===== | ||
Line 49: | Line 26: | ||
<tabbox VIM1/ | <tabbox VIM1/ | ||
- | We will use '' | + | We will take '' |
**Turn off** | **Turn off** | ||
- | Set the LED node parameter to none to turn off the LED: | + | Set the LED node parameter to '' |
- | < | + | ```shell |
$ echo none | sudo tee / | $ echo none | sudo tee / | ||
- | </ | + | ``` |
**Turn on** | **Turn on** | ||
- | Set the LED node parameter to default-on to keep the LED permanently on: | + | Set the LED node parameter to '' |
- | < | + | ```shell |
$ echo default-on | sudo tee / | $ echo default-on | sudo tee / | ||
- | </ | + | ``` |
**Set LED heartbeat** | **Set LED heartbeat** | ||
- | Set the LED node parameter to heartbeat, to make the LED flash with a heartbeat blink: | + | Set the LED node parameter to '' |
- | < | + | ```shell |
- | $ echo heartbeat | + | $ echo heartbeat |
- | </ | + | ``` |
You can also experiment with other parameters. | You can also experiment with other parameters. | ||
- | <tabbox VIM4> | + | < |
- | Lets use '' | + | We will take '' |
**Turn off** | **Turn off** | ||
- | Set the LED node parameter to none to turn off the LED: | + | Set the LED node parameter to '' |
- | < | + | ```shell |
$ echo none | sudo tee / | $ echo none | sudo tee / | ||
- | </ | + | ``` |
**Turn on** | **Turn on** | ||
- | Set the LED node parameter to heartbeat, to make the LED flash with a heartbeat rhythm: | + | Set the LED node parameter to '' |
- | < | + | ```shell |
- | $ echo heartbeat | + | $ echo default-on |
- | </ | + | ``` |
**Set LED heartbeat** | **Set LED heartbeat** | ||
- | Set the LED node parameter to heartbeat, to make the LED flash with a heartbeat blink: | + | Set the LED node parameter to '' |
- | < | + | ```shell |
- | $ echo heartbeat | + | $ echo heartbeat |
- | </ | + | ``` |
You can also experiment with other parameters. | You can also experiment with other parameters. | ||
Line 112: | Line 89: | ||
We will use sys_led as an example: | We will use sys_led as an example: | ||
- | | + | **Turn off** |
- | Set the LED node parameter to none to turn off the LED: | + | |
+ | Set the LED node parameter to '' | ||
```shell | ```shell | ||
Line 119: | Line 97: | ||
``` | ``` | ||
- | | + | **Turn on** |
- | Set the LED node parameter to default-on to keep the LED permanently on: | + | |
+ | Set the LED node parameter to '' | ||
```shell | ```shell | ||
$ echo default-on | sudo tee / | $ echo default-on | sudo tee / | ||
``` | ``` | ||
- | | + | **Set LED heartbeat** |
- | Set the LED node parameter to heartbeat, to make the LED flash with a heartbeat blink: | + | |
+ | Set the LED node parameter to '' | ||
```shell | ```shell | ||
- | $ echo heartbeat | + | $ echo heartbeat |
``` | ``` | ||
Line 135: | Line 115: | ||
<tabbox Edge2> | <tabbox Edge2> | ||
+ | We will use red_led blue_led green_led | ||
+ | |||
+ | **Turn off** | ||
+ | |||
+ | Set the LED node parameter to '' | ||
+ | |||
+ | ```shell | ||
+ | $ echo none | sudo tee / | ||
+ | ``` | ||
+ | |||
+ | **Turn on** | ||
+ | |||
+ | Set the LED node parameter to '' | ||
+ | |||
+ | ```shell | ||
+ | $ echo default-on | sudo tee / | ||
+ | ``` | ||
+ | **Set LED heartbeat** | ||
+ | |||
+ | Set the LED node parameter to '' | ||
+ | |||
+ | ```shell | ||
+ | $ echo heartbeat | sudo / | ||
+ | ``` | ||
+ | The others are similar. | ||
+ | |||
+ | You can also experiment with other parameters. | ||
</ | </ |