[Sugar-devel] TA Lego WeDo plugin -- review and notes

Martin Langhoff martin.langhoff at gmail.com
Thu Mar 24 11:13:58 EDT 2011


Hi Ian,

[ I've shortened the CC list a bit :-) ]

I like your work and I'd like to help you get this ready for inclusion
in Fedora and in OLPC's builds.

 - There is a lego-udevrules package underway, that has a udev rule
for WeDo and NXT. So it's good that you mention it in your README for
people who install from source, but you don't need to worry about it

 - We will want to package your WeDo Python module as a separate rpm.
I have reviewed it it a bit, and I like it. There are a few things
that can make it go from good to very good to excellent, and I'd like
to see if we can go through that exercise before I package it.

It is a good idea to "invest" on the Python module, because then it
can be used more widely -- for example from Pippy!

   - "WeDoMore" is the best name for your overall project. For the
Python module, however, I suggest just 'wedo' -- this makes it easier
for packagers and users.

   - Fedora (f9, f11 and f14) has pyusb 0.4.1 -- F9 and F11 is what's
in the field today for OLPC deployments. F14 is what'll be next. Your
code seems to be using a different pyusb API (perhaps pyusb 1.x?). For
example, see
     http://code.google.com/p/nxt-python/source/browse/trunk/nxt/usbsock.py

   - In general, I would suggest that you have a quick look at the
nxt_python project. Some of the API ideas there are very good, and
worthy of imitating (great artists... steal :-) ). For example, it is
a good idea to have constants for the different motors and sensors --
something like

   from wedo.motor import Motor, PORT_A, PORT_B, PORT_C
   from wedo.sensor import Tilt
   from wedo.sensor import PORT_1, PORT_2, PORT_3, PORT_4

so you can later call

   tiltvalue = Tilt(brick, PORT_2)

Let me know what you think.

My WeDo kit should arrive soon, so I can start testing and working
more in depth.

cheers,


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


More information about the Sugar-devel mailing list