I'm trying to control a simple RGB led. My actual code is working, but I'd make it more ... fluid:
function fade(led) {
for (i=0; i<=255; i++) {
digitalWrite(led, i);
}
}
I call this funtion with the pin number of the led to control. But I'd like an async function that can run a "sequence" of colours while checking in the same time the state of a push button (to turn on/off).
I'm really not a developper, but I know that someone could help me to finish my little led lamp project for my daughter :)
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
Hi, forgive me for my bad english.
I'm trying to control a simple RGB led. My actual code is working, but I'd make it more ... fluid:
I call this funtion with the pin number of the led to control. But I'd like an async function that can run a "sequence" of colours while checking in the same time the state of a push button (to turn on/off).
I'm really not a developper, but I know that someone could help me to finish my little led lamp project for my daughter :)