Test application for the STMicroelectronics X-NUCLEO-LED61A1 LED Control Expansion Board showing several LED control modes, built against mbed OS.
Dependencies: X_NUCLEO_LED61A1
Fork of LedDimming_LED61A1 by
LED Control with the X-NUCLEO-LED61A1 Expansion Board
This application provides an example of usage of the X-NUCLEO-LED61A1 LED Control Expansion Board. It shows how to control a LED stripe load connected to the board through the following control modes:
- Manual PWM Dimming;
- Manual Analog Dimming;
- Sinusoidal PWM Dimming;
- Sinusoidal Analog Dimming;
- Photo-based Analog Dimming.
The button of the MCU board, when available, can be used in the following ways:
- Short Button Press [<0.5s] for Manual Dimming;
- Medium Button Press to Switch Demo;
- Long Button Press [>2s] to Switch Power ON/OFF.
The program starts in mode 1.
Diff: main.cpp
- Revision:
- 4:aeeb361d0227
- Parent:
- 3:ed347127fc38
- Child:
- 5:b00bbf1edfa9
--- a/main.cpp Fri Dec 18 16:53:09 2015 +0000 +++ b/main.cpp Fri Dec 18 17:05:26 2015 +0000 @@ -350,7 +350,11 @@ /*----- Initialization. -----*/ /* Printing to the console. */ - printf("LED Control Application Example\r\n\n"); + printf("LED Control Application Example\r\n\n"\ + "+ Short Button Press [<%.1fs] --> Manual Dimming\r\n"\ + "+ Medium Button Press --> Switch Demo\r\n"\ + "+ Long Button Press [>%.1fs] --> Switch Power ON/OFF\r\n\n"\ + , SWITCH_DEMO_BUTTON_PRESS_ms / 1000.0f, SWITCH_POWER_BUTTON_PRESS_ms / 1000.0f); /* Initializing LED Control Component. */ led = new LED6001(D4, A3, D6, D5);