You are reading a single comment by @Gordon and its replies. Click here to read the full conversation.
  • Sorry, I still don't understand...

    If you do:

    setWatch(senderase,D1, { edge:"rising",debounce:50, repeat: true });
    

    Then D1 will be debounced so senderase is not called unless D1 is high for at least 50ms.

    On puck2 I'm not sure what you're trying to do? That is basically the same as writing analogWrite(D1,1) directly onto puck1.

    In that case, since you're writing an analog value that is just 1, it's the same as digitalWrite(D1,1). It turns D1 into an output and sets it to 1 - which I guess will cause senderase to be called if D1 wasn't set previously - but since D1 is now an output it won't respond to external inputs any more

About

Avatar for Gordon @Gordon started