Edison Head Impact System
![ProjectGoalsFlowDiagram.jpg](/proxy/?url=https://content.instructables.com/FVE/ADBE/ILV8C4W8/FVEADBEILV8C4W8.jpg&filename=ProjectGoalsFlowDiagram.jpg)
The goal of this project was to create a device that monitors the intensity of head impacts and detects impacts that have a high likelihood of producing a concussion. In youth football, this medical device can be an additional “set of eyes” overseeing the safety of the players and notifying coaches when something’s wrong.
****************************REMEMBER TO BACKUP ORIGINAL EDISON FREQUENTLY****************************
Setup Intel Edison
![Screen Shot 2016-03-20 at 5.36.45 PM.png](/proxy/?url=https://content.instructables.com/F9O/TRAF/ILV8C8DZ/F9OTRAFILV8C8DZ.png&filename=Screen Shot 2016-03-20 at 5.36.45 PM.png)
Go to this Website: https://software.intel.com/en-us/get-started-ediso...
FOLLOW the instructions THOROUGHLY and complete the Installation Process/Firmware Update.
Setup the Wifi: configure_edison --wifi
Setup the Name: configure_edison --name
Setup the Password: configure_edison --password
Setup the Date:
rm /etc/localtime
ln -s /usr/share/zoneinfo/America/Chicago /etc/localtime
ls -l /etc/localtime
Setup RTIMULib
![Screen Shot 2015-12-24 at 4.43.02 PM.png](/proxy/?url=https://content.instructables.com/FFB/MDHN/ILV8C88Q/FFBMDHNILV8C88Q.png&filename=Screen Shot 2015-12-24 at 4.43.02 PM.png)
Download RTIMULib Zip File onto Laptop: https://github.com/RTIMULib
Use SFTP to transfer the unzipped RTIMULib File into the Intel Edison's root directory.
Enter these commands to install RTIMULib's Linux system:
Create /etc/ld.so.conf and add the line: "/usr/local/lib"
Under the RTIMULib Library enter these commands:
mkdir build
cd build
cmake ..
make -j4
make install
ldconfig
Under the /Linux/RTIMULibCal Library enter these commands:
make -j4
make install
Under the /Linux/python Library enter these commands:
python setup.py build
python setup.py install
Java and Tomcat Setup
![Screen Shot 2015-12-24 at 4.46.06 PM.png](/proxy/?url=https://content.instructables.com/FYI/NF33/IM6LF0LB/FYINF33IM6LF0LB.png&filename=Screen Shot 2015-12-24 at 4.46.06 PM.png)
![Screen Shot 2015-12-28 at 11.16.43 PM.png](/proxy/?url=https://content.instructables.com/FQU/SLOV/IM6LF0VU/FQUSLOVIM6LF0VU.png&filename=Screen Shot 2015-12-28 at 11.16.43 PM.png)
Once completing the RTIMULib Setup, download the most recent Python programs and "Players Info" Folder from the most recent Edison backup through an SFTP Session.
***REMEMBER TO BACKUP ORIGINAL EDISON FREQUENTLY
You have to add Java:
mkdir java
cd java
Move jdk.blah.blah.blah.tar.gz from backup to edison via SFTP Session
tar -zxvf TARNAME
Now, for the TOMCAT, here's how to download and setup the web server (starting from the root directory):
mkdir tomcat
cd tomcat
Move apache-tomcat-blah-blah.#.#.#.tar.gz (**Not exact file format) from backup to edison via SFTP Session
tar -zxvf TARNAME
cd apache-tomcat-9.0.0.M1/conf
vim tomcat-users.xml
*Delete the Comment around the Roles and add a line under the list with "roles="manager-gui"/>"
vim context.xml
*Change "" line to " privileged="true">"
cd ../bin
vim startup.sh
*Add "export JAVA_HOME=/home/root/java/"
vim shutdown.sh
*Add "export JAVA_HOME=/home/root/java/"
Now Check if the Web server can be started through "./startup.sh" and shutdown through "./shutdown.sh" under the bin folder.
**Ignore "Catalina Server may not be running" error, and try startup and shutdown a few more times...
EHIS to Executable and Auto Web Server
![Screen Shot 2016-08-09 at 2.01.49 PM.png](/proxy/?url=https://content.instructables.com/FXB/M7WD/IRNSN1NI/FXBM7WDIRNSN1NI.png&filename=Screen Shot 2016-08-09 at 2.01.49 PM.png)
Creating eHIS Executable Program:
Add "#!/usr/bin/python2.7" to the top of eHISprogram.py
Then Enter Command: chmod u+x eHISprogram.py
Automating Web Server:
mkdir /etc/init.d
cd init.d
MOVE edison.sh from Backup to init.d dir via SFTP
EDIT edison.sh by Changing Locations of startup.sh and shutdown.sh
chmod 755 edison.sh
update-rc.d edison.sh defaults
Setting Up Ubidots (Cloud) Device
![Screen Shot 2016-08-09 at 2.13.13 PM.png](/proxy/?url=https://content.instructables.com/FBH/TDZI/IRNSNMNN/FBHTDZIIRNSNMNN.png&filename=Screen Shot 2016-08-09 at 2.13.13 PM.png)
Enter Commands from root Directory:
cd RTIMULib-master/Linux/python/tests/OfficialSFprograms/
python eHISnewCloudSource.py
Configure Device Variables:
Sign into Account at https://ubidots.com/
Click on Sources Tab
Click on the Device
Click on the impact_Graph Variable
Copy the Variable ID
*cd RTIMULib-master/Linux/python/tests/OfficialSFprograms/
*vim eHIS.py
*PASTE the impact_Graph Variable ID under the quotations of impact_Graph = api.get_variable("")
**REPEAT for other 3 Variables
Setting and Testing TomCat Webserver
![Screen Shot 2015-12-28 at 11.16.43 PM.png](/proxy/?url=https://content.instructables.com/FS8/WONF/IM6LGGS5/FS8WONFIM6LGGS5.png&filename=Screen Shot 2015-12-28 at 11.16.43 PM.png)
***You need the Original Edison's Most Recent Backup for this process
Steps to Install and Run Local Edison Webserver:
Through an SFTP Session, copy the Edisonwar folder and the Edisonwar.war file from backup into the /home/root/tomcat/apache-tomcat-9.0.0.M1/webapps directory.
Startup the Webserver
Go to the Host Manager on the browser using "rikseddy#.local:8080" and check if the EdisonWar App is listed
Access the EdisonWar App and Check Out the Impact Table...
Finally, test the Edison Head Impact System program:
./eHISprogram
***If there are "file not existing" or "directory not existing" errors, fix them by copying those files/directories from the backup into their respective directories.
Check the Local Host's Web Server:
Access the local host using "localhost:8080" on the Mac and access Player2 under the Chartwar
Check if the Impact data table has updated with the most recent data from testing the python program.