Things used in this project

Hardware components:
Cutout cortado grande
Punch Through LightBlue Bean
×1
1586 00
Adafruit NeoPixel Ring: WS2812 5050 RGB LED
×1
Mfr 25fbf52 2k21 sml
Resistor 2.21k ohm
×1
Mfr 25frf52 10k sml
Resistor 10k ohm
×1
Fairchild semiconductor pn2222abu. image
General Purpose Transistor NPN
×1
Globe Lightshade
×1
Hand tools and fabrication machines:
09507 01
Soldering iron (generic)
Drill
Hy gluegun
Hot glue gun (generic)
Wire Stripper
Knife

Code

Code snippet #1C/C++
#include <Adafruit_NeoPixel.h>
// The pin that is connected to the NeoPixels
#define PIN 5
// The amount of LEDs in the NeoPixels
#define NUMPIXELS 16
// LedReading is the type we get when we call Bean.getLedValues();
// For example, to get the amount of red in the Bean's LED,
// we use ledColor.red to get a value from 0 to 255
LedReading ledColor;
// previousLedColor will be used to check if the LED's color has changed
LedReading previousLedColor;
// Set up the NeoPixel library
Adafruit_NeoPixel pixels = Adafruit_NeoPixel(
  NUMPIXELS, PIN, NEO_GRB + NEO_KHZ800);

void setup() {
  pixels.begin();  //  Initialize the NeoPixels
  Bean.enableWakeOnConnect(true);
}

void loop() {
  if(Bean.getConnectionState()) {
    ledColor = Bean.getLed();
    if(ledColor.red != previousLedColor.red ||
      ledColor.green != previousLedColor.green ||
      ledColor.blue != previousLedColor.blue) {
      for(int i = 0; i < NUMPIXELS; i++) {
        pixels.setPixelColor(
          i, pixels.Color(ledColor.red, ledColor.green, ledColor.blue));
        pixels.show();
      }
    previousLedColor = ledColor;
    }
  }
  else {
    Bean.sleep(0xFFFFFFF);
  }
}

Credits

11014907 917762441613247 2463536654633089299 o
Punch Through

We’ve been building connected products since 2009. Our diverse team has expertise in every layer from hardware to software to web.

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

Similar projects you might like

Pumpkin NotiFire
Advanced
  • 384
  • 9

Full instructions

The Pumpkin NotiFire is a delicious but questionable combination of a Glade aerosol air freshener, fire and text messages.

J.A.R.V.I.S. : A Virtual Home Assistant
Advanced
  • 9,906
  • 105

Full instructions

J.A.R.V.I.S. is a personal home automation assistant for controlling electrical home appliances integrated with an augmented reality app.

Touched by Time – Cyborgism
Advanced
  • 1,752
  • 16

I have no “sense" of time - can I develop one? Tempo is a wearable device that feeds time data to my skin through vibration patterns.

Play audio from SD card/Elevator fart prank
Advanced
  • 1,055
  • 9

Full instructions

Want to prank all those business people on the elevator ? Follow this DIY prank-friendly tutorial!

Bean Bus
Advanced
  • 808
  • 5

Full instructions

Drive a tiny RC bus over Bluetooth Low Energy with the LightBlue Bean!

Bean Bus

Team Punch Through

CastMinder - The Cast and Splint Monitoring System
Advanced
  • 130
  • 0

Work in progress

The CastMinder system can detect complications in orthopedic casts and splints while healing patients faster and with less pain.

Add projectSign up / Login