Skip to content

corky/AutoBit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AutoBit

The LinkItOne directory contains the files need to run the LinkItOne device as the AutoBit, Automobile Activity Tracker.

The NodeJS directory contains the backend application server that the AutoBit device communicates with.

The case directory contains the files needed to print the case for the AutoBit on a 3d printer.

###Backend Service setup

  1. Run npm install to get the necessary dependancies installed

  2. modify the appServer.js to the publically accessible IP address of the computer you are deploying the backend service on. Look for YOUR_PUBLIC_IPADDRESS_HERE and replace it with your IP address.

  3. start the service by typing node appServer.js. On some devices (like a raspberry pi) you need to be administrator to start a node JS service that binds to a public IP address. In that case run sudo node appServer.js

  4. there is a sql script to load sample data into your nodeJS service/database if you wish, to play around with the UI. (If you have existing data...ie existing logs/tags you dont want to lose, then make a backup copy of the gpsDatabase.db file).

run sqlite3 gpsDatabase.db < sampledata.sql

To revert from the sample data, you can stop the service, and delete the gpsDatabase.db file and restart the service and a new database will be created for you. If you made a backup, simply stop the service, copy your backup gpsDatabase.db file over the existing one and restart the service and your existing database will be used.

  1. you can test the nodeJS rest service by running the following commands in a tool like Postman.

POST http://IP_ADDRESS_OF_BACKEND_SERVICE:9082/logs { "startTime" : 1447350771, "startLon" : "118.369052W", "startLat" : "34.051655N", "endTime" : 1447350794, "endLon" : "118.369052W", "endLat" : "34.051655N" }

GET http://IP_ADDRESS_OF_BACKEND_SERVICE:9082/logs

###LinkIt One setup

  1. Setup your linkit one development environment within the Arduino IDE.

  2. Load the AutoBit.ino file in the IDE. Configure the sketch with your local environment settings including: WIFI name, WIFI password, and the IP Address of the backend server the AutoBit will communicate with. (This will be the IP address of where you deployed the NodeJS Server above.

  3. Compile and upload your sketch to the LinkIt One

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published