@Gordon .
i will explain in this way.
we have BTN or any pin, how to debounce that pin using code?
puck 1 code:- setWatch(senderase,D1, { edge:"rising",debounce:50, repeat: true });
senderase function called when the D1 is debounces right.
puck2 code:-
function send(cmd){ NRF.requestDevice({ filters: [{ namePrefix: 'Puck.js' }] }).then(function(device) { require("ble_simple_uart").write(device, cmd, function() { print('Done!'); }); }); }
send("analogWrite(D1,1)\n");
when i run this code, is this puck can debounce the D1 pin on puck1 ? if not any other api is there to that?
@afrid started
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.
@Gordon .
i will explain in this way.
we have BTN or any pin, how to debounce that pin using code?
puck 1 code:-
setWatch(senderase,D1, { edge:"rising",debounce:50, repeat: true });
senderase function called when the D1 is debounces right.
puck2 code:-
function send(cmd){
NRF.requestDevice({ filters: [{ namePrefix: 'Puck.js' }] }).then(function(device) {
require("ble_simple_uart").write(device, cmd, function() {
print('Done!');
});
});
}
send("analogWrite(D1,1)\n");
when i run this code, is this puck can debounce the D1 pin on puck1 ?
if not any other api is there to that?