ProtoSnap Contributors Guide
This ProtoSnap Contributors Guide connects your XO to the real world of electronics, sensors and activators -- using SparkFun's $29.95 ProtoSnap - Pro Mini. We use the Logo-like TurtleBlocks visual programming environment initially, but later Scratch & Etoys are expected too. Please ask questions on the unleashkids@googlegroups.com mailing list! You can join right here: http://groups.google.com/group/unleashkids
These instructions have been tested on the XO-1 and XO-4 Touch laptop using the latest 13.2.0.
Some deployments are using older releases such as 11.3.1 in Haiti 2013. This release has not yet been tested.
Loosely speaking, this 5-phase install will proceed as follows:
- install requirements
- setup build environment
- build it
- upload it (to the ProtoSnap board)
- install the TurtleBlocks plugin
Once the ProtoSnap has been programmed with the StandardFirmata, only the last step is needed on each subsequent laptop.
Recipe
- Install 13.2.0 onto your XO laptop
- Connect your XO to Wifi Internet (Neighborhood View = F1 key)
- Open the Terminal Activity (within Sugar's "List View" in the top-right of the Home View = F3 key)
- On an XO-1 the 1 GB of flash is not enough to do the following installs (an extra 133 MB is needed). So you will need to make space first. One tested method is to delete the Library (72 MB) and several Sugar activities such as Scratch (59 MB), Speak (19 MB) and TamTam (20 MB), which you can reinstall later if necessary, or reflash,
rm -rf Library Activities/{Scratch*,TamTam*,Speak*,Help*,Memo*}
- Install 3 packages, each of which take a couple minutes to install. Run:
sudo yum install -y ino git make
- Run the following 4 commands to create a project directory:
mkdir firmata cd firmata ino init mkdir lib
- Correct a packaging error in "ino", running these 2 commands:
sudo mkdir /usr/share/arduino/hardware/tools sudo cp /etc/avrdude/avrdude.conf /usr/share/arduino/hardware/tools
- Copy the StandardFirmata source into the project directory and build it:
cp /usr/share/arduino/libraries/Firmata/examples/StandardFirmata/StandardFirmata.ino ./src/sketch.ino ino build
- Plug in a "USB-A to mini-USB" cable, connecting your XO to the ProtoSnap (Ian can provide these, or 80 cents @ monoprice.com). Then run:
ino upload
- ProtoSnap's bright white light will turn on! Finally, run:
git clone https://github.com/itdaniher/turtleblocks-arduino.git ~/Activities/TurtleBlocks.activity/plugins/arduino
- Return to Sugar's Activity wheel (Home View) and launch the TurtleBlocks Activity. Load the sample TurtleBlocks project here:
http://wiki.laptop.org/go/File:TurtleBlocks_Activity.ta
- Go hog wild in TurtleBlocks, thanks!! Please submit all priority bug reports to our mailing list: unleashkids@googlegroups.com (join @ http://groups.google.com/group/unleashkids)
Screenshots
FAQ
why is this not easier?
- nobody has stepped up to package this into a Sugar activity, and it is only needed once for each ProtoSnap, not once for each laptop.
programmer is not responding
- The Arduino Pro Mini supplied on the ProtoSnap is different to the Arduino Pro Mini sold alone, in that it has the Arduino Uno bootloader. Since ino defaults to uno, this is normally harmless. If using an Arduino Pro Mini sold alone, create a default .inorc file:
echo board-model = pro5v328 >> ~/.inorc
- "Sometimes the proMini gets stuck and needs a manual reset to reprogram. Try programming it again, and hit the RESET button just before the code is downloaded to the board. This often fixes the board. Afterwards, you shouldn't need to do this again. Hopefully." Thanks to the amazing Brian Huang at SparkFun!
See Also
- Arduino
- Ino, a command line toolkit for working with Arduino hardware,
- Ino quick start guide