ProtoSnap Contributors Guide/Upload: Difference between revisions

From OLPC
Jump to navigation Jump to search
(update for 13.2.6, mkdir for lib not needed now)
 
(3 intermediate revisions by the same user not shown)
Line 5: Line 5:
This does not need to be done for ProtoSnaps that have been supplied with StandardFirmata already uploaded. Adam Holt has some of these.
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 [[Release_notes/13.2.0|13.2.0]].
These instructions have been tested on the XO-1 and XO-4 Touch laptop using the latest [[Release_notes/13.2.6|13.2.6]].


Once the ProtoSnap has been programmed with the StandardFirmata, it can be used with TurtleBlocks.
Once the ProtoSnap has been programmed with the StandardFirmata, it can be used with TurtleBlocks.
Line 15: Line 15:


==Recipe==
==Recipe==
* Install [[Release_notes/13.2.0|13.2.0]] onto your XO laptop
* Install [[Release_notes/13.2.6|13.2.6]] onto your XO laptop
* Connect your XO to Wifi Internet ([http://laptop.org/start/neighborhoodview.shtml Neighborhood View] = F1 key)
* Connect your XO to Wifi Internet ([http://laptop.org/start/neighborhoodview.shtml Neighborhood View] = F1 key)
* Open the Terminal Activity (within Sugar's "List View" in the top-right of the [http://laptop.org/start/homeview.shtml Home View] = F3 key)
* Open the Terminal Activity (within Sugar's "List View" in the top-right of the [http://laptop.org/start/homeview.shtml Home View] = F3 key)
Line 21: Line 21:
rm -rf Library Activities/{Scratch*,TamTam*,Speak*,Help*,Memo*}
rm -rf Library Activities/{Scratch*,TamTam*,Speak*,Help*,Memo*}
* Install the ino packages. Type this:
* Install the ino packages. Type this:
sudo yum install -y ino
sudo yum install -y ino make
:(This costs 18MB of download data).
:(This costs 18MB of download data).
* Create a project directory. Type this:
* Create a project directory. Type this:
Line 27: Line 27:
cd firmata
cd firmata
ino init
ino init
mkdir lib
* Correct a packaging error in "ino". Type this:
* Correct a packaging error in "ino". Type this:
sudo mkdir /usr/share/arduino/hardware/tools
sudo mkdir /usr/share/arduino/hardware/tools
Line 43: Line 42:


* 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.
* 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 [[Arduino#Ingredients|installing the Arduino IDE]] and using it to [[Arduino#Firmata|upload StandardFirmata]], but it requires much more download data.


=== programmer is not responding ===
=== programmer is not responding ===
Line 57: Line 57:
* [http://inotool.org/ Ino], a command line toolkit for working with Arduino hardware,
* [http://inotool.org/ Ino], a command line toolkit for working with Arduino hardware,
* [http://inotool.org/quickstart Ino quick start guide]
* [http://inotool.org/quickstart Ino quick start guide]
* [https://github.com/amperka/ino/issues/175 ino#175] may help if Robot_Control library breaks build, fix is to remove the {{code|/usr/share/arduino/libraries/Robot_Control}} directory.


== Notes ==
== Notes ==

Latest revision as of 01:55, 17 November 2015

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
 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/>