New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

All Blinks fall asleep at the same time #39

jbobrow opened this Issue Sep 24, 2018 · 4 comments


None yet
3 participants
Copy link

jbobrow commented Sep 24, 2018

Every time a Blink's button is pressed, let contiguous Blinks know a game action has occurred and reset the sleep timer. This way all Blinks will fall asleep at roughly the same time.

@bigjosh bigjosh self-assigned this Sep 24, 2018

@jbobrow jbobrow added this to the Sleep / Wake Functionality milestone Sep 25, 2018


This comment has been minimized.

Copy link

kenj1 commented Sep 25, 2018

I like this but would add (to preserve battery life):
Allow the user to simultaneously force sleep all contiguous blinks (user initiated "shutoff" instead of requiring a 10 minute wasted battery timeout cycle anytime someone uses a Blink. For example, a 10 second long press puts the Blink (and all contiguous Blinks) into sleep mode.

Btw, I've made use of the forced sleep method already (buried in the core) when I implemented a "menu mode" for the game.


This comment has been minimized.

Copy link

jbobrow commented Sep 25, 2018

Spot on @kenj1. I'd love to try out your menu mode, we've implemented a couple and think we have a good one for distribution. It's great that you've made one already, where should I look for it?!

Also, this is the spec for our menu: here


This comment has been minimized.

Copy link

kenj1 commented Sep 30, 2018

I was using it similar to what you're doing with your menu (although I don't have a programmer mode yet). In addition to sleep, my menu was used to also send a "reset" to the connected blinks so they'd return to game start.


This comment has been minimized.

Copy link

bigjosh commented Nov 13, 2018

This feels like 2 different but related features...

  1. Have a blink that is forced to sleep by a long long button press also virally tell neighboring blinks to sleep.
  2. Have each blink regularly share the time since its last button press when it comes in contact with other blinks. When two blinks share this time, the one with the less recent time takes on the more recent one. This should keep any group of blinks that have casual contact with each other from ever going to sleep when ever one has seen a button press withing the timeout period.

There is a complication caused by the fact that clocks of different blinks can be fast and slow Relative to each other, so it is possible to create a timeout feedback loop that prevents all blinks from ever timing out. To resolve this I think we can refine the sharing rule to be that a blink only takes on the more recent button press shared from an adjoining blink when the difference is greater than a threshold. Considering the timeout is on the order of 10 minutes, I think a threshold of ~10 seconds is a good balance of making sure blinks don't fall sleep before others are ready +/-10 seconds (plus clock slew).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment