Things used in this project

Code

Code snippet #1Plain text
#define FIRE    0

AncsNotification notifications[8];

void setup() {
  // Serial port is initialized automatically; we don't have to do anything
  BeanAncs.enable();
  pinMode(FIRE, OUTPUT);
  digitalWrite(FIRE, HIGH);
}

void loop() {
  int msgAvail = BeanAncs.notificationsAvailable();

  if (msgAvail) {
    Bean.setLedRed(30);

    BeanAncs.getNotificationHeaders(notifications, 8);

    for (int i = 0; i < msgAvail; i++) {
      if (notifications[i].catID == 4) {
        Bean.setLedGreen(155);
        delay(500);
        digitalWrite(FIRE, LOW);
        delay(500);
      }
      Bean.setLedGreen(0);
      digitalWrite(FIRE, HIGH);
      delay(3000);
    }
    Bean.setLedRed(0);
  }
}
Code snippet #2Plain text
#define FIRE    0

AncsNotification notifications[8];

void setup() {
  // Serial port is initialized automatically; we don't have to do anything
  BeanAncs.enable();
  pinMode(FIRE, OUTPUT);
  digitalWrite(FIRE, HIGH);
}

void loop() {
  int msgAvail = BeanAncs.notificationsAvailable();

  if (msgAvail) {
    Bean.setLedRed(30);

    BeanAncs.getNotificationHeaders(notifications, 8);

    for (int i = 0; i < msgAvail; i++) {
      if (notifications[i].catID == 4) {
        Bean.setLedGreen(155);
        delay(500);
        digitalWrite(FIRE, LOW);
        delay(500);
      }
      Bean.setLedGreen(0);
      digitalWrite(FIRE, HIGH);
      delay(3000);
    }
    Bean.setLedRed(0);
  }
}

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

J.A.R.V.I.S. : A Virtual Home Assistant
Advanced
  • 13,804
  • 129

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.

Smartphone controlled mood light
Advanced
  • 2,121
  • 14

Full instructions

This tutorial teaches you how to make a mood light that you can change color and intensity of using your iPhone.

Touched by Time – Cyborgism
Advanced
  • 1,936
  • 20

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,094
  • 9

Full instructions

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

Bean Bus
Advanced
  • 820
  • 6

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
  • 158
  • 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