I just got a chance to try this - looks nice!
Thanks for taking a look, @Gordon!
I guess for something pre-installed, people won't actually see any of the text that appears (initially) - and when they get to that point they could easily have loaded up your code themselves.
True that. Still, it's nice to see something more than that red flash on battery insertion.
(just an aside, but if I added https://www.espruino.com/ide/#code_url_here it could be really helpful for posting up code?)
I'm not sure what you mean.
So I'm wondering what we could do 'out of the box' - when you first insert the battery and do nothing else - that would be fun, and that didn't drain the battery for those that turn the Puck on and then just leave it (including if they put it in a bag and the button kept being pressed).
I do put a lot of stuff to sleep after 20 seconds right now, until the next button press. Maybe I could be smarter about detecting unintentional button presses. Hmm.
The rainbow is nice, and maybe it could detect rotation using the magnetometer.
YES. I'm totally thinking along the lines of making it more playful before connecting to an IDE. I'm going to fork this, and make something more of a game.
Perhaps it could flash out rainbow colours in 4 groups of pulses, where the number of pulses corresponded with the Puck's MAC address that was displayed when advertising?
Or maybe it just maps each hex digit to a hue, and does a 4-color sequence unique to that Puck. More quickly recognizable.
It'd be nice to it to be able to connect to Pucks that are very close (high signal strength) and make them flash or something - but I think in a classroom environment that would just be more annoying than anything else :)
I'm thinking of a separate program that enables you to select a nearby puck, and say "hi".
I guess after an hour of not being used it could just completely clear itself so it went back to not using much power?
Perhaps a long press of the button does a
reset(). Or a long press followed by a short confirmation press. Maybe a super long press ("Help, I'm trapped under books in a backpack!") is detected and basically ignored.