Hello,
i'm playing with a rotary encoder a big MYSM60-100PPRR-5L with the example given but the console is populated with too many answer for 1 step.
function onInit() { var step = 0; require("Encoder").connect(A5,A8, (dir) => { print(dir); if (dir > 0) { //allume la led 20ms digitalPulse(LED1, 1, 20); } else { digitalPulse(LED2, 1, 20); } }); }
console return for 1step backward
-1 -1 -1 -1 -1 1 >
and
1 1 1 1 >
for 1 step forward...
what i'm doing badly?
@Mrbbp 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.
Hello,
i'm playing with a rotary encoder a big MYSM60-100PPRR-5L with the example given
but the console is populated with too many answer for 1 step.
console return for 1step backward
and
for 1 step forward...
what i'm doing badly?