In the later evening at the dear old Verona. David Strathairn, the lead actor, is good, really good. Clooney doesn't irritate and does a great job of running the show. There are some loose ends to the plot, and the editing feels a bit weird at times. Great to see Frank Langella again.
On DVD from Dr What!.
Quick hack to fix the slow downloads: somehow the leading 0xf1
byte of a response packet from the RCX is getting lost quite often, so I
simply make it seem that if the host gets a packet from the RCX then
that packet starts with that byte. Things are a lot faster and more reliable
now. The tarball has been updated.
Using the light sensor and a circular 2x2 plate to simulate a rotation sensor is a bit tricky, not the least because the (active) light sensor readings don't seem to vary much - 50 to 54 for me. Secondly there's the question of sampling frequency, and then relating the number of events to the quantity we're really interested in (distance or angle in the case of the turtle). Oh well, I'll see what I can do.
From the point of view of interesting programming, the turtle isn't such a great starting point. The robot is severely limited in the amount of concurrent activity it can engage in; I think one could raise or lower the pen while rotating or moving, but this is hardly useful. It seems to me that the cleverer the mechanism the more limited the concurrency possibilities.
Brown has an interesting course with some labs that help with getting started. Another way to get into interesting-program-land is to sophisticate the task.
dll
is
pretty damn unreliable. (I began writing a control program for the turtle,
see. That bit's easier than I thought.) Oh well, another problem for another
day.Went out to Blacktown with Lucy to see The Nightingale's Prayer as part of the Sydney Arab Film Festival.
Couldn't sleep, so I watched the first two thirds of Bangkok Hilton.
Wow, things start working. I ripped Markus Strickler's mostly-beautiful
osx_usb.{ch}
out of the aforementioned lejOS tree and started hacking it
into brickOS's mangled dll
(dynamic linker and loader). The
code for all these sorts of tools starts out as a minor variant of Kekoa Proudfoot's seminal
work, is extended with various hacks to get things working under Windows, Linux with that new USB driver, on Solaris, etc. etc. and
ends in Mac OS X users tearing their hair out. The code started out as a
proof-of-concept and is now more-or-less unmaintainable.
Well, that's my excuse for ungently hacking out the bits I didn't need (viz the old serial device mechanisms, and Windows and Linux support). If the brickOS website looked less dead I may have tried to do it tidily and submitted a patch. As it is, I'm just going to package it up to save the hair of my fellow Mac OS X users. Some notes:
- Things are slow; quad-rate download is unsupported.
- My RCX had a default LNP (brickOS's "LEGO™ Network
Protocol") address of 2. You need to specify this when using
dll
. The following worked for me:dll -v -p1 ../demo/helloworld.lx --rcxaddr=2
View
button: the address is the number that comes up afterAddr
when you cycle through it, ignoring the final '0'. You can set it by pressingPrgm
when it is displayed.
The tools are available here. They are imperfect but enough to get started. I may hack them a bit further into shape in the future, and if you do please send me the results.
With the confidence that I can now get my programs onto the RCX I started building the Logo turtle featured in the Syngress 10 Cool Lego Mindstorms Robotics Invention System 2 Projects book. It's a mechanical marvel. I wonder if it's capable of drawing a smooth curve.