This device allows chaperones to broadcast the community that they are inside of the park and are actively watching the children

Created: May 3rd, 2018

0

Product

Product 2a: Check In

Once at the gate, the child and parent can scan their respective RFID tags at the station and proceed to enter. It's important to note that access to the park is still allowed even if you do not have an RFID tag to scan, you simply won't know who's a part of the P.A.S.S. system and won't be able to have any of its benefits. Upon leaving the park, the chaperones and children will check out via an RFID scanner found at the exit of the park.

Product 2b: Stay Focused

Once inside, another community chaperone will be expected to watch over the children. Thus, there will be multiple timer-enabled posts throughout the playground to ensure their awareness. Every 15 minutes, a button at the top of each post will activate to test the alertness of the chaperone. The chaperone must then press a button on any of the posts to confirm his/her presence and alertness. The status of the chaperone can then be accessed by the parent via the home device.

0

Parts List

 1 x Particle Photon  

1 x Blue LED

3 x Button

15 x Jumper Cables

1 x Resistors

Wood for case housing

0

Wiring

0

Code

0
int ledPin = D0;
int buttonPin = D1;
int buttonPinEnter = D3;
int buttonPinLeave = D2;
bool chapIn = FALSE;
int Aware_Timer = 0;

void setup()
{
  pinMode(buttonPin , INPUT_PULLUP);
  pinMode(buttonPinEnter , INPUT_PULLUP);
  pinMode(buttonPinLeave , INPUT_PULLUP);
  pinMode(ledPin , OUTPUT);
}
// If button is pressed, green light turned on and then off using a timer
void loop()
{
  int buttonState = digitalRead(buttonPin);
  int buttonStateEnter = digitalRead(buttonPinEnter);
  int buttonStateLeave = digitalRead(buttonPinLeave);

  // Handles case of RFID scan in
  if(buttonStateEnter == HIGH) {
    chapIn = TRUE;
    Particle.publish("DIOT2018yellow","HIGH");
    Particle.publish("DIOT2018blue","LOW");
  }
  //Handles case of chaperone leaving without the Aware button active
  if(buttonStateLeave == HIGH){
    chapIn = FALSE;
    Particle.publish("DIOT2018green","LOW");
    Particle.publish("DIOT2018yellow","LOW");
    Particle.publish("DIOT2018blue","HIGH");
  }
  //Handles case of Aware button press with interval checks to see if chaperone has left
  if(buttonState == HIGH) {
    Particle.publish("DIOT2018green","HIGH");
    Particle.publish("DIOT2018yellow","LOW");
    Particle.publish("DIOT2018blue","LOW");
    digitalWrite(ledPin, HIGH);
    while(Aware_Timer < 10000 && chapIn == TRUE){
      Aware_Timer += 100;
      char intervalCheck = digitalRead(buttonPinLeave);
      if (intervalCheck == 'HIGH') {
        Particle.publish("DIOT2018green","LOW");
        Particle.publish("DIOT2018yellow","LOW");
        Particle.publish("DIOT2018blue","HIGH");
        digitalWrite(ledPin, LOW);
        break;
      }
    }
    Aware_Timer = 0;
  }
}
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

This device allows chaperones to broadcast the community that they are inside of the park and are actively watching the children