This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
|
products:sbc:common:applications:gpio:led [2022/07/12 05:02] nick |
products:sbc:common:applications:gpio:led [2023/11/07 03:23] (current) nick |
||
|---|---|---|---|
| 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 55: | Line 32: | ||
| Set the LED node parameter to '' | Set the LED node parameter to '' | ||
| - | < | + | ```shell |
| $ echo none | sudo tee / | $ echo none | sudo tee / | ||
| - | </ | + | ``` |
| **Turn on** | **Turn on** | ||
| Line 63: | Line 40: | ||
| Set the LED node parameter to '' | Set the LED node parameter to '' | ||
| - | < | + | ```shell |
| $ echo default-on | sudo tee / | $ echo default-on | sudo tee / | ||
| - | </ | + | ``` |
| **Set LED heartbeat** | **Set LED heartbeat** | ||
| Line 71: | Line 48: | ||
| Set the LED node parameter to '' | Set the LED node parameter to '' | ||
| - | < | + | ```shell |
| - | $ echo heartbeat | + | $ echo heartbeat |
| - | </ | + | ``` |
| - | You can also try other parameters. | + | You can also experiment with other parameters. |
| - | <tabbox VIM4> | + | < |
| We will take '' | We will take '' | ||
| Line 85: | Line 62: | ||
| Set the LED node parameter to '' | 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 '' | + | Set the LED node parameter to '' |
| - | < | + | ```shell |
| - | $ echo heartbeat | + | $ echo default-on |
| - | </ | + | ``` |
| Line 102: | Line 79: | ||
| Set the LED node parameter to '' | 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 110: | Line 87: | ||
| <tabbox Edge1> | <tabbox Edge1> | ||
| - | We will use sys_led as an example: | + | We will use '' |
| + | |||
| + | **Turn off** | ||
| - | * Turn off | ||
| Set the LED node parameter to '' | Set the LED node parameter to '' | ||
| Line 119: | Line 97: | ||
| ``` | ``` | ||
| - | | + | **Turn on** |
| Set the LED node parameter to '' | Set the LED node parameter to '' | ||
| Line 125: | Line 104: | ||
| $ echo default-on | sudo tee / | $ echo default-on | sudo tee / | ||
| ``` | ``` | ||
| - | | + | **Set LED heartbeat** |
| Set the LED node parameter to '' | Set the LED node parameter to '' | ||
| ```shell | ```shell | ||
| - | $ echo heartbeat | + | $ echo heartbeat |
| ``` | ``` | ||
| Line 135: | Line 115: | ||
| <tabbox Edge2> | <tabbox Edge2> | ||
| + | We will use '' | ||
| + | |||
| + | **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 tee / | ||
| + | ``` | ||
| + | The others are similar. | ||
| + | |||
| + | You can also experiment with other parameters. | ||
| </ | </ | ||