This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Serial Reporter | |
--------------- | |
A utility app designed to make debugging of games | |
that are buggy in transmitting game state. Essentially, | |
this blink is a stethoscope for Blinks. | |
The Serial Reporter will: | |
1. Look for values received on all faces | |
2. Print values when received on faces |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Button Long Press and confirm on release | |
*/ | |
bool hasBeenLongPressed = false; | |
bool bFastPulse = false; | |
byte bri[6]; | |
void setup() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Wake, Sleep, Program | |
Wake - simple spiral before loading game state | |
Sleep - simple spiral in reverse before going dark | |
Program - flash with urgency | |
*/ | |
uint32_t timeOfPress; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#define SYNC_PAUSE_DURATION 200 | |
byte urge = 0; | |
byte brightness = 0; | |
Timer faceTimer[6]; | |
Timer sendTimer; | |
void setup() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Animation Sketch | |
* Directional flow towards one side of a Blink | |
* | |
*/ | |
Timer aniTimer; | |
#define ANI_DURATION 2000 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Example of single fire actions | |
07.18.2018 | |
by Jonathan Bobrow | |
*/ | |
#include "Serial.h"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* RadioLab coin flip | |
* | |
* Shows empirically that flipping 100 times and seeing a | |
* streak of 7 is much more likely than stated in the Stochacity episode | |
* | |
* In the show, they mention 14 sets of 7, which is 98 coin flips, with distinct sets | |
* This is very different than a continuous 100 flips, and much closer to their stated | |
* 1/6 chance of seeing a perfect run of 7 | |
*/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* RadioLab coin flip | |
* | |
* Shows empirically that flipping 100 times and seeing a | |
* streak of 7 is much more likely than stated in the Stochacity episode | |
*/ | |
int numberOfTrials = 0; // number of trials (does what it says :) | |
int numberOfFlipsInTrial = 100; // number of flips in a trial... yeah aptly named | |
int lengthOfStreak = 7; // how many Tails in a row to make a streak |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Take on the color of the dominant Blink attached | |
*/ | |
byte myState = 0; | |
Color colors[] = {OFF, BLUE, RED, YELLOW, ORANGE, GREEN}; | |
void setup() { | |
// put your setup code here, to run once: | |
setValueSentOnAllFaces( myState ); |