smart mirror summer report

11
CSS 498, Summer 2016 Jessica Nguyen, Jonathan Velazquez, Jabari Barton, Burhan Nurdin The Smart Mirror Project Report By H[app]iness Development To be reviewed by Jeff Kim

Upload: jabari-barton

Post on 09-Apr-2017

96 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Smart Mirror Summer Report

CSS 498, Summer 2016Jessica Nguyen, Jonathan Velazquez, Jabari Barton, Burhan Nurdin

The Smart Mirror Project ReportBy H[app]iness Development

To be reviewed by Jeff Kim

Page 2: Smart Mirror Summer Report

Table Of ContentsI. OverviewII. EquipmentIII. APIs UsedIV. ChangesV. StrugglesVI. Contribution LogVII. Final ProductVIII. Take-AwaysIX. Price Breakdown

2

...................................................3..............................................3...............................................4

.................................................4................................................5

................................6.......................................7......................................7

...............................9

Page 3: Smart Mirror Summer Report

The purpose of this independent study project was for us to learn about and experience creating deliverable software products, and being able to create and integrate hardware with a user interface. Our team learned how to pull information from an RSS feed (for UWB calendar events) and various APIs using JSON Objects (for weather, bus schedule, traffic conditions/incidents) that is displayed on a LCD screen. GPIO motion sensors are used to “swipe” between different modules.

We used a Raspberry Pi 3 to power our product. The small, portable design of the Pi is perfect for our purpose since we are building a slim casing for the mirror frame. It is also an affordable and powerful tool.

We are using two Ultrasonic Module Distance GPIO Sensors to navigate between modules in our program. These work much better because they measure at what distance the interruption (activator) happens. This way, we can say any interruptions within 1 inch of the sensor will trigger the right or left sliding module (depending on which sensor was triggered.)

For the main piece of hardware, we are using an LCD TV monitor. We are the using an HDMI out on the Raspberry Pi to display it our software GUI. With all the unforeseen circumstances, we have decided to make this a display and not include the mirror-like film on the display just yet. After adding all of the other modules, the mirror film makes a lot of the information hard to read on the display and we would rather have more functionality than the originally intended aesthetic. See pictures of all equipment on pages 10-11.

I. Overview

II. Equipment

3

Page 4: Smart Mirror Summer Report

Here is a list of APIs that we are pulling information from:

III. APIs Used

4

UWB Trumba events calendar RSS feedWunderground Weather APIGoogle Maps APIOneBusAway API

The changes we made to the project from what we completed last quarter include both software and hardware changes. We changed the overall basis of the GUI and optimized it with a different API. In the beginning, we were using the JPanel API to display onto the screen but after experimentation with different APIs we later changed to JavaFX due to its simpler format and cleaner output. We also added the other modules that we had originally outlined in our wireframe. This includes the traffic information, using the Google Maps API, which displays the congested traffic areas/incidents (such as car accidents and construction routes) near campus. This page also shows a longer, written list of hazards to avoid on the roadways. Another added module is the bus schedule which shows when each bus is supposed to arrive on campus. The final module that we added this quarter is the school events page. This page displays a list of upcoming events on UWB’s campus, taken from the UWB Trumba calendar RSS feed.

As for hardware, we added three more sensors, for a total of four, for switching between different modules: Go left, go right, scroll up, scroll down.

IV. Changes

Page 5: Smart Mirror Summer Report

V. Struggles

5

Our team faced many challenges during the duration of this project. The hardware aspect of this project was the most difficult challenge we faced, by far. None of our group members were very experienced with dealing with hardware, so we had to turn our attention to other sources online to help us. Learning how to hook up the sensors properly with the breadboard and connect them properly back to the Raspberry Pi was a feat that, although successful, resulted in several pieces of broken equipment.

Another issue we had was dealing with the new API that we decided to use, JavaFX. Although the implementation was much simpler than the other API’s we researched and experimented with, learning how to use JavaFX was still problematic in the beginning. Eventually we all learned how to utilize its basic functions and other more advanced functions in order to use the API for our needs.

It may sound very cliché but one of the biggest struggles we had to face was ourselves. Getting everyone together in the summer after a long, hard school year required a lot of effort. In addition, we all were attending other summer classes and wanted to focus more on those. In the end, we got together and put many hours into the project week after week until it came to its fruition.

Page 6: Smart Mirror Summer Report

Here is a list of all parts of the project that each group member has contributed to.

VI. Contribution Log

6

Page 7: Smart Mirror Summer Report

Through our struggles, the final product turned out very well. The product displays the current date, the 7 day weather forecast for Bothell, traffic status in the Bothell area along with road hazards, bus schedule, and UWB’s own upcoming school events. Users are able to swipe left or right and scroll up or down by activating the motion sensors on the sides of the screen.

There are a few touch ups that are necessary to complete before the project will be completely done in our eyes. The first task we will do is mounting the sensors in their appropriate locations along the edge of the LCD screen so users are able to move to the next or previous page and scroll up or down. We also will need to add the reflective glass screen to the LCD TV to actually make it a mirror. Lastly, we need to fix small bugs and other usability issues in the software. We plan on having our project on display in the ARC building on campus for students to take advantage of its features. We are glad that we can be a part of something that makes our campus a little bit better.

VII. Final Product

This project took much more time to complete than we anticipated, and it was definitely a lot more difficult than we had first thought.

There was a lot of research we did to help us succeed in the progression of this project. We learned a lot during this time, and will continue to do so.

Though the CSSE coursework at UWB has given us a lot of the foundation and basics that we needed to tackle this project, there was much more that we took upon ourselves to learn outside the classroom.

VIII. Take-Aways

7

Page 8: Smart Mirror Summer Report

The take-aways do not differentiate very much from the previous quarter because we were mainly expanding on the skills that we learned last quarter with this project. The biggest things that we have learned during the entire independent study project include the following:

All of these skills are valuable with real-world applicability and will definitely apply to all of our future careers. We are proud of what we have been able to accomplish this quarter and are even more excited to see what we can accomplish next quarter.

Learning how to use JavaFX libraryLearning / programming PythonTroubleshooting Raspberry Pi Software compatibility with different JDKs, versions of Python, and various Python packagesPersistence under harsh conditionsPulling from APIs and using JSON, GSON, and RSSImplementing runnable threads in PythonCreating a GUI that we can deploy our product withLearning how circuit boards workConnecting hardware pieces to our circuit boardsWriting interactive code that will read the input information from the hardwareHow to collaborate on code remotely using version control soft-ware (Git / GitHub)How to work effectively in a team in terms of timeline, splitting up and delegating tasks, scheduling to fit everybody’s needs, maintaining mutual levels of motivation and work ethic, and common understanding of goals.

8

Page 9: Smart Mirror Summer Report

Pyroelectric Infrared Motion SensorsSource: Amazon.com

Price: $4.95

Use: To listen for the motion gestures of the user and totrigger the navigation between modules.

CanaKit Raspberry Pi 3 Starter Kit - 32 GB Edition

Includes:

Source: Amazon.com

Price: $89.99

Use: To power the Smart Mirror and to run the program(s) that we write to create the GUI, manage the modules’ functionality, retrieve and display information, and to keep the mirror running continuously.

Raspberry Pi 3 (1.2 GHz, 1 GB RAM)On-board WiFi On-board Bluetooth32 GB Micro SD Card (Class 10)CanaKit 2.5A Power Supply5ft Micro USB CableNoise FilterRaspberry Pi 3 Case6.5ft HDMI CableHeat SinkCanaKit GPIO to Breadboard Interface BoardRibbon CableLarge BreadboardJumper Wires8 x LEDs (Blue/Red/Yellow/Green)

15 x Resistors2 x Push Button Switches

Includes:5 x PIR Sensors

9

Page 10: Smart Mirror Summer Report

One-Way Mirror FilmSource: Amazon.com

Price: $9.99

Use: Turn the glass of the TV monitor into areflective mirror surface.

Infrared LED BulbsSource: Amazon.com

Price: $9.99

Use: To test our circuit connections on the RPi3, so we know if we are correctly connecting our wires and parts.

Ultrasonic Module Distance SensorsSource: Amazon.com

Price: $49.99

Use: To listen for the motion gestures of the user and to trigger the navigation between modules more accurately than the PIR sensors.

37” Vizio LCD TVSource: Craigslist Seattle

Price: $50.00

Use: To act as a display for the Smart Mirror.

Includes:TV w/ PowerSupply Cord

Includes:7 x UMD Sensors

Includes:50 x LED Bulbs

Includes:12in x 24in Rollof One-WayExtra DarkMirror Film

10

Page 11: Smart Mirror Summer Report

Thank you for your time.

Contact the team at:[email protected]

Jessica NguyenJonathan VelazquezBurhan NurdinJabari Barton

[email protected]@happdev.com

[email protected]@happdev.com

Contact us individually at:OR