DIGITAL_IN without callback

Does configuring a port to be DIGITAL_IN without a callback cancel existing callbacks that may have been queued due to transitions on that port? If not, is there an elegant way to do that?

On a related note, I have my inputs pulled to ground with a 10K resistor. Is it best practice to simply configure these as DIGITAL_IN or should I use DIGITAL_IN_PULLDOWN?

Hmm. Not sure on the queued, Peter will know. You could “eat” these in the handler, ie:

`ignore <- false;

function handler() {
  if (ignore) return;
  // do other stuff
}`

…then set ignore when you unconfigure the callback?

If you have a pulldown externally then you don’t need to use DIGITAL_IN_PULLDOWN. It won’t hurt, but the internal pulldown is weaker than 10k (ISTR ~50k?)