Things used in this project

Hardware components:
Pinoccio Starter Kit
×1
09181 03 l
SparkFun Big Red Dome Button
×1
22-gauge wire
×1

Custom parts and enclosures

sparkfun-button-stand.stl

Sketchfab still processing.

Code

button.cC/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.cC/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

Photo on 7 5 17 at 5 06 pm 7 05huowsyxv
Alex Glow
65 projects • 558 followers
The Hackster team's resident Hardware Nerd. I like robots, music, EEG, wearables, and languages. FIRST Robotics kid.
Contact

Replications

Did you replicate this project? Share it!

I made one

Love this project? Think it could be improved? Tell us what you think!

Give feedback

Comments

Add projectSign up / Login