Busglancer

Made by Linyi Zhou

Found in DIoT 2018 1- Home Hack

Use light to tell people the arrival of their bus.

0

Problem Statement

I am designing this device for my roommate. Last terms it occured several times that my roommate was so obessed with his codes that he missed the bus to school. It means he has to wait for anothe 15~20 minutes. Thus I decide to design a IoT device which reminds him of the arrival of the bus. At the same time this device should not draw too much attention when he is working on his code.

0

Goal

Busglancer is inspired by an app called Busgazer. Busgazer gives people live data about the bus schedule at a stop. I decide to redesign the app into an ambient display. The device uses LED light to remind my roommates of the bus about ten minutes ahead of its arrival. I resist the temptation to use sound as the indicator cause I think sound is too intrusive. In contrast light is glanceable and aesthetic, and it consumes less attention when he does not want to know the schedule. That is why I name the ambient device Busglancer.  

0

Process

To work as an ambient display and remind my roommate the coming of the bus, the device should have the following functions:

1.Collect the data of the bus route at the stop near our apartment from an api.

2.Grab the predicted arrival time of the next bus from the raw data.

3.Use light behavior to remind my roommate of the coming before it arrival.

4.If it is too late for them to catch the bus, there is no need to remind them.

5.When there is no bus coming in a period, the device should not catch too much attention

I use the official Port Authority api to get the predicted arrival time of the bus 71D at the stop around our apartment.  In the code I set the device to get the data from the api in every two minutes and compare the arrival time (in what minutes the bus will arrive) with 12 minutes, because it usually takes us 10 minutes to walk to the bus stop. If a bus is coming, the led light will flash in red. If there is no bus coming, the led will fade from red to green to blue and go back to red. And if there is only 6 minutes before the bus arrives, the led light will go back to normal state. There is no way we can catch a bus in 6 minutes, even if we rush to the stop. 

0

Components

1. Particle Photon x1

2. RGB LED light  x1

3. Wires xn

4. Resistos xn

5.Port Authoriy Official api

0

Outcome

0
#include "rgb-controls.h"

using namespace RGBControls;

Led led(D0, D1,D2);

Color red(255,0,0);

Color green(0,255,0);

Color blue(0,0,255);

Color dark(0,0,0);

Color colors[3] = {red, green, blue};

unsigned long lastTime = 0;

int prdTime;

void getBus(){

Particle.publish("busgazer", PRIVATE);

}

void handleBusgazerReceived(const char *event, const char *data){

prdTime = String( data ).toInt();

}

void setup(){

Serial.begin(9600);

Particle.subscribe("hook-response/busgazer", handleBusgazerReceived, MY_DEVICES);

getBus();

Serial.println(prdTime);

}

void loop(){

unsigned long now = millis();

if ((now - lastTime) >= 120000){

lastTime = now;

getBus();

Serial.println(prdTime);

}

if (prdTime >= 12){

led.fade(colors,3,5000);}

else if(prdTime<=12 and prdTime>=6){

led.fade(red,dark,2000);

}

}
Click to Expand
0
Normal State
0
Bus coming state
0
Event in Particle Console
Webhook
0
x
Share this Project

Courses

49713 Designing for the Internet of Things

· 25 members

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


Focused on
About

Use light to tell people the arrival of their bus.

Created

January 25th, 2018