It seems that digitalPulse() will give errors on subsequent attempts to call it. It works normally the first time only.
INTERNAL ERROR: Timeout on Utility Timer
Happens in both v50 and the v51 github version.
I'm not sure what the default value is for time or if you want 0.1 to be the time. I believe the second param should either be 1 or 0, nothing in between. Try setting it all params explicitly, like this:
digitalPulse(C7, 1, 100)
And make sure that 100ms pass before running it again. Here is an example where I'm pulsating the led every 2 seconds, check out line 45.
The official reference lists the format as digitalPulse(pin, state, time), where:
digitalPulse(pin, state, time)
I was omitting the second argument, and meant that 0.1 to be the time, no wonder it wasn't working.
Glad you got this sorted. I'll look into why it didn't just give you an error - it should do...
Don't worry about formatting, just type in the text and we'll take care of making sense of it. We will auto-convert links, and if you put asterisks around words we will make them bold.
For a full reference visit the Markdown syntax.
© Espruino, powered by microcosm.
Report a problem