After some more playing around I think I misunderstood the AC part.
I don't think it requires AC but rather 'alternating' pulses. When wiring up the counter directly to pins A0 & A1 the following code works.
Can you see any issues with this? It seems to work Ok, but I'm worrying I'm still misunderstanding something.
var on = false;
on = !on;
© Espruino, powered by microcosm.
Report a problem