Skip to content

Instantly share code, notes, and snippets.

@jbobrow
jbobrow / Sentiments Box - Notes.ino
Last active January 11, 2023 04:44
A quick sketch and notes on the sketch in the header. Not a functioning solution, but a sketch with a slightly different approach. Needs to be tested.
/*
* Rough Sketch for Sentiments Box
* modified code by Jonathan Bobrow
* updated 1.10.2023
*
* Goals:
* 1. Avoid using an arbitrary number for triggering the sensor
* Solution: remove noise from the sensor and make it adapt to it's environment
* by keeping a running average and then comparing the last value or N values to the average
* 2. Remove dependencies on delays

Books I finished reading (or listening to)

inspired by the list maintained by Max Fenton

in 2023

  • The Creative Act - Rick Rubin
  • Tomorrow, and Tomorrow, and Tomorrow - Gabrielle Zevin
  • Chip War - Chris Miller
  • An Immense World - Ed Yong

in 2022

void deathDisplay() {
// Note: DEATH_INTERVAL is 1000 (1 second animation)
if (!deathTimer.isExpired()) {
// then we are healing
// 4 containers to remove energy from
FOREACH_FACE(f) {
long offset = DEATH_INTERVAL / 6;
byte dist = (6 - f) % 6;
/*
* Rise and Fall Arc Animation
*/
byte start = 0;
byte end;
Timer arcTimer;
#define ARC_DURATION 500
#define ARC_DELAY 100
/*
* Rikki Tahta Sketch
*
* Count up.
* Each click counts up
* Double-click becomes a different display mode
*/
byte count = 0;
bool bFlicker = false;
@jbobrow
jbobrow / ReactorColors.ino
Created May 13, 2020 15:06
Color updates
// State machine map: https://docs.google.com/presentation/d/1CsAItlWN2fxssGJggbDrWCFktAbGhIYJ73E4aiDmlCU/edit#slide=id.g6f17dd6178_0_0
// **********************************************************************
// **** TUNABLE CONSTANTS ***********************************************
// **********************************************************************
#define masterColorSwitchGapLength 100 // Dark time in between color switches
#define masterColorSwitchLengthMin 600
#define masterColorSwitchLengthMax 1200
#define masterColorSwitchLengthDelta 100
/*
PIRATES 'N' LASERS
Animation Prototype
Lasers
1. Dim Ships Status (Fade to Black)
2. Instant redline w/ exposure flash (Simultaneous w/ Dimming)
3. Step by step explosions @ 400ms per segment
4. Fade up the status of the ship
5. Fade a single health to black.
/*
Blinks Dev-Kit
Validation Test for Dev Kit Blinks
4 modes for testing
1. Verify RGB on all 6 faces together
2. Verify RGB on each of the 6 faces individually
3. Verify communication w/ awake neighbors
4. Verify cold sleep (<0.2µA)
@jbobrow
jbobrow / BlinkDrop.cpp
Last active September 19, 2019 19:15
Drag'n'Drop Blinks Uploader
//--------------------------------------------------------------
void ofApp::dragEvent(ofDragInfo dragInfo){
// Retrieve the path of the single file dropped on our window
filepath = dragInfo.files[0];
// Create a string for the entire command needed to load FW onto a Blink
commandString = "avrdude -p m168pb -P usb -c usbtiny -U flash:w:" + filepath;
// Convert string to const char * as system requires parameter of type const char *
@jbobrow
jbobrow / BlinksBasicSender.ino
Created April 19, 2019 01:54
Sends on all faces, packets and broadcast
/*
Basic Blinks Sender
-------------------
The Blinks Sender will:
1. Broadcast the number of the face on each face
2. When button pressed, send a Packet with a secret message
by Jonathan Bobrow, Move38
04.18.2019