Learn LVGL course, Module 2.3 – The LEDs stay always ON, never change state.
I have actually added the following code to the end of the callback function of the button to check if my board is responding and switching the LED status:
digitalWrite(CYD_LED_BLUE,0);
delay(500);
digitalWrite(CYD_LED_BLUE,1);
delay(500);
digitalWrite(CYD_LED_BLUE,0);
delay(500);
The LED blinks correctly, but does not stay OFF at the end, even when I turned it off (as you can see in the last “digitalWrite” sentence in code above).
Is there something in the LVGL library that forces outputs to be 1 (HIGH) ? or what is wrong/missing in the code of the example?
Thanks in advance for your help
Hi.
Which board are you using?
Please note that the LEDs of the CYD board work with inverted logic, which means that the following line will turn it on.
digitalWrite(CYD_LED_BLUE,0);
And this one will turn it off
digitalWrite(CYD_LED_BLUE,1);
Does that issue happen with both LEDs and buttons?
Regards,
Sara