ProtoSnap Contributors Guide: Difference between revisions

From OLPC
Jump to navigation Jump to search
No edit summary
No edit summary
 
(66 intermediate revisions by 4 users not shown)
Line 1: Line 1:
{{TOCright}}
This ProtoSnap Contributors/Testers Guide enabled XO-to-electronics learning using SparkFun's $29.95 [https://www.sparkfun.com/products/10889 ProtoSnap - Pro Mini]. We use TurtleArt initially, but later Scratch & Etoys are expected. Please ask questions on the unleashkids@googlegroups.com mailing list you can join 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 now retired [https://www.sparkfun.com/products/10889 ProtoSnap - Pro Mini]. We used the Logo-like [http://wiki.sugarlabs.org/go/Activities/Turtle_Blocks Turtle Blocks]<ref>Turtle Blocks was previously known as Turtle Art.</ref> visual programming environment. 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.
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]].


==Ingredients==
Loosely speaking, this 5-phase install will proceed as follows:
* a ProtoSnap or Arduino Pro Mini, with the StandardFirmata already uploaded, if not see [[/Upload|How to upload StandardFirmata to a ProtoSnap using ino]], or [[Arduino|How to upload StandardFirmata using the Arduino IDE]],
# install requirement
* an XO laptop, with OLPC OS [[Release_notes/13.2.6|13.2.6]],
# setup build environment
* a USB cable between the two.
# build it
# upload it (to the SparkFun board)
# install the TurtleArt plugin


==Recipe==
==Now down to business==
* install the [http://activities.sugarlabs.org/en-US/sugar/addon/4434 TurtleBots-22] activity<ref>TurtleBots is a repackaging of TurtleBlocks by the Butia project with the Arduino plugin already present.</ref>, and start it,
* Install http://wiki.laptop.org/go/Release_notes/13.2.0#XO-4
* plug the ProtoSnap or Arduino Pro Mini into the XO laptop using the USB cable, and wait a few seconds for the indicators to stop flashing,
* Connect your XO to Wifi Internet (using the F1 key = Neighborhood View)
* click on the palette of Arduino blocks,
* Open the Terminal Activity (Sugar's list view in the top-right)
* notice how only the ''refresh Arduino'' block is available,
* Install 3 packages, each of which take a couple minutes to install. Run:
* drag a ''refresh Arduino'' block into the main area, then click on it,
sudo yum install ino
* notice how the rest of the palette is made available; if this doesn't happen you have a problem and cannot proceed,
sudo yum install git (type "y" when asked if importing GPG key is OK)
* drag a ''pin mode'' block into the main area, drag the ''OUTPUT'' block to the mode socket on the ''pin mode'' block,
sudo yum install make
* drag a ''digital write'' block and attach it to the bottom of the ''pin mode'' block,
* Run the following 4 commands:
* click on the ''pin mode'' block, and it will run both blocks, and the D13 LED on the ProtoSnap or Arduino Pro Mini should turn on.
mkdir firmata

cd firmata
Alternatively, try our [[Media:TurtleBlocks_Activity.ta|sample TurtleBlocks project]] which uses the other LED on a ProtoSnap:
ino init

mkdir lib
Please submit all ProtoSnap bug reports to our mailing list: unleashkids@googlegroups.com (join @ http://groups.google.com/group/unleashkids), and all TurtleBlocks or TurtleBots bug reports to sugar-devel@lists.sugarlabs.org
* Correct a packaging error in "ino", running these 4 commands:

sudo mkdir /usr/share/arduino/hardware/tools
== Screenshots ==
sudo cp /etc/avrdude/avrdude.conf /usr/share/arduino/hardware/tools

cp /usr/share/arduino/libraries/Firmata/examples/StandardFirmata/StandardFirmata.ino ./src/sketch.ino
[[image:Screenshot_of_TurtleBlocks_Activity_3.png|600px]]
ino build
[[image:Itdaniher--photo.JPG|400px]]
* 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
== See Also ==
* ProtoSnap's bright white light will turn on! Finally, run:
* [[Arduino]]
git clone <nowiki>https://github.com/itdaniher/turtleblocks-arduino.git</nowiki> ~/Arduino/TurtleBlocks.activity/plugins/arduino

* Return to Sugar's Activity wheel (Home View) and launch the TurtleArt Activity. Load the sample TurtleArt project here:
== Notes ==
http://wiki.laptop.org/go/File:TurtleBlocks_Activity.ta
<references/>
* Go hog wild in TurtleArt, thanks!! Please submit all priority bug reports to our mailing list: unleashkids@googlegroups.com (join @ http://groups.google.com/group/unleashkids)

Latest revision as of 01:56, 17 November 2015

This ProtoSnap Contributors Guide connects your XO to the real world of electronics, sensors and activators -- using SparkFun's now retired ProtoSnap - Pro Mini. We used the Logo-like Turtle Blocks<ref>Turtle Blocks was previously known as Turtle Art.</ref> visual programming environment. 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.

Ingredients

Recipe

  • install the TurtleBots-22 activity<ref>TurtleBots is a repackaging of TurtleBlocks by the Butia project with the Arduino plugin already present.</ref>, and start it,
  • plug the ProtoSnap or Arduino Pro Mini into the XO laptop using the USB cable, and wait a few seconds for the indicators to stop flashing,
  • click on the palette of Arduino blocks,
  • notice how only the refresh Arduino block is available,
  • drag a refresh Arduino block into the main area, then click on it,
  • notice how the rest of the palette is made available; if this doesn't happen you have a problem and cannot proceed,
  • drag a pin mode block into the main area, drag the OUTPUT block to the mode socket on the pin mode block,
  • drag a digital write block and attach it to the bottom of the pin mode block,
  • click on the pin mode block, and it will run both blocks, and the D13 LED on the ProtoSnap or Arduino Pro Mini should turn on.

Alternatively, try our sample TurtleBlocks project which uses the other LED on a ProtoSnap:

Please submit all ProtoSnap bug reports to our mailing list: unleashkids@googlegroups.com (join @ http://groups.google.com/group/unleashkids), and all TurtleBlocks or TurtleBots bug reports to sugar-devel@lists.sugarlabs.org

Screenshots

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

See Also

Notes

<references/>