Walter,<div><br></div><div>I have been testing it out this afternoon. It works really well.</div><div>I only have one We Do here, so I can't test out if it sees different devices.</div><div><br></div><div>There is one quirky thing. When the script is running a motor, the Stop icon disappears. Then, if you use ctrl-s to stop the script, the blocks disappear.</div>

<div><br></div><div>And a question, how do you reverse the direction of the motor?</div><div>Thanks.<br>Gerald<br><br><div class="gmail_quote">On Sat, Oct 6, 2012 at 11:46 AM, Walter Bender <span dir="ltr"><<a href="mailto:walter.bender@gmail.com" target="_blank">walter.bender@gmail.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">On Sat, Oct 6, 2012 at 1:27 AM, Alan Jhonn Aguiar Schwyn<br>
<<a href="mailto:alanjas@hotmail.com">alanjas@hotmail.com</a>> wrote:<br>
> I think that you cannot check what sensor is connected..<br>
> Butia have hotplug and show instantly that a sensor is connect.<br>
> Lego not have that, and the only check possible: get a value, if no gives<br>
> errors, maybe<br>
> there are a sensor of that type connected..<br>
><br>
>>The usual approach would be to add a device input to the blocks...<br>
>>device 1, device 2, device 3<br>
><br>
> That can works, but I don't like it taking into consideration that you have<br>
> put the port<br>
> where each sensor/motor is connected.<br>
><br>
> I think in a special block that sets the brick that you want to use.<br>
> For example:<br>
> - you have 2 bricks connected<br>
> -if you want to: read color sensor from brick 1 in port 1<br>
> -turn motor in port b of brcik 2 with power 100<br>
><br>
> The code will be:<br>
><br>
> select brick (1)<br>
> read sensor (color, port 1)<br>
> select brcik (2)<br>
> turn motor (port b, 100)<br>
><br>
> See that all the blocks no have changes, only uses the "select brick" to set<br>
> in the system, which<br>
> brick get the next functions.<br>
> The important of this change: when you have only 1 brick, the code no have<br>
> changes!<br>
><br>
> Opinions?<br>
><br>
> Regards!<br>
><br>
> Alan<br>
><br>
> ________________________________<br>
> From: <a href="mailto:gerald.ardito@gmail.com">gerald.ardito@gmail.com</a><br>
> Date: Fri, 5 Oct 2012 14:45:48 -0400<br>
> To: <a href="mailto:walter.bender@gmail.com">walter.bender@gmail.com</a><br>
> CC: <a href="mailto:alanjas@hotmail.com">alanjas@hotmail.com</a>; <a href="mailto:iaep@lists.sugarlabs.org">iaep@lists.sugarlabs.org</a>; <a href="mailto:support-gang@laptop.org">support-gang@laptop.org</a><br>
><br>
> Subject: Re: [IAEP] Turtle Blocks question<br>
><br>
> Walter,<br>
> Agreed.<br>
> I am happy to continuing working with you on this.<br>
> Gerald<br>
><br>
> On Fri, Oct 5, 2012 at 2:36 PM, Walter Bender <<a href="mailto:walter.bender@gmail.com">walter.bender@gmail.com</a>><br>
> wrote:<br>
><br>
> On Fri, Oct 5, 2012 at 2:30 PM, Dr. Gerald Ardito<br>
> <<a href="mailto:gerald.ardito@gmail.com">gerald.ardito@gmail.com</a>> wrote:<br>
>> Walter,<br>
><br>
>> if we are crossing devices?<br>
><br>
> Egon Spengler: Don't cross the streams.<br>
><br>
> The usual approach would be to add a device input to the blocks...<br>
> device 1, device 2, device 3... But also, I should do a better job of<br>
> autodetecting which sensors are available. The whole thing should be<br>
> more dynamic.<br>
><br>
> -walter<br>
><br>
> --<br>
> Walter Bender<br>
> Sugar Labs<br>
> <a href="http://www.sugarlabs.org" target="_blank">http://www.sugarlabs.org</a><br>
><br>
><br>
><br>
> _______________________________________________ IAEP -- It's An Education<br>
> Project (not a laptop project!) <a href="mailto:IAEP@lists.sugarlabs.org">IAEP@lists.sugarlabs.org</a><br>
> <a href="http://lists.sugarlabs.org/listinfo/iaep" target="_blank">http://lists.sugarlabs.org/listinfo/iaep</a><br>
<br>
</div></div>Attached is a BETA version of a new WeDo plugin that supports multiple<br>
devices. It follows a schema similar to what Alan proposes above. I<br>
only have one device, so it is not tested for multiple devices,<br>
however, it seems to work for one device and includes a new feature<br>
which tests for devices before each start, rather than just at launch,<br>
so devices and be plugged in and unplugged without having to restart<br>
Turtle Art.<br>
<br>
Feedback greatly appreciated.<br>
<br>
regards.<br>
<div class="HOEnZb"><div class="h5"><br>
-walter<br>
<br>
--<br>
Walter Bender<br>
Sugar Labs<br>
<a href="http://www.sugarlabs.org" target="_blank">http://www.sugarlabs.org</a><br>
</div></div></blockquote></div><br></div>