Headband Helper Log
Contents
- 1 Links
- 2 Week of January 27th - February 2nd
- 3 Week of February 3rd - February 9th
- 4 Week of February 10th - February 16th
- 5 Week of February 17th - February 23rd
- 6 Week of February 24th - March 2nd
- 7 Week of March 3rd - March 9th
- 8 Week of March 10th-16th
- 9 Week of March 17th-23rd
- 10 Week of March 24th-March 30th
- 11 Week of March 31st-April 6th
Links
Week of January 27th - February 2nd
Monday 1/28:
- Met with Professor Feher and Ethan Shry (TA) to discuss which direction to take our project. In the end, we settled on doing a wearable headband that has a Rasberry Pi and accelerometer that can collect impact data and transmit it to a web platform for interpretation (Jarrod, Katy, 30 min).
Thursday 1/21:
- Researched causes of concussions and CTE. Determined that tracking many minor collisions with the purpose of developing a conclusion about an individual's risk for CTE would be challenging because there is limited research in that area. Decided instead to continue forward with tracking concussions, which occur when an individual sustains 95g's to the head (Jarrod, Katy, 30 min)
Friday 2/1:
- 3rd class meeting and discussed our next steps for project development (Jarrod, Katy, 1 hour)
- Updated our Wiki page (finalized name "Headband Helper")
- Assigned the nightlight project and the blackjack project.
- Jarrod will focus on the nightlight project
- Katy will focus on blackjack
- Katy was briefed after class on the blackjack project, while Jarrod continued formatting the Wiki page and updated the weekly log. We will likely meet over the weekend before our Monday meeting to finalize project proposal and discuss scheduling.
Sunday 2/3:
- Started blackjack project (downloaded Node, set up MySQL database- unsure of step about creating project directory) (Katy, 2 hours)
- Reformatted wiki page, with updates including: reworked Gantt Chart, updated budget, challenges, and minor format changes (Jarrod, 30 minutes)
- Researched parts necessary to build network, and settled on an accelerometer (see link on main page) (Jarrod, 45 minutes)
- Learning how to add an image to the wiki took a long time (Jarrod, 45 minutes).
Week of February 3rd - February 9th
Monday 2/4:
- Worked on blackjack tutorial- configured & built API using Node.js (Katy, 1.5 hours)
- Worked on nightlight tutorial- built circuit in breadboard, flashed the Rasberry pi, and started pi on a monitor (Jarrod, 2 hours).
- Entire team (including professor and TA) met to discuss what to do moving forward, namely: what type of communications our project would use, what our final design will look like, and possible stretch objectives. (Jarrod, Katy, 30 minutes)
Thursday 2/7:
- Continued to research our accelerometer system and how to implement it with respect to our system. Also discussed system design and what final product will look like/steps it will take to get there. (Jarrod, Katy, 1 hour)
Friday 2/8:
- Had weekly meeting in Cupples II. Discussed what we needed to have by our Monday meeting with TA and Professor, as well as what parts we should order (Jarrod, Katy, 45 minutes)
Saturday 2/9:
- Created presentation for Friday (Katy, 1 hour)
- Continued working on blackjack tutorial- created API routes, client webpage, researched asynchronous HTTP calls (Katy, 1 hour).
Week of February 10th - February 16th
Monday, 2/11:
- Entire team met to discuss project. Discussed accelerometers and batteries to order, need to improve Gantt chart, wiki page, and presentation (Jarrod, Katy, 30 minutes)
- Updated Gantt chart (Jarrod, Katy, 30 minutes)
- Researched batteries (Jarrod, Katy, 30 minutes)
- Determined 1000mAh battery is sufficient (based on research from this website[1]) (Katy, 15 minutes)
- Updated Wiki (Katy, 15 minutes)
- Began SSHing with the raspberry pi; got to the point where I can send a test email from the pi to my email address (Jarrod, 1 hour)
Friday, 2/15:
- Had weekly meeting in Cupples II, watched presentations by other groups. Also discussed ordering parts, determined we will start by using a larger battery for simplicity and then miniaturize later if possible (Jarrod, Katy, 1 hour)
Saturday, 2/16:
- Finished Blackjack tutorial, however when attempting to test it using npm start command, received an error saying "Cannot find module 'mysql'" Attempted to debug this error and noticed that my package.json file does not have a section titled requirements which contains the four packages (axios, mysql, express, & body-parser) although it does contain a node_modules folder with hundreds of subfolders. There are four files in the node_modules folder titled axios, mysql, express, & body-parser, but I'm not sure they are the same as the ones I am missing in my package.json folder. (Katy, 1 hour).
- Created rough draft of database schema (Katy, 30 minutes)
- Finished SSHing tutorial for the Raspberry Pi. Troubleshooting took the majority of time, with problems including: inability to launch certain command functions; failing to transmit actual IP address in reboot email; and getting the device to connect to Wi-Fi. However, all debugging was successfull, and pi performs as expected. (Jarrod, 1 hour and 30 minutes).
- Updated Gantt Chart with post-Spring Break goals, and worked on presentation. (Jarrod, 30 minutes).
- Created rough draft of API routes (Katy, 30 minutes)
Week of February 17th - February 23rd
Monday, 2/18:
- Entire team met to discuss project. Discussed strategies for communication from Pi to the internet. We are considering adding a WiFi dongle to the Pi to allow it to simultaneously receive data from the helmets and broadcast this data to the server. Also discussed preliminary strategies for filtering data, as well as goals for upcoming week. (Jarrod, Katy, 30 minutes)
- Walked through API routes and database structure with Ethan following the meeting. Will attach picture of updated database structure and post link to updated API routes. (Jarrod, Katy, 30 minutes)
- Link to API route[2]
- Worked on AWS Lightsail tutorial. Got through spinning up a server instance, configuring the static IP, and installing the server software (nodejs/pm2) (Katy, 1 hour).
- Worked on Pi/LED function. First step was to build a circuit and write code that would turn the LED on from the Pi, which was successfully done. Next, worked on adding input/output functionality to circuit (using a button). Ideally, want the light to turn on when button is pressed, off when released. This took a while, and I was unsuccessful on my first attempt: plan on returning another time during this week. All coding was done with python directly through the Pi's terminal. Two files created: LED.py and button.py. Wired circuit to GPIO pins on pi, and learned what they all do (via google search of pi 3 B+ pinout). One fun troubleshooting mishap: was trying to use male-male wire to connect to GPIO pins, and didn't realize why it was so hard. After asking TA, learned they had male-female wires, which were infinitely more effective. (Jarrod, 1 hour 30 minutes).
Tuesday, 2/19:
- Continued work on input/output via GPIO pins on pi. Scrapped code button.py and found a different website, made new file called button2.py (clever) and wired the system. See picture of wired system. LED turns on when button is pressed, and off when released. Additionally, on/off appears in command window. Next Steps will likely be to add a blink code, that makes LED blink when button is pressed. (Jarrod, 1 Hour 15 minutes).
Thursday, 2/20:
- Worked on presentation, rehearsed (Jarrod, Katy, 45 minutes)
Friday, 2/22:
- Class meeting- presented proposal (Jarrod, Katy, 45 minutes)
- Accelerometers arrived!
Saturday, 2/23:
- updated database schema diagram (Katy, 30 minutes)
- worked on AWS Lightsail tutorial- finished except encountered a problem specifying the name SERVER_SCRIPT_PORT for the Port range in my new firewall rule (Katy, 1 hour)
- created FSM (wireframe) diagram for web interface (Katy, 1 hour)
Goals for next week:
- accelerometer arrived so Jarrod will be focusing on testing and getting it working with the pi
- Katy will be working on implementing API routes
Week of February 24th - March 2nd
Monday 2/25
- Met with TA and professor. Discussed goals for the coming week, and what needs to be accomplished before Spring Break. Jarrod needs to get the accelerometer working with the pi (able to get readings with input). Additionally, a case needs to be built for the night light, and need to SSH into the Pi Zero W. Katy needs to focus on getting the Pis talking before the break. This will be challenging, especially given the number of midterms coming up before the break, so time management will play a huge role. (Jarrod, Katy, 1 hour)
- After meeting, worked with Ethan on updating web interface structure and trying to get one final element of the AWS Lightsail tutorial to work. We were unable to troubleshoot the error because a specific command kept causing the server to fail (?). Will keep trying later this week and potentially spin down this server instance and spin up a new one. (Katy, 30 minutes)
- Time Spent: (Jarrod, 1 hour) (Katy, 1.5 hours)
Thursday 2/28
- Researched Raspberry Pi ad hoc IP network, what an ad hoc network even entails. Will start trying to things this weekend. (Katy, 1.5 hours)
- Main links:
- What is an ad hoc IP network? https://en.wikipedia.org/wiki/Wireless_ad_hoc_network
- How to configure on raspberry pi? https://wiki.debian.org/WiFi/AdHoc
- Other helpful links
- https://raspberrypi.stackexchange.com/questions/37920/how-do-i-set-up-networking-wifi-static-ip-address
- https://classes.engineering.wustl.edu/ese205/core/index.php?title=Ad-Hoc_Network_%2B_Raspberry_Pi
- https://lcdev.dk/2012/11/18/raspberry-pi-tutorial-connect-to-wifi-or-create-an-encrypted-dhcp-enabled-ad-hoc-network-as-fallback/
- Main links:
- Time spent: Katy, 1.5 hours
Friday 3/1
- Spent an hour and a half trying to SSH into Pi zero (flashing SD, getting parts, realizing I was missing a cable, finding the missing cable, etc.). After I had everything needed, realized that I had no HDMI converter, and so couldn't connect to a monitor to configure the Pi. Finally decided to move on and try and hook up accelerometer to the pi 3. Then spent 30 minutes researching how to create acceleremoter system, including the wiring of the circuit, if there was any existing code I could use/modify to run the system, and electrical requirements and other details about the interface. Attempted to modify code to fit my specific accelerometer, but need to verify I did it correctly before I'm ready to run the system.
- Worked on getting ad hoc IP network set up (Katy, 2 hours)
- I will primarily be following this tutorial: https://wiki.debian.org/WiFi/AdHoc
- not sure whether I should be modifying the /etc/network/interfaces.d file or /etc/dhcpcd.conf file
- I ended up trying to write my changes to /etc/network/interfaces.d but when I tried to save them I received an error message saying "Can't open file to write"
- I also tried to go through command line following this tutorial https://classes.engineering.wustl.edu/ese205/core/index.php?title=Ad-Hoc_Network_%2B_Raspberry_Pi but when I did I received an error saying "Error for wireless request "Set Mode": SET failed on device wlan0; Device or resource busy"
- Time Spent: (Jarrod, 2 hours 30 minutes, Katy 2 hours)
Goals for next week:
- finish ad hoc IP network (Katy)
- get it set up on the pi 0W, test communications
- conduct testing on accelerometer (Jarrod and Katy)
Week of March 3rd - March 9th
Sunday 3/3
- Successfully wrote to etc/network/interfaces file on the pi 3 using nano command (Katy, 30 minutes)
- tried setting up configurations on pi 0W but I was unable to get the pi to connect to the monitor station (despite having the microHDMI and microUSB converters)
- Total Time: Katy 30 minutes
Monday 3/4
- Met with TA and Professor. Discussed goals for upcoming week and spring break. (Jarrod, Katy, 30 minutes)
- Goals:
- establish pi to pi communication
- webpage hosted on AWS that says "hello world" (static output)
- webpage hosted on AWS that displays a number which is incremented every time a button on the pi is pushed
- master pi communicating with AWS and headband pi simultaneously
- wireframe diagram
- Goals:
- Enabled SSH on pi 0W (Katy, 30 minutes)
- attempted to finish ad-hoc set up on pi 0W- however, ran into an error I couldn't resolve so I decide to follow a tutorial suggested by Ethan in which the master pi essentially becomes a router (Katy, 1 hour)
- Total Time: Jarrod 30 minutes, Katy 2 hours
Friday 3/8
- Attempted to get accelerometer working. Could not find tutorial for my specific part, so used a similar tutorial and hoped to modify to work for my part. After wiring and coding, ran the program, but couldn't get it to work. Pi is on, but doesn't record any types of hits. Didn't have headers, so just touched wires to part, which I think is my primary problem. Need to troubleshoot. (Jarrod, 2 hours).
- Found headers, learned how to solder, and soldered both accelerometer and pi 0 (Jarrod, 30 minutes).
Week of March 10th-16th
SPRING BREAK Friday 3/15
- attempted to reverse actions from previous networking tutorial and complete the new tutorial where the pi 3 acts as an access point/router in the network. First challenge I ran into was getting the pi3 to connect to the internet because I had disabled the connection to wustl guest through my first tutorial so I had to debug that. Then after completing the new tutorial I was unable to get hostapd to start. As a result, I'm going to reflash the SD card tomorrow (I have saved Jarrod's files to an SD card) (Katy, 2.5 hours)
- rebooted AWS lightsail instance and got server running via pm2 commands. Also made changes to index.html so output is a static "Hello World" displayed on localhost port 4000. However, when I tried to pull these changes on the lightsail server, I ran into the same issue where the "page could not be found" (Katy, 45 minutes)
- Total time: Katy 3 hours 15 minutes
Saturday 3/16
- Created wireframe diagram (Katy 1 hour)
- while I was doing this I also downloaded Raspian and Etcher to reflash SD card on the pi 3
- Researched wifi dongle (Katy 30 minutes)
- reconfigured pi3, moved jarrod's files back over (Katy, 30 minutes)
- didn't have time to redo the tutorial today, I will come in tomorrow morning and do that so I can ask for help Monday if needed
- Total time: Katy 2 hours
Goals for next week
- once wifi dongle arrives, have master pi communicating to the helmet pi and AWS simultaneously
- configure server so webpage displays data sent from master pi
- start working on API routes? or configure database? I just feel like we need to start working towards getting the webpage working
Week of March 17th-23rd
Sunday 3/17
- redid tutorial to establish pi 3 as an access point/router. I was able to connect to the network on my laptop so I believe it was successful. Interesting note (mostly for Ethan), I ran into the same hostapd is masked problem again when trying to start hostapd. To troubleshoot, I did the following commands: sudo systemctl unmask hostapd, sudo systemctl enable hostapd,sudo systemctl start hostapd, and it worked! Found that advice from https://github.com/raspberrypi/documentation/issues/1018
- also moved Jarrod's files back over to the pi3
Total time: Katy, 30 minutes
Monday 3/18:
- Discussed goals for week, including network setup and accelerometer configuration. (Katy, Jarrod, 30 minutes)
- Worked on SSHing the Pi 0, and attempted to troubleshoot accelerometer again with little luck. (Jarrod, 1 hour)
Total time: Jarrod, 1.5 hours, Katy, 30 minutes
Thursday 3/21
- Got accelerometer code working, and fleshed out next steps for communicating data to server. Additionally, googled a lot of info about python in general. (Jarrod, 2 hours)
Total time: Jarrod, 2 hours
Friday 3/22
- got express server running on pi3 with simple api route "greeting" (Katy, 1.5 hours)
- wifi dongle arrived so sideline pi now can simultaneously communicate with helmet pi and AWS
- created another express server running on pi3 through a different port, sent data from one node to the other (Katy, 30 minutes)
Total time: Katy, 2 hours
Saturday 3/23
- got database instance spun up (Katy, 1 hour)
- got data from database displayed on pi (Katy, 30 minutes)
Total time: Katy, 1.5 hours
Goals for next week:
- Flesh out API routes so all the API routes specified early this semester are complete
- work on html so data is presented on webpage
- get actual readings from helmet pi to sideline pi and then from sideline pi to web interface
Week of March 24th-March 30th
Monday 3/25
- Weekly meeting with TA and professor; discussed steps moving forward, beginning final report, etc.
Saturday 3/30
- Spent time researching python code to alter current acc.py script to send data in desired format; Saved webpage for reference, will implement the following Monday, 4/1 (Jarrod, 1 hour 30 min)
- Researched Headbands to put buy for prototype (Jarrod, 15 min)
- Began a rough draft of Final Report (Jarrod, 30 min)
Goals For Next Week
- Get Pi 0 to talk to Pi 3
- Design Case for accelerometer
- Finish Rough Draft of Design and Solutions Wiki
Week of March 31st-April 6th
Monday 4/1
- Group Meeting. Next steps and what to do moving forward discussed. Nothing major. (Jarrod, Katy, 30 min)
Wednesday 4/3
- Jarrod and Katy met to discuss how to send data from pi zero to pi 3. Could not figure it out, will meet with TA tomorrow to work towards a solution. (Jarrod, Katy 1 hour).
- Worked on Designs and Solutions portion of Wiki, specifically, Module 1: Building the Accelerometer. Will continue to work on before Friday. (Jarrod, 1 hour 30 min)
- Read through the log to get a better understanding of Katy's part, googling as I went and following links in the log to get as clear a picture as possible. Also made minor grammatical and format edits to both log and main page. Additionally, uploaded several images onto main wiki page for use when creating the Design and Solution rough draft. (Jarrod, 1 hour).
Friday 4/5
- class meeting to discuss final deadlines, etc. (Jarrod, Katy, 30minutes)
- configured API route on pi 0 to post data to pi 3 in packets of 50 (Katy, Jarrod, 2 hours)
Saturday 4/6
- worked on function for routing data from pi 0 to pi 3 to mysql database (Katy, 1 hour)
- still need to test but I couldn't get the pi zero script to run when I tried
- wrote API routes, html, and javascript to search by player and by team (Katy, 2 hours)
- I attempted to link all of these, however I'm having a hard time figuring out how to actually get the data to display on the webpage (I'm pretty sure the database query is being executed and the results are being returned but I just dont' know how to display them)