Find file History
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
..
Failed to load latest commit information.
calibrate
examples
src
test
.babelrc
.editorconfig
.eslintignore
.eslintrc
.gitignore
.travis.yml
CHANGELOG.md
CONTRIBUTING.md
LICENSE.md
README.md
install.sh
package.json
uninstall.sh

README.md

GoPiGo3 for Node.js

The GoPiGo3 is a delightful and complete robot for the Raspberry Pi that turns your Pi into a fully operating robot. GoPiGo3 is a mobile robotic platform for the Raspberry Pi developed by Dexter Industries.

 GoPiGo3 Raspberry Pi Robot

Raspbian for Robots

You can find all software and installation for the GoPiGo3 on an SD Card by using our operating system Raspbian for Robots. You can download and install Raspbian for Robots for free with instructions found here.

 GoPiGo3 Raspberry Pi Robot

You can also purchase an SD Card with the software on it here.

Installation

You can install the GoPiGo3 on your own operating system with the following commands in the command line:

  1. Clone this repository onto the Raspberry Pi:

     `sudo git clone http://www.github.com/DexterInd/GoPiGo3.git /home/pi/Dexter/GoPiGo3`
    
  2. Run the install script: sudo bash /home/pi/Dexter/GoPiGo3/Install/install.sh

  3. Reboot the Raspberry Pi to make the settings take effect: sudo reboot

Install/Update Node.js

This library supports Node.js 8.x version, we provide a couple of bash scripts to install/uninstall the proper Node.js version. To install NVM (Node Version Manager), Node.js and NPM:

  1. Run the install script: bash /home/pi/Dexter/GoPiGo3/Software/NodeJS/install.sh
  2. Follow the instructions

To uninstall NVM, Node.js and NPM:

  1. Run the install script: bash /home/pi/Dexter/GoPiGo3/Software/NodeJS/uninstall.sh
  2. Follow the instructions

Use in your application

This library is published as a NPM package.

  1. Install the package in your project by typing the following command in your project's folder: npm install node-gopigo3 --save
  2. Include the package in your application: const EasyGopigo3 = require('node-gopigo3').EasyGopigo3 or const Gopigo3 = require('node-gopigo3').Gopigo3

How your application may look like

const EasyGopigo3 = require('node-gopigo3').EasyGopigo3;

const easyGoPiGo3 = new EasyGopigo3();
const myLed = easyGoPiGo3.initLed('AD1');

// Turn on the led
myLed.lightOn(30);

// Turn off the led
myLed.lightOff();

For any initial hint please check the "examples" folder. Feel free to use the forum for any extra help.

License

Please review the LICENSE.md file for license information.

See Also

Notes for developers

Features

Commands

  • npm run clean - Remove lib/ directory
  • npm test - Run tests. Tests can be written with ES6 (WOW!)
  • npm test:watch - You can even re-run tests on file changes!
  • npm run cover - Yes. You can even cover ES6 code.
  • npm run lint - We recommend using airbnb-config. It's fantastic.
  • npm run test:examples - We recommend writing examples on pure JS for better understanding module usage.
  • npm run build - Do some magic with ES6 to create ES5 code.