Sorry, in too much of a rush to check everything, but:
Btw, this eval("javascript source code string") is a very very bad thing...
It's actually not that bad to do in Espruino, but in this case it is pointless. I think there was a reason I did it that way in the graphical editor - but I can't remember it now.
It's not a big deal, because realistically you're never going to fill up available RAM with a blockly program and speed isn't really a priority either...
you can take the pinMode()*s out of the *onInit() and put it together with the declaration of the soundOn variable, because saving the code makes Espruino holding on to the pin configuration
Yes, that's true. It tidies the code up a little :)
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.
Sorry, in too much of a rush to check everything, but:
It's actually not that bad to do in Espruino, but in this case it is pointless. I think there was a reason I did it that way in the graphical editor - but I can't remember it now.
It's not a big deal, because realistically you're never going to fill up available RAM with a blockly program and speed isn't really a priority either...
Yes, that's true. It tidies the code up a little :)