// This one will fail - you're defining a JS function *around* the native one
setWatch(function(e) { wiegand.ReadD0; }, E2, { repeat:true, edge:'falling', irq : true});
// This one should work just fine
setWatch(wiegand.ReadD0, E2, { repeat:true, edge:'falling', irq : true});
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.