Install Nodejs
https://nodejs.org/en/download/package-manager/
Install dependencies with
npm install
Launch the app
node app.js
- First download MongoDB for your system Mongo Website
- Create /data/db directories in your root folder
- Then navigate to the bin directory of the downloaded folder
- Run the mongo server (needs to have root permissions)
sudo mongod --port 6969
- Then in other terminal run
sudo mongo --port 6969
This should connect you with the mongodb server running in other terminal - Run the homebase server
node homebase_server.js
- Run the rover server to post data to homebase
node rover_server.js
To see if data was stored in the database in the terminal with mongo client running run this command
db.data.find()
This should show all the data inserted into the database
If you want to change the data passed in the rover_server.js file modify the post_data object to whatever you want
Will need to have id in order for it to work
- Start the joystick server first
node joystick_receiver.js
- Then start the joystick sender
node Joystick_Sender.js
- Play with the joystick
As of now it only works on linux machines
Might need to install joystick module on linux
sudo apt-get install joystick
- Run jstest
jstest /dev/input/js0
- Watch the values change