It might be that it just needs a pulse? so digitalPulse(A0,1,100) for a 100ms pulse on A0.
It's possible that if you leave it powered all the time that's not good for it?
That page says the impedance is 550 ohms, so 3.3*1000/550 = 6mA when driven from the Espruino's 3.3v - so from that side of things you're ok.
However if it's inductive it might be trying to put some extra voltage into Espruino when turned on/off and it might be an idea to put some 'clamp' diodes across it. I don't suppose you have an oscilloscope you could check with?
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.
It might be that it just needs a pulse? so
digitalPulse(A0,1,100)
for a 100ms pulse on A0.It's possible that if you leave it powered all the time that's not good for it?
That page says the impedance is 550 ohms, so 3.3*1000/550 = 6mA when driven from the Espruino's 3.3v - so from that side of things you're ok.
However if it's inductive it might be trying to put some extra voltage into Espruino when turned on/off and it might be an idea to put some 'clamp' diodes across it. I don't suppose you have an oscilloscope you could check with?