OK thank you @Gordon
the final solution was the pull_up
function onInit() { var value = 0; pinMode(A8, 'input_pullup'); pinMode(A5, 'input_pullup'); setWatch(function(e) { if (e.data) value++ else value--; print(value); }, A5, {data:A8, repeat:true, edge:'falling'}); }
the value increases and decreases according to the rotation.
é.
@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.
OK thank you @Gordon
the final solution was the pull_up
the value increases and decreases according to the rotation.
é.