• After I tried to set pins with setWatch for the 3 pins, I ran your command again. Here is the result.

    >global["\xFF"].watches
    =[
      undefined,
      { pin: D32, recur: true, edge: -1,
        cb: function () { ... },
        state: false },
      { pin: D24, recur: true, edge: -1,
        cb: function () { ... },
        state: false },
      { pin: D22, recur: true, edge: -1,
        cb: function () { ... },
        state: true },
      { pin: D24, recur: true, edge: -1,
        cb: function () { ... },
        state: false }
     ]
    
  • After I tried to set pins with setWatch for the 3 pins

    a bit strange, I guess you run the setwatch command two times for pin D24, but where is the D17, the BTN1?

    Maybe try assigning the watch number to a variable, so that you can then clear them and do your test better, like so?
    testD22=setWatch(function(e) { console.log("testD22"); }, D22, {
    repeat:true, edge:'both' });

    clearWatch(testD22)

About

Avatar for enaon @enaon started