The home device allows users in the community to visually see if a chaperone is in a shared space within the community

Created: May 3rd, 2018

0

Product

Product 3: Keep in Touch

A parent will get a home device that s/he will activate with the fob they get from the park Sign Up station. This, therefore, means that only people in the system are aware of the system. The home device will activate with the fob, then it IFTTT’s the parent an email link to register the device.

This device will communicate ambiently via three colors: Green to indicate a chaperone present and alert, yellow for a chaperone at the playground but not alert and red for having no chaperone present. 

0

Bill of Materials

1 x Particle Photon  

1 x Green LED

1 x Yellow LED

1 x Red LED

7 x Jumper Cables

3 x Resistors

Wood for case housing  

Acrylic Sheet


0

Fritzing Diagram 

0

Code

0
int ledPinG = D0;
int ledPinY = D1;
int ledPinB = D2;

void setup() {
  Particle.subscribe("DIOT2018green",greenHandler);
  Particle.subscribe("DIOT2018yellow",yellowHandler);
  Particle.subscribe("DIOT2018blue",blueHandler);
  Particle.subscribe("tag_dispensed",tag_dispensed);
  pinMode( ledPinG , OUTPUT );
  pinMode( ledPinY, OUTPUT );
  pinMode(ledPinB, OUTPUT);
//   digitalWrite(ledPinG, HIGH);
//   digitalWrite(ledPinY, HIGH);
//   digitalWrite(ledPinB, HIGH);
}
// LED Handlers
void greenHandler(const char *event, const char *data) {
  if(data == "HIGH"){
    digitalWrite(ledPinG, HIGH);
  } else{
    digitalWrite(ledPinG, LOW);
  }
}
void yellowHandler(const char *event, const char *data) {
  if(data == "HIGH"){
    digitalWrite(ledPinY, HIGH);
  } else{
    digitalWrite(ledPinY, LOW);
  }
}
void blueHandler(const char *event, const char *data) {
  if(data == "HIGH"){
    digitalWrite(ledPinB, HIGH);
  } else{
    digitalWrite(ledPinB, LOW);
  }
}
// Indication of a New user LED Sequence via dispensed rfid tag
void tag_dispensed(const char *event, const char *data) {
  if(data == "HIGH") {
    digitalWrite(ledPinG, HIGH);
    delay(1000);
    digitalWrite(ledPinY, HIGH);
    delay(1000);
    digitalWrite(ledPinB, HIGH);
    delay(1000);
    digitalWrite(ledPinB, LOW);
    delay(1000);
    digitalWrite(ledPinY, LOW);
    delay(1000);
    digitalWrite(ledPinG, LOW);
    delay(5000);
  }
}
Click to Expand
x
Share this Project

Courses

49313 Designing for the Internet of Things (Undergrad)

· 22 members

A hands-on introductory course exploring the Internet of Things and connected product experiences.


About

The home device allows users in the community to visually see if a chaperone is in a shared space within the community