LED Blink Demo
This demo alternately writes 1 and 0 to the device node of the user-programmable indicator LED on the carrier board to produce a blinking effect. The LED on-time and off-time are both 0.5s. The LED is located in the red box below.

Basic LED control
In the terminal, run the following command to view all LED device files.
cd /sys/class/leds/
lsEnter a specific LED device directory, for example to view user-led1 information:
cd cd user-led1
lsRun the following command to turn on the corresponding LED, where 1 means on and 0 means off.
echo 1 > brightnessProcedure
Copy the executable smdt_led_demo from this demo's bin directory (05-Development Materials\Software Development Materials\linux_demo\smdt_led_demo\bin) to the board's filesystem (the source code is available under the src path).
In the terminal, run the following command to switch to the directory containing the smdt_led_demo executable.
cd ‘文件所在目录’After switching, run ls to confirm that smdt_led_demo is in the current directory.
lsIf the executable smdt_led_demo is present in the current directory, continue. Run the following command to change the file's permissions.
chmod 777 smdt_led_demoAfter changing the permissions, run the following command to verify the change.
ls -ld smdt_led_demoThe result should be: -rwxrwxrwx 1 root root 13824 Mar 4 01:22 smdt_led_demo
-rwxrwxrwx indicates the permission change succeeded and the file is executable; you may continue.
Run the following commands:
./led_flash -help
./led_flash -n 2The green LED on the carrier board blinks at 0.5s intervals. Meanwhile, the serial terminal prints information about all system LED devices and the LED device currently controlled by the program.

Press Ctrl+C to exit the test.
