ProtoSnap Contributors Guide: Difference between revisions

From OLPC
Jump to navigation Jump to search
(tested 13.2.0, there is no problem with RAM on XO-1, but there is a problem with available FLASH)
(git can be installed, no need to avoid)
Line 2: Line 2:
This ProtoSnap Contributors Guide connects your XO to the real world of electronics, sensors and activators -- using SparkFun's $29.95 [https://www.sparkfun.com/products/10889 ProtoSnap - Pro Mini]. We use the Logo-like [http://wiki.sugarlabs.org/go/Activities/Turtle_Blocks 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
This ProtoSnap Contributors Guide connects your XO to the real world of electronics, sensors and activators -- using SparkFun's $29.95 [https://www.sparkfun.com/products/10889 ProtoSnap - Pro Mini]. We use the Logo-like [http://wiki.sugarlabs.org/go/Activities/Turtle_Blocks 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-4 Touch laptop, and should run on XO-1 ([http://schoolserver.wordpress.com/ George Hunt] working on it), XO-1.5, XO-1.75 too. But [https://twitter.com/itdaniher Ian Daniher] will investigate whether [http://inotool.org/ "ino"] below can be made to run on [[Release_notes/11.3.1|OLPC Release 11.3.1]] (based on Fedora 14) commonly used in Haiti as of 2013.
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]].

Some deployments are using older releases such as [[Release_notes/11.3.1|11.3.1]] in Haiti 2013. This release has not yet been tested.


Loosely speaking, this 5-phase install will proceed as follows:
Loosely speaking, this 5-phase install will proceed as follows:
Line 36: Line 38:
* ProtoSnap's bright white light will turn on! Finally, run:
* ProtoSnap's bright white light will turn on! Finally, run:
git clone <nowiki>https://github.com/itdaniher/turtleblocks-arduino.git</nowiki> ~/Activities/TurtleBlocks.activity/plugins/arduino
git clone <nowiki>https://github.com/itdaniher/turtleblocks-arduino.git</nowiki> ~/Activities/TurtleBlocks.activity/plugins/arduino
* Or run this script, (to avoid needing to install git as noted above):
wget <nowiki>https://github.com/itdaniher/turtleblocks-arduino/archive/master.zip</nowiki>
unzip master.zip
mv turtleblocks-arduino-master/ ~/Activities/TurtleBlocks.activity/plugins/arduino/
* Return to Sugar's Activity wheel (Home View) and launch the TurtleBlocks Activity. Load the sample TurtleBlocks project here:
* 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
http://wiki.laptop.org/go/File:TurtleBlocks_Activity.ta

Revision as of 00:53, 9 August 2013

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:

  1. install requirements
  2. setup build environment
  3. build it
  4. upload it (to the SparkFun board)
  5. install the TurtleBlocks plugin

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 possible 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*}
  • Install 3 packages, each of which take a couple minutes to install. Run:
 sudo yum install -y ino git make
  • Create a default .inorc file to identify the Arduino Pro Mini 5V/16MHz which is included in the ProtoSnap:
 echo board-model = pro5v328 >> ~/.inorc
  • 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

Screenshots

Screenshot of TurtleBlocks Activity 3.png Itdaniher--photo.JPG

FAQ

"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