leds¶
Overview¶
The leds example demonstrates how to control the LED lights on a robot.
Inputs¶
No mandatory command-line arguments.
The application automatically initializes the LED controller.
Outputs¶
Log messages indicating the application status.
The robot’s chest and head LEDs change color and play animations.
Execution¶
The application can be executed using:
python3 leds/ --auto-run
Behavior¶
The application first sets the chest and head LEDs to specific colors.
After setting the colors, it plays animations for both sections.
Example Output¶
During execution, the output logs follow this pattern:
[INFO] [timestamp] [pyraya.leds]: Auto running the app
[INFO] [timestamp] [pyraya.leds]: Setup
[WARNING] [timestamp] [pyraya.leds]: Setting animations...
[INFO] [timestamp] [pyraya.leds]: App finished!
Key Note¶
If the LED controller fails to initialize, the application logs an error and exits.