digitalPulse only takes 3 arguments, so with digitalPulse(B3, 1, 0.10, 0.1) the final argument is ignored - it's like saying digitalPulse(B3, 1, 0.10)
When you pass an array, you're passing [on,off,on,off,... - so if you pass an odd number of arguments the pin will return to its initial state (in your case 0), but if you pass an even number of arguments it'll finish at 1 - does that help?
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.
digitalPulse
only takes 3 arguments, so withdigitalPulse(B3, 1, 0.10, 0.1)
the final argument is ignored - it's like sayingdigitalPulse(B3, 1, 0.10)
When you pass an array, you're passing
[on,off,on,off,...
- so if you pass an odd number of arguments the pin will return to its initial state (in your case 0), but if you pass an even number of arguments it'll finish at 1 - does that help?