Difference between revisions of "SimpleBot NodeBots Examples"

From Open Hardware Miniconf
Jump to: navigation, search
(Created page with "== Build Firmata == cd ~/simplebot cd firmware/ino/SBSFirmata ino clean && ino build ino upload -p /dev/ttyS99 == Run the examples== cd ~/simplebot # Pixel example no...")
 
(Build Firmata)
Line 1: Line 1:
 
== Build Firmata ==
 
== Build Firmata ==
 +
 +
SimpleBot uses a combination of the Raspberry Pi (running Linux) and an Arduino-compatible board called the PiLeven (running Firmata) to control the robot and read from sensors. The SD card image provided in the kit includes the full Arduino IDE and supporting tools to allow you to develop Arduino code directly on the bot and upload it to the PiLeven.
 +
 +
The NodeBots examples rely on the PiLeven running a sketch that implements the "Firmata" protocol, which slaves it to the Raspberry Pi and communicates via serial. This effectively turns the PiLeven into an I/O board for the Pi, providing a standard protocol for the Pi to access the PiLeven's header pins and devices that are plugged into it.
 +
 +
Before running the NodeBots examples, the PiLeven needs to be flashed with firmware called `SBSFirmata`, which is a version of Firmata that specifically supports the features of the SimpleBot Shield provided in the kit.
 +
 +
Build and install Firmata on the PiLeven by running the following commands on the Raspberry Pi:
  
 
  cd ~/simplebot
 
  cd ~/simplebot

Revision as of 02:41, 9 January 2015

Build Firmata

SimpleBot uses a combination of the Raspberry Pi (running Linux) and an Arduino-compatible board called the PiLeven (running Firmata) to control the robot and read from sensors. The SD card image provided in the kit includes the full Arduino IDE and supporting tools to allow you to develop Arduino code directly on the bot and upload it to the PiLeven.

The NodeBots examples rely on the PiLeven running a sketch that implements the "Firmata" protocol, which slaves it to the Raspberry Pi and communicates via serial. This effectively turns the PiLeven into an I/O board for the Pi, providing a standard protocol for the Pi to access the PiLeven's header pins and devices that are plugged into it.

Before running the NodeBots examples, the PiLeven needs to be flashed with firmware called `SBSFirmata`, which is a version of Firmata that specifically supports the features of the SimpleBot Shield provided in the kit.

Build and install Firmata on the PiLeven by running the following commands on the Raspberry Pi:

cd ~/simplebot
cd firmware/ino/SBSFirmata
ino clean && ino build
ino upload -p /dev/ttyS99

Run the examples

cd ~/simplebot
# Pixel example
node examples/SimpleBotShield/np.js /dev/ttyS99
# Driving example
node examples/SimpleBotShield/simplebot.js /dev/ttyS99
# Ping example
node examples/SimpleBotShield/ping.js /dev/ttyS99