Hi everyone.
I'm new here and I would learn to program my microbit v2 with espruino.
So, I've connect my board to Espruino Web IDE. So far so good.
But when I try the examples here it seems that they doesn't work.
g = Graphics.createArrayBuffer(5,5,1);
g.flip = function(){show(this.buffer);};
var x = 0;
setInterval(function() {
x++;
if (x>50)x=0;
g.clear();
g.drawString("Espruino",5-x);
g.flip();
}, 100);
But nothing.
Instead, when I have try the BLE keyboard example:
var kb = require("ble_hid_keyboard");
NRF.setServices(undefined, { hid : kb.report });
function btnPressed() {
// Send 'a'
kb.tap(kb.KEY.A, 0, function() {
// Followed by capital 'A'
kb.tap(kb.KEY.A, kb.MODIFY.SHIFT);
});
}
// trigger btnPressed whenever the button is pressed
setWatch(btnPressed, BTN, {edge:"rising",repeat:true,debounce:50});
It worked (but only when I press A button, not B).
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 everyone.
I'm new here and I would learn to program my microbit v2 with espruino.
So, I've connect my board to Espruino Web IDE. So far so good.
But when I try the examples here it seems that they doesn't work.
For example, I have flash on micro:bit this one
but nothing happens.
Then I have try with the following one
But nothing.
Instead, when I have try the BLE keyboard example:
It worked (but only when I press A button, not B).
Where am I wrong?
Thank you for your replies!