ProtoSnap Contributors Guide: Difference between revisions

From OLPC
Jump to navigation Jump to search
(tests failed without additional .inorc file)
Line 10: Line 10:
# install the TurtleArt plugin
# install the TurtleArt plugin


==Recipe==
==Now down to business==
* Install http://wiki.laptop.org/go/Release_notes/13.2.0 onto your XO laptop
* Install http://wiki.laptop.org/go/Release_notes/13.2.0 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)
Line 17: Line 17:
* Install 3 packages, each of which take a couple minutes to install. Run:
* Install 3 packages, each of which take a couple minutes to install. Run:
sudo yum install -y ino git make
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:
* Run the following 4 commands:
echo board-model = pro5v328 >> ~/.inorc
* Run the following 4 commands to create a project directory:
mkdir firmata
mkdir firmata
cd firmata
cd firmata
ino init
ino init
mkdir lib
mkdir lib
* Correct a packaging error in "ino", running these 4 commands:
* Correct a packaging error in "ino", running these 2 commands:
sudo mkdir /usr/share/arduino/hardware/tools
sudo mkdir /usr/share/arduino/hardware/tools
sudo cp /etc/avrdude/avrdude.conf /usr/share/arduino/hardware/tools
sudo cp /etc/avrdude/avrdude.conf /usr/share/arduino/hardware/tools
* copy the StandardFirmata source into the project directory:
cp /usr/share/arduino/libraries/Firmata/examples/StandardFirmata/StandardFirmata.ino ./src/sketch.ino
cp /usr/share/arduino/libraries/Firmata/examples/StandardFirmata/StandardFirmata.ino ./src/sketch.ino
ino build
ino build
Line 44: Line 47:
[[image:Screenshot_of_TurtleBlocks_Activity_3.png|600px]]
[[image:Screenshot_of_TurtleBlocks_Activity_3.png|600px]]
[[image:Itdaniher--photo.JPG|400px]]
[[image:Itdaniher--photo.JPG|400px]]

== See Also ==
* [http://inotool.org/ Ino], a command line toolkit for working with Arduino hardware,
* [http://inotool.org/quickstart Ino quick start guide]

Revision as of 04:25, 5 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 TurtleArt 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, XO-1.5, XO-1.75 too. But Ian Daniher will investigate whether "ino" below can be made to run on OLPC Release 11.3.1 (based on Fedora 14) commonly used in Haiti as of 2013.

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 TurtleArt plugin

Recipe

  • Install http://wiki.laptop.org/go/Release_notes/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 256 MB of memory is not enough to do the following installs. So you will need to return the GUI (Graphical User Interface) memory to the system before you start the install (issue the command "sudo init 3", and hit return to log in as superuser), or temporarily add Swap,
  • 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:
 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
  • Or run this (UNTESTED) script, to avoid needing to install git, as noted above:
 wget https://github.com/itdaniher/turtleblocks-arduino/archive/master.zip
 unzip master.zip
 mv turtleblocks-arduino-master/ turtleblocks-arduino/
 mv turtleblocks-arduino/ ~/Activities/TurtleBlocks.activity/plugins/arduino/
  • Return to Sugar's Activity wheel (Home View) and launch the TurtleArt Activity. Load the sample TurtleArt project here:
 http://wiki.laptop.org/go/File:TurtleBlocks_Activity.ta

Screenshots

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

See Also