Project

General

Profile

Example SOM tricolor LED

Objective

This example demonstrates the tri-color LEDs on the SOM card.

Prerequisites

  • The tri-color LEDs are located on the SOM card as indicated below.

Steps

  • Turn on the LEDs
    root@mitysom-am57x:~# echo 100 > /sys/class/leds/red:aux/brightness   # turn on the Red LED
    root@mitysom-am57x:~# echo 100 > /sys/class/leds/green:aux/brightness # turn on the Green LED
    root@mitysom-am57x:~# echo 100 > /sys/class/leds/blue:mmc0/brightness # turn on the Blue LED
    
  • Turn off the LEDS
    root@mitysom-am57x:~# echo 0 > /sys/class/leds/red:aux/brightness   # turn off the Red LED
    root@mitysom-am57x:~# echo 0 > /sys/class/leds/green:aux/brightness # turn off the Green LED
    root@mitysom-am57x:~# echo 0 > /sys/class/leds/blue:mmc0/brightness # turn off the Blue LED
    

The blue led is named differently from the others because it is configured in the Linux device tree to blink on mmc0 activity.

Conclusion

In this example you have controlled each of the tri-color LEDs that are present on the SOM. This could also be done within a program by writing similar strings to the file names indicated.

Go to top
Add picture from clipboard (Maximum size: 1 GB)