Just got espruino running on a stm32f4discovery I ordered and received today... I'm a backer on kickstarter, but am beyond the "impatient developer" level...LOL!
Anyway, here's a cool little demo you can run on the the f4discovery board:
var i = 1000, run = true;
function flashLights() {
LED4.write(false);
LED1.write(true);
setTimeout(function () {
LED1.write(false);
LED2.write(true);
setTimeout(function () {
LED2.write(false);
LED3.write(true);
setTimeout(function () {
LED3.write(false);
LED4.write(true);
setTimeout(function () {
if (run) {
flashLights();
}
}, i);
}, i);
}, i);
}, i);
}
flashLights();
After executing it runs each of the leds in a circle with the given wait time between each flash. In the console you can modify the i variable to alter the flash rate while it's running. Then to stop it just put run=false. Once you get below i=70 you can't even really tell which direction they're flashing in they're going so fast!
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.
Just got espruino running on a stm32f4discovery I ordered and received today... I'm a backer on kickstarter, but am beyond the "impatient developer" level...LOL!
Anyway, here's a cool little demo you can run on the the f4discovery board:
After executing it runs each of the leds in a circle with the given wait time between each flash. In the console you can modify the
i
variable to alter the flash rate while it's running. Then to stop it just putrun=false
. Once you get belowi=70
you can't even really tell which direction they're flashing in they're going so fast!Cheers,
Austin