Bus Tracker
Inspiration and Details
My inspiration for this project comes from using the Transit App. In the mornings, I would like to know how long it is going to take for the bus to come, but I also need to get ready in the time it takes. To solve this problem, I envisioned a visual bus tracker that uses a combination of lights and audio to alert the user when a bus is far away (no rush), getting close (gotta rush), and has passed. This bus tracker will start with options for inbound and outbound and for the 61C and 61D routes. The user can choose which way to be alerted: lights or sound and lights.
Logic Equations
The user has a choice between 61C outbound, 61C inbound, 61D outbound, and 61D inbound. This choice will output which bus to track, and this data will be used for further equations. The abbreviations are 61C -> C, 61D -> D, outbound -> O, and inbound -> I.
(C AND O) XOR (C AND I) XOR (D AND O) XOR (D AND I) -> tracking is valid
(C AND O) -> tracking 61C outbound
(C AND I) -> tracking 61C inbound
(D AND O) -> tracking 61D outbound
(D AND I) -> tracking 61D inbound
The next part is to send this information to the bus API and receive a time until arrival. With this new info, we can decide how to alert the user. If the bus is 10 minutes or higher away, the user is will see a green light or/and hear slow-paced music (depending on their selection). If arrival time is between 10 minutes and 5 minutes, a yellow light is activated and the music is increased in speed. Last, when the arrival time is less than 5 minutes, the red light starts flashing and the music is fast-paced. The lights and music can start at any point depending on when the data is sent back. Inputs: far away -> F, closer -> C, in range -> R, alert with music and light -> A. Outputs: red, yellow, green, fast, med, slow.
R -> RE
R AND A -> RE AND FS
C -> Y
C AND A -> Y AND ME
F -> G
F AND A -> G AND SL
Truth Tables
Most combinations for the user input and the data calculation will not be valid. The first table leaves out input combinations that will not work, while the second table shows Xs in such spots.
Logic Diagrams
Designs into Maquette