Khadas Docs

Amazing Khadas, always amazes you!

User Tools

Site Tools


products:sbc:common:applications:gpio:led

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
products:sbc:common:applications:gpio:led [2022/07/13 02:17]
hyphop [Table]
products:sbc:common:applications:gpio:led [2023/11/07 03:23] (current)
nick
Line 4: Line 4:
 ===== Introduction ===== ===== Introduction =====
 /* /*
-This document mainly describes the onboard LEDs. You will learn how to control the LEDs.+This page mainly describes the onboard LEDs and leads you to control the LEDs.
 */ */
-Onboard LED indicators usage under Linux . You will learn how to control the LEDs. +This page introduces the usage of Onboard LED indicators under Linux, and leads you to control the LEDs. 
  
 ===== Device LED configurations ===== ===== Device LED configurations =====
  
-|   Device ^ Device Node              ^ LED color  ^ + Device      ^  Node name                   LED color  ^ 
-  VIM1/2 | /sys/class/leds/sys_led  | White      | + VIM1/      /sys/class/leds/sys_led     White      | 
-^  VIM3/3L | /sys/class/leds/red_led  | Red        | +^  VIM3/3L      /sys/class/leds/red_led     Red        | 
-     ::: | /sys/class/leds/sys_led             + :::          /sys/class/leds/sys_led                
-    VIM4 | /sys/class/leds/pwmled              + VIM1S/VIM4   /sys/class/leds/pwmled                 
-   Edge1 | /sys/class/leds/red_led             + Edge1        /sys/class/leds/red_led                
-     ::: | /sys/class/leds/sys_led            |+ :::          /sys/class/leds/sys_led                | 
 + Edge2        /sys/class/leds/red_led    |  Red        | 
 +|  :::          /sys/class/leds/green_led  |  Green      | 
 +|  :::          /sys/class/leds/blue_led    Blue       |
  
  
Line 46: Line 49:
  
 ```shell ```shell
-$ echo heartbeat /sys/class/leds/sys_led/trigger+$ echo heartbeat | sudo tee /sys/class/leds/sys_led/trigger
 ``` ```
  
-You can also try other parameters.+You can also experiment with other parameters.
  
-<tabbox VIM4>+<tabbox VIM1S/VIM4>
  
 We will take ''pwmled'' (white) as an example. We will take ''pwmled'' (white) as an example.
Line 77: Line 80:
  
 ```shell ```shell
-$ echo heartbeat /sys/class/leds/pwmled/trigger+$ echo heartbeat | sudo tee /sys/class/leds/pwmled/trigger
 ``` ```
  
Line 84: Line 87:
 <tabbox Edge1> <tabbox Edge1>
  
-We will use sys_led as an example:+We will use ''sys_led'' as an example:
  
 **Turn off** **Turn off**
Line 106: Line 109:
  
 ```shell ```shell
-$ echo heartbeat /sys/class/leds/sys_led/trigger+$ echo heartbeat | sudo tee /sys/class/leds/sys_led/trigger
 ``` ```
  
Line 112: Line 115:
  
 <tabbox Edge2> <tabbox Edge2>
 +We will use ''red_led'' as an example:
 +
 +**Turn off**
 +
 +Set the LED node parameter to ''none'' to turn off the LED:
 +
 +```shell
 +$ echo none | sudo tee /sys/class/leds/red_led/trigger
 +```
 +
 +**Turn on**
 +
 +Set the LED node parameter to ''default-on'' to keep the LED permanently on:
 +
 +```shell
 +$ echo default-on | sudo tee /sys/class/leds/red_led/trigger
 +```
 +**Set LED heartbeat**
 +
 +Set the LED node parameter to ''heartbeat'', to make the LED flash with a heartbeat blink:
 +
 +```shell
 +$ echo heartbeat | sudo tee /sys/class/leds/red_led/trigger
 +```
 +The others are similar.
 + 
 +You can also experiment with other parameters.
  
 </tabbox> </tabbox>
Last modified: 2022/07/13 02:17 by hyphop