Alex Glow
Published © CC BY

Drama Button

Mesh-networked dramatic lighting, for life's special moments.

Full instructions provided1,010
Drama Button

Things used in this project

Hardware components

Pinoccio Starter Kit
×1
Big Red Dome Button
SparkFun Big Red Dome Button
×1
22-gauge wire
×1

Story

Read more

Custom parts and enclosures

sparkfun-button-stand.stl

Sketchfab still processing.

Code

button.c

C/C++
button.c
// Save these functions to your Scout (the one in the button), via HQ or the Arduino IDE.

function startup { pin.write("d2", HIGH); pin.makeinput("d3", INPUT_PULLUP); };
function on.d3.low { message.group(1); };

lights.c

C/C++
lights.c
// Save this function to each other Scout in your troop. After adding it, you can use
// "print n" to show the number of times the button has been pushed - useful for tracking
// attendance or other metrics.
// The "if" statement here checks the ID number of the Scout that sent the message. If
// necessary, change it to the correct one (as seen in the video).

function on.message.group { if (arg(2) == 7) {led.red(2000); n = n+1; }; };

Credits

Alex Glow

Alex Glow

72 projects • 687 followers
The Hackster team's resident Hardware Nerd. I like robots, music, EEG, wearables, and languages. FIRST Robotics kid.
Contact

Comments

Add projectSign up / Login