Alarm Buddy

Made by Yifan ZHU

Found in DioT 2019: Augmented Objects

Alarm Buddy is a gamified IoT device which can help you wake up on time in the morning.

0

Intention

The target audience of this IoT appliance is the people who may turn off the alarm clock when they are not totally awake in the morning such as my roommate and me. We have two pain points here:

  • Getting up in the morning is always difficult for us.
  • People may turn off the alarm when they are not totally awake and fall asleep again unconsciously. Therefore, they possibly miss some important events. (e.g. missing the online meeting for IPD class)
0

Goal

A gamified alarm which will turn on according to the lightness outside and turn off when users are totally awake.

0

Process

I interviewed my roommate and learned that he has often been unable to get up because of the cold weather. I suddenly found out that I often encountered such problems. Since we are using the phone's own alarm clock, we only have two options, snooze and stop, when we wake up every day. However, when we are not fully awake, we often unconsciously turn off the alarm clock. At the same time, we sometimes want to sleep late because the weather is too cold. But we all want to optimize our schedule and strive to get up early and get up early. Therefore, I thought of designing an alarm clock that can be turned on according to the skylight. The user needs to complete a game with certain difficulty before it can be closed. This process of completing the game can make people fully awake.

My full process:

1. Interview

2. Get the insight

3. Ideation

4. Build the circuit

5. Test code

6. Use Neopixel library for Particle, adjust and test code


0

Outcome




List of Parts:

  • 1 Breadboard
  • 1 Particle Argon
  • 1 FSR Sensor
  • 1 Photoresistor
  • 1 RGB LED
  • 1 Piezo Buzzer
  • 1 Red LED
  • 1 White LED 
  • 4 Resistors
  • 1 USB Micro B Cable
  • 17 Jumper Wires
0

Introduction

Alarm buddy will turn on the alarm when it is dawn in the morning and turns on the lights in your room. (In the circuit, a white LED  indicates the lights in your room.) And the RGB LED will change its color among red, blue and green every three seconds. The mission of this game is pressing the FSR Sensor during the RGB LED is red three times. While pressing the FSR Sensor, the red LED will be on which shows that you press the sensor successfully. And the rule is that only a one-second pressing will be counted as a successful motion and you need to complete the motion three times to turn off the light and the buzzer. By the way, if you press while the RGB LED is not red, you will receive punishment and need to press more time to get the next successful pressing. At the same time, you can see how many times you have pressed successfully on the website.

0

The Video Shows how Alarm Buddy Works

0

My Circuit

0

Code

0
// This #include statement was automatically added by the Particle IDE.
#include <neopixel.h>


#define PIXEL_COUNT 1
#define PIXEL_PIN D7
#define PIXEL_TYPE WS2812B
Adafruit_NeoPixel strip(PIXEL_COUNT, PIXEL_PIN, PIXEL_TYPE);

int redValue = 255; // Full brightness for an ANODE RGB LED is 0, and off 255
int greenValue = 255; // Full brightness for an ANODE RGB LED is 0, and off 255
int blueValue = 255; // Full brightness for an ANODE RGB LED is 0, and off 255</td>


int photoCellPin = A0;
int fsrPin = A2;
int photoCellReading = 0;
int ledPin = D3;
int ledBrightness = 0;
int fsrReading = 0;
int ledPinRed = D4;
int ledBrightnessRed = 0;
int hit = 0;
int HIT = 0;
int number = 0;
int NUMBER = 0;
int speakerPin = D2;




void setup() {
    pinMode(ledPin, OUTPUT);
    pinMode(ledPinRed, OUTPUT);
    Particle.variable("light", &photoCellReading, INT);
    strip.begin();
    pinMode( speakerPin, OUTPUT );
}

void loop() {
    photoCellReading = analogRead(photoCellPin);
    fsrReading = analogRead(fsrPin);
    
    if( photoCellReading>600 )  
    {
        if(HIT >=3)
        {
            setRGBColor(0,0,0);
        }
        else if(NUMBER % 3 == 0)
        {
            setRGBColor(255,0,0);
        }
        else if(NUMBER % 3 == 1)
        {
            setRGBColor(0,255,0);
        }
        else 
        {
            setRGBColor(0,0,255);
        }
        
        
        if(HIT >= 3)
        {
            digitalWrite( ledPin, LOW);
            noTone(speakerPin);
        }
        else
        {
            digitalWrite( ledPin, HIGH);
            tone(speakerPin,500,50);
        }
        
    }
    else{
    digitalWrite( ledPin, LOW);
    setRGBColor(0,0,0);
    noTone(speakerPin);
    }
  
    if(fsrReading>1500)
    {
        if(NUMBER % 3 == 0)
        {
            hit=hit + 1;
            digitalWrite( ledPinRed, HIGH);
        }
        else
        {
            hit=hit - 1;
        }
    }
    else
    {
        digitalWrite( ledPinRed, LOW);
    }



    if(number==30)
    {
        number=0;
        NUMBER=NUMBER + 1;
    }
    else
    {number=number + 1;}
    
    if(hit==10)
    {
        hit=0;
        HIT=HIT + 1;
        NUMBER=NUMBER +1;
        number=0;
    }
    
    Particle.variable("HIT", &HIT, INT );
    
    delay(100);
    
    
    
}


void setRGBColor( int r, int g, int b ){
  redValue = r;
  greenValue = g;
  blueValue = b;

  strip.setPixelColor(0, redValue, greenValue, blueValue);
  strip.show();
}
Click to Expand
0

Next Steps

In the next stage, firstly, I will try to connect the IoT with the phone so that you can customize the light and the sound of the alarm. Secondly, I'm thinking about promoting the using experience. I conducted the usability test with my roommate and he thinks it's a little difficult for him to know the game progress. I may add more LED as the progress bar.

0

Reflection

I think I almost got where I wanted, however, there is also some regret because of the limitation of my knowledge and the time. I spent most of the time writing the code to recognize the pressing and count the number of the motion. I use many nested if statement to archive my goal. I used to think about uploading the time to internet and let the phone interact with users, however, I haven't got the idea about how to archive this target.

0




x
Share this Project

Courses

49713 Designing for the Internet of Things

· 18 members

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


About

Alarm Buddy is a gamified IoT device which can help you wake up on time in the morning.

Created

February 1st, 2019