Headband Helper Log
Contents
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 (30 minutes).
Week of March 10th-16th
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. Worked on SSHing the Pi 0, and attempted to troubleshoot accelerometer again with little luck. (Jarrod, 1 hour 30 minutes)
Friday 3/22
- got express server running on pi3 with simple api route "greeting" (Katy, 1.5 hours)
- created another express server running on pi3 through a different port, sent data from one node to the other (Katy, 30 minutes)