ProtoSnap Contributors Guide/Upload
Jump to navigation
Jump to search
How to upload StandardFirmata to a ProtoSnap.
This only needs to be done once for a ProtoSnap.
This does not need to be done for ProtoSnaps that have been supplied with StandardFirmata already uploaded. Adam Holt has some of these.
These instructions have been tested on the XO-1 and XO-4 Touch laptop using the latest 13.2.6.
Once the ProtoSnap has been programmed with the StandardFirmata, it can be used with TurtleBlocks.
Ingredients
- a ProtoSnap or Arduino Pro Mini,
- an XO laptop,
- a USB cable connecting both.
Recipe
- Install 13.2.6 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 the ino packages. Type this:
sudo yum install -y ino make
- (This costs 18MB of download data).
- Create a project directory. Type this:
mkdir firmata cd firmata ino init
- Correct a packaging error in "ino". Type this:
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. Type this:
cp /usr/share/arduino/libraries/Firmata/examples/StandardFirmata/StandardFirmata.ino ./src/sketch.ino ino build
- Plug in a "USB-A to mini-USB" cable<ref>available for about $USD 1 from monoprice.com</ref>, connecting your XO to the ProtoSnap. Type this::
ino upload
- Check that the ProtoSnap's bright white light turns on.
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.
- a much easier method is available, by installing the Arduino IDE and using it to upload StandardFirmata, but it requires much more download data.
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!
- sometimes the Modem Manager process sends modem commands to a newly attached Arduino, in the hope that it is a USB modem. Give it a minute to give up, and try the upload again. See serial adapters for more information on this problem.
See Also
- Arduino
- Ino, a command line toolkit for working with Arduino hardware,
- Ino quick start guide
- ino#175 may help if Robot_Control library breaks build, fix is to remove the /usr/share/arduino/libraries/Robot_Control directory.
Notes
<references/>