Made by Linyi Zhou

Found in DIoT 2018 1- Home Hack

Use light to tell people the arrival of their bus.


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.



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.  



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. 



1. Particle Photon x1

2. RGB LED light  x1

3. Wires xn

4. Resistos xn

5.Port Authoriy Official api



#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(){


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




void loop(){

unsigned long now = millis();

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

lastTime = now;




if (prdTime >= 12){


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



Click to Expand
Normal State
Bus coming state
Event in Particle Console
Share this Project


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

Use light to tell people the arrival of their bus.


January 25th, 2018