drewp

Categories: weblog | sunspot


2008-05-30T23:38:37 Communicating with sunspots:

I finally found that my SunSPOT manager wouldn't find its devices correctly because a shell script (!) that's supposed to gather the device names wasn't working on linux. Neither were two other alternative shell scripts I found in the forums, so I ported the best-looking one to python. Now it doesn't error, and it actually got a few lines shorter during the port. There's really no reason to write 75-line shell scripts when the target machine is a modern OS with the usual stuff (e.g. python) working.

My prize for getting the device communication working was that I was able to run netbeans, open the AirText project, and deploy it to a sunspot. BTW, the demo code is over at https://spots-sdk-demos.dev.java.net/servlets/ProjectDocumentList, which was surprisingly hard to find.

I really thought that when I was at Maker Faire, one of the Sun guys was saying "all the sunspot stuff is free and open, all the code, firmware, schematics, etc." But apparently that's not the case-- even the device manager code is still closed-source, which made it all the harder to figure out that a "StringIndexException: -1" was the tool's way of saying that it was choking on some extra stdout verbosity from my spotfinder python port, even though the comments in other spotfinder versions suggest that only the output on stderr matters.

I pasted my earlier notes about broken setups here.

T 2008-05-27T01:08:12 SHDH 25:

I went to SHDH 25, and because I brought blinking lights, a lot of people stopped to talk to me.

My mission was to make python/arduino drivers for the shiftbrite. I brought parts for making cables and assembled four of those. Then I adapted Garrett's fine arduino code into a version that listens on the serial port. There, or maybe later at home, I got a python program sending color commands to the shiftbrites.

Finally, I got my image scanning program talking to shiftbrites. It works like a player piano: any image serves as the paper roll; each light reads a certain row of the image. If you give it some photograph, you'll get a changing set of colors with palettes from the photo. Images like this make the usual color-chase effects.

At the end of the night at SHDH, Eric from Sun had a few more Sun SPOT dev kits to give away, so I took one off his hands. In exchange I have to blog about it, but this paragraph is the only news I have so far. I tried their CD and its installer .jar file, which claimed success except it wrote nothing but a log file of errors. Then I got another version via java web start, and while that one claims to have found the ID of one of my sunspots, it can't actually talk to it due to some port issue. I've only spent two evenings on this so far.

Not that I've been able to program one yet, but the sunspot seems ridiculously overpowered for all the usual things I do with microcontrollers. Hopefully if things work out, I'll be able to try some more ambitious projects, like a drink-fetching robot. Or at least a wireless data logger for my car.

What is with the low numbers of flickr photos from recent SHDH events? Here's a biased sharpshooter's sampling:

SHDH episode Flickr results for 'shdh%d'
5
249
20
190
21
188
24
106
25 70

Anyway, I'm in these:

http://www.flickr.com/photos/davidreid/2508366565/

http://www.flickr.com/photos/davidreid/2509195374/

 


[Main]

Unless otherwise noted, all content licensed by Drew Perttula
under a Creative Commons License.