Skip to content
This repository has been archived by the owner on May 11, 2020. It is now read-only.

lluiscampos/trevaling

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

trevaling

Build Status Coverage Status Dependencies Status

Trevaling is about traveling, traveling is about learning, learning is about coding, and coding is about trevaling


   PHILAE                             COMET67P             ROSETTA
   _____|--)         _                _________            _________
  |     |          (`  ).            |         |          |         |
  | C++ | <----> (       '`.  <----> | node.js |  <---->  | html/js |
  |_____|        (         )         |_________|          |_________|
                  ` __.:'-'

Requirements

node ecosystem

Rosetta and Comet67P require node.js v4 or higher. From Ubuntu 16.04 onwards the official Ubuntu repositories can be used:

apt-get install nodejs npm

For older Ubuntu versions, it is required to use nodesource script:

curl -sL https://deb.nodesource.com/setup_4.x | sudo -E bash -
apt-get install nodejs npm

Once nodejs and npm are installed, install grunt:

npm install -g grunt

Tip: install nodejs-legacy or create a manual symlink to deal with legacy code expecting "node" to be nodejs on Ubuntu/Debian systems.

apt-get install nodejs-legacy

Rosetta

Roseta is an HTML/javascript static frontend to follow the current trevaling.

Install dependencies and build the app:

npm install
grunt build

Run lint:

grunt lint

To run the tests open the file test/index.html from a browser.

Alternatively, grunt can be used:

grunt test

Comet67P

Comet67P is a node.js module responsable for tracking the current trevaling and serving the API with all the data

Install dependencies:

npm install

Run lint:

npm run comet67p_lint

Run tests (with coverage):

npm run comet67p_test-cov

Start application:

npm start

environment variables

Comet67p module requires access to your device on Particle Cloud and to Open Signal API.

Tokens to these APIs shall be provided as environment variables in an .env file or directly on the node.js process:

OPEN_SIGNAL_API_KEY=<your_api_key_here>
PARTICLE_CLOUD_TOKEN=<your_token_here>

Philae

Philae is a particle.io firmware that reads network identification information and publish it through the cloud

Standalone mode on PC

Install dependencies (ubuntu):

apt-get install libboost-test-dev lcov vera++

Compile with gcc:

make
make test

Firmware for particle.io

Install dependencies (ubuntu):

npm -g install particle-cli
apt-get install dfu-util openssl

Log in into your particle account and compile the firmware:

particle cloud login
make particle

Flash the device via serial:

sudo particle flash --serial bin/firmware_[version].bin

References to documentation

javascript stack

comet67p libraries and APIs

rosetta libraries

nodejs developement tools

philae