Puck P3 gets hit (P3's momentary switch is pressed)
Puck P3 turns light off
Puck P3 notifies Hub about event (P3 Light on-time)
Hub randomly picks another puck, for example...
...move on with step 3... and this will go on and on until some other condition/event is met/happens.
Above sequence assumes Hub is involved in every on-off cycle... this allows different patterns of selection:
completely random - step 2 happens independent of what happened in previous steps 2.
conditioned random - second step 2 picks one of the 7 not yet lightened pucks, step 3 of the 6, etc. which gives lets the hitter - if the hitter has knows what has gone on for the last hits since begin - anticipate what's next with increasing probability up to 1: the last one after 7 have been lit and hit.
Another option is that each puck knows the other 7 in the gang and picks randomly which puck's turn it will be to lit, hit, and turn off.
further variations are a variable delay time until next puck is lit....
...and how (variable) long a puck will be lit... and and how long after the light turns off the puck is still sensitive to a hit...
...and also if a puck is hit when is is not or had just turned off the light but was not sensitive anymore to hits
All these variations allow to draw various conclusions...
From what I understand is that it is not only about being able lit, being hit, and turn off, but also forward information about the events to a central recording place which does stats/graphs.
PS: if you have just 8 pucks, they would need to know about each other's id upfront, so they can create the proper advertising and scanning.
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.
Your scenario is:
...move on with step 3... and this will go on and on until some other condition/event is met/happens.
Above sequence assumes Hub is involved in every on-off cycle... this allows different patterns of selection:
Another option is that each puck knows the other 7 in the gang and picks randomly which puck's turn it will be to lit, hit, and turn off.
further variations are a variable delay time until next puck is lit....
...and how (variable) long a puck will be lit... and and how long after the light turns off the puck is still sensitive to a hit...
...and also if a puck is hit when is is not or had just turned off the light but was not sensitive anymore to hits
All these variations allow to draw various conclusions...
From what I understand is that it is not only about being able lit, being hit, and turn off, but also forward information about the events to a central recording place which does stats/graphs.
PS: if you have just 8 pucks, they would need to know about each other's id upfront, so they can create the proper advertising and scanning.