Friday, October 15, 2010

Arduino fork of Turtle Art

I tried the Arduino fork (here) (or here) of Turtle Art. This version of the Arduino fork (based on V86) can co-exist with Turtle Blocks. There is another based on V80.

I first loaded Firmata into the Arduino using the Arduino software on a PC. Then I tried to control the Arduino from Turtle Art but got errors:

OS19 Sugar 0.90 fails to start TurtleArtActivity.py", line 834
OS373pyg Sugar 0.88 fails to start TurtleArtActivity.py", line 834
OS373pyg Gnome starts but fails firmata.py line 140
OS67 Sugar 0.84 fails to start permission denied opening USB0
OS67 Gnome permission denied opening USB0
OS67 Gnome (as Superuser) starts but fails firmata.py line 140
OS767 Sugar 0.82 permission denied opening USB0


Then realised that TurtleArt and the Arduino were set to different baud rates causing the error at firmata.py line 140:

I edited file taarduino.py line 5 to set the baud rate to 57600

class TAArduino(object):
def __init__(self, baud=57600):

To match the setting in Arduino Standard Firmata (loaded into the Arduino board) line 274

Firmata.begin(57600);

Thes gets Arduino working under Gnome under OS373pyg (and presumably OS67 in Gnome as superuser). The following blocks will flash the light on output 13

To get it working under Sugar (OS373pyg), and presumably Sugar 0.88 and 0.90 builds the following dirty hack worked:
TurtleArtActivity.py, line 834
replace
self.palette_buttons[i].set_tooltip(HELP_STRINGS[name])
with
self.palette_buttons[i].set_tooltip("thing")

There is another version,
http://people.sugarlabs.org/rafael/TurtleArdu.xo

This can not co-exist with Turtle Blocks, you need to uninstall Turtle blocks first.
After that it still fails on import serial
on OS373pyg. Copy a serial directory from the other version
into the Activity directory gets past that bug.
You also need to set the baud rate as described.

Oscilloscope

Labels: , , , ,

1 Comments:

Blogger Dirakx said...

Great post Tony, we should be working in new version of turtleardu, to have compatibility with the new TA plug-in scheme, and b) have the possibility to
download the generated code form TA to the Arduino chip, w/o necessity of having a serial cable connected to the board.

Monday, March 07, 2011 3:17:00 PM  

Post a Comment

<< Home