Since attaching a file didn't work for the image I tried to attach & I just finished testing basic stuff around on Espruino 1V50 firmware for stm32f3discovery, here I try again the attachement ( & post stm's test code here as well ;) )
/* Espruino on STM32F3DISCOVERY
Docs:
https://github.com/espruino/Espruino/blob/master/boards/pins/stm32f303.csv
https://github.com/espruino/Espruino/blob/master/boards/STM32F3DISCOVERY.py
R: connect 'USB ST-LINK' to update Espruino firmware using st-flash utility
R: connect 'USB USER' only for using Espruino
R: to 'refresh' the board, unplug/replug 'USB USER'
Nb: currently has troubles when code is 'sent' from right side of IDE,
even at 9600 bauds & with throttling ..
//> Prompt not detected - upload failed. Trying to recover...
*/
function buttonWatcher(e) {
console.log('Hello World Espruino STM32F3DISCOVERY !');
}
function btnPressed(){
var btnState = digitalRead(BTN1);
if( btnState == 1 ){ console.log(e.time); }
}
var btnPollT;
//pinMode(BTN1, 'input'); // on A0 - same as below
//pinMode(BTN1, 'input_pulldown'); // on press, digitalRead displays 1
//setWatch(buttonWatcher, BTN1, {edge:"falling", repeat:true});
// USB.setConsole(); to prevent 'Console Moved from Serial1' on boot ?
// WARNING: Parent must be a proper object - not a String, Integer, etc. ?
//E.on('init', function() { // didn't work
// worked :)
function onInit(){
digitalWrite(LED2, 1); // blue led on
console.log("Hello World!");
digitalWrite(LED3, 1); // orange led on
//setWatch(buttonWatcher, BTN1, {edge:"falling", repeat:true}); // nope
//setWatch(buttonWatcher, BTN1, {edge:"rising", repeat:true}); // nope
btnPollT = setTimeout(btnPressed, 1000); // btn polling - nope
digitalWrite(LED4, 1); // green led on
USB.setConsole();
digitalWrite(LED1, 1); // red led on
}
//});
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.
Since attaching a file didn't work for the image I tried to attach & I just finished testing basic stuff around on Espruino 1V50 firmware for stm32f3discovery, here I try again the attachement ( & post stm's test code here as well ;) )