So it works, but every time you say analogWrite you have to reset it?
You could try pinMode(A0, "output") first, which should at least tell Espruino that you're setting the pin mode manually and not to touch it. analogWrite may just ignore that though...
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.
So it works, but every time you say
analogWrite
you have to reset it?You could try
pinMode(A0, "output")
first, which should at least tell Espruino that you're setting the pin mode manually and not to touch it.analogWrite
may just ignore that though...