GoPiGo for Node.js
The GoPiGo is a delightful and complete robot for the Raspberry Pi that turns your Pi into a fully operating robot. GoPiGo is a mobile robotic platform for the Raspberry Pi developed by Dexter Industries.
Before to start you should install Node.js on your RaspberryPi and clone the repo on your local environment. Be sure to have npm installed and then you can proceed installing the package.
Go inside your Node.js application folder and type
$ npm install node-gopigo
Now you can include the module inside your application as usual:
var Gopigo =
At this point you may need to include the GoPiGo base classes:
var Commands = Gopigocommandsvar Robot = Gopigorobot
Now you can instanciate the GoPiGo, for example:
robot =minVoltage: 55criticalVoltage: 12debug: trueultrasonicSensorPin: 15
The next step is to add some listeners:
When you are ready to go you should call the init method
You'll find a more complex example in the "basicTest.js" file under the "tests" folder of the repository.
GoPiGo for the Raspberry Pi: an open source robotics platform for the Raspberry Pi. Copyright (C) 2015 Dexter Industries
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/gpl-3.0.txt.