Freitag, 27. März 2015

Midterm - plan of work

This blog post outlines our project and which work has already been done. Stay tuned for more!

Title: Facebook Alarm Clock - never snooze

Concept:
When hitting the snooze button in the mornings, you are instantly rewarded with five extra minutes of sleep. However, you should really be punished for it. This project turns hitting the snooze button into a bad thing. So our project will give you an incentive to not hit the snooze button and an incentive to get out of bed if you do hit the button. This is achieved by building a circuit that is connected to your Facebook account. Every time you hit the button, the Facebook Alarm Clock will post some embarrassing message to your Facebook account, instantly punishing you for snoozing your alarm. So if you still dare to hit the alarm, you have an incentive to get up as soon as possible to delete that post

Target audience:
Initially the target audience was I because I developed bad sleeping habits in the mornings keeping me from waking up in time. However, since waking up to an alarm is part of almost everyone’s routine, this project could really be used by anyone (with bad snoozing habits and a Facebook account).

Technical:
For this project we will be using:
  • an Arduino circuit
  • Processing
  • Facebook/the Graph API
The circuit is really quite simple. All you need is a button (which will be an analog button made from two wires) that gives a digital input to the Arduino, which will use serial communication, to trigger the Processing code that interacts with the Graph API.
All embarrassing posts will be stored in an array, from which the code will randomly pick one message that will be passed on to the graph API.

**update** now using the Twitter API instead. see below for details

Manufacturing:
For manufacturing we will attach two wires to the alarm clock that will touch when the snooze button is hit. This is the analog switch I mentioned above.

Problems:
The biggest problem is that we have not done extensive work in Processing and that I have no previous experience with the Graph API. So these are two fields I will have to explore. Luckily, there is some code online that I’ll be able to use to work with the Graph API.

After having talked to Kate (our tutor), we switched to the Twitter API since the integration appears to be easier than the Facebook/Graph API. We will probably use this project as a test run and then dabble with the Graph API once we are comfortable with the prototype.

Source codes/libraries taken from online sources:
  • Twittjer4j library for connecting to twitter: http://twitter4j.org/en/index.html
  • Processing and Twitter API for querying Twitter: https://github.com/ThomasLengeling/QueryProcessing2.0/blob/master/twitterQuery/twitterQuery.pde

Team:
Nataliya and I decided to be working on this together.

Nataliya will take care of making the actual alarm clock circuit (I have been working with the breadboard and a simple push button switch) that triggers the posting on Twitter. She will also change the ThomasLegeling code so that we will post to Twitter rather than querying Twitter.

I have set up the Twitter app account (which gives us the access tokens needed to connect to the Twitter API), established the serial communication, and added this code to the ThomasLengling code. So the push of the button on the breadboard triggers the processing code to query the Twitter API.