Sorry about posting there as well and since it is closed, progress here.
Firmware was originally 2v17.118_esp32 but updated now to latest 2v17.120_esp32.
Your tip about use of for (var i in rows) { loops was very relevant and changing them to for (var i of rows){ and for (var i=0;i<rows.length;i++) { loops fixed the return values for keypad.read() so that's all good now.
The callback version is still a problem although there was some progress after fixing those loops, since pinMode() and setWatch() were being fed with strings rather than numbers. With some added print()s I can see them being set up correctly now. However the onWatch() callback is still never executed.
I tested the same pins separately with a mechanical switch e.g.
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.
Sorry about posting there as well and since it is closed, progress here.
Firmware was originally 2v17.118_esp32 but updated now to latest 2v17.120_esp32.
Your tip about use of
for (var i in rows) {
loops was very relevant and changing them tofor (var i of rows){
andfor (var i=0;i<rows.length;i++) {
loops fixed the return values for keypad.read() so that's all good now.The callback version is still a problem although there was some progress after fixing those loops, since pinMode() and setWatch() were being fed with strings rather than numbers. With some added
print()
s I can see them being set up correctly now. However the onWatch() callback is still never executed.I tested the same pins separately with a mechanical switch e.g.
and it works fine for all the pins being used for the keypad. Nevertheless, still no luck with the keypad itself.
More digging needed and any help appreciated ...