[Sugar-devel] TurtleBlocks driving lego NXT 2.0 -

Walter Bender walter.bender at gmail.com
Fri Jan 7 16:59:25 EST 2011


On Fri, Jan 7, 2011 at 4:54 PM, Martin Langhoff
<martin.langhoff at gmail.com> wrote:
> On Fri, Jan 7, 2011 at 4:32 PM, Rafael Enrique Ortiz Guerrero
> <rafael at sugarlabs.org> wrote:
>>> is there a standard-ish Arduino robot + sensots kit I can buy? I don't
> ...
>> No that i know, best shot for now is hacking or working with
>> handmade analogue and digital sensors, like the ones used for turtle-art
>> sensors.
>
> Hmmm. Looking at the NXT, and the little I know of Arduino, it's clear
> that to work in a user-friendly manner in something like TA, you have
> to make some assumptions about which sensor goes into each input;
> which motor to which controller, and how to pair up the tachometers
> with the right motor.
>
> That is because in a graphical programming environment, you want to
> offer "easy" sensor and motion blocks. To make that happen, you need
> those assumptions.
>
> For a full-blown programming env (C, python, etc), where users are
> expected to have variables, and can call functions with many named
> parameters, it's ok to use "raw" input/output ports. It's up to the
> user to "map" those using variables or constants.
>
> So for example, in the case of NXT, if you are going to use the
> graphical NXT-G you have to put the right sensor in the right port,
> same with motors. So NXT-G has a "read distance sensor" block  that
> you can put in an if condition. And "run left motor" block. And "run
> both motors forward, synchronized via tachometer".
>
> Those blocks make it easy and fun and that's where I think we need to be headed.
>
> So I'd strongly suggest (for an initial implementation) settling on an
> arduino set that has a couple of sensors, and 2 motors with
> tachometers. Light-color sensors are great because you can get started
> with "follow the border of the thick black line" programs.
>
> If we go that way, we can have various "modes", matching the robot and
> motor/sensor configurations -- NXT, various Arduino models, etc.
>

I think we have a pretty good handle on auto-detecting the NXT. If we
can do the same for Arduino, we can have the appropriate palettes just
appear when needed all from one codebase.

If someone wants to override the simple assumptions above, they have
the option of using a Python block and/or jumping into the code
itself. For the former, we could bundle in some examples.

-walter

> cheers,
>
>
>
> m
> --
>  martin.langhoff at gmail.com
>  martin at laptop.org -- School Server Architect
>  - ask interesting questions
>  - don't get distracted with shiny stuff  - working code first
>  - http://wiki.laptop.org/go/User:Martinlanghoff
>



-- 
Walter Bender
Sugar Labs
http://www.sugarlabs.org


More information about the Sugar-devel mailing list