drewp for 2008 May 27

<D <M <Y
M> D>

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/

 

T 2008-05-27T01:50:24 MPD web music player:

I started a followup to my wildly successful Twisted python interface to MPD: a web version. The idea is that if you could GET and POST the various MPD commands, you could write cool music player user interfaces completely in javascript. And you could write lots of them, because they'd be so easy to make. You could make a mac desktop widget, an ipod touch version, and even players for use on non-apple products! The player UI would use AJAX to send commands back to the web server, which interfaces to mpd.

Need to control many mpd instances from one UI? Don't want to run php (like all the heavyweight mpd web clients use)? Like zero page reloads in your web UIs? Want to implement some fine-grained security scheme, where selected users can use selected mpd commands? Want to make mpd calls from unix, but your network only allows http (maybe through a proxy)? It's plain to see that there are between 'five' and 'countless' reasons to use mpd over http.

Progress appears here (because I haven't migrated this project to darcs yet): viewcvs

Someday, I hope to do (or find) the same thing for email. Why can't I write a new special-purpose webmail client every weekend? Why isn't my email box abstracted as a bunch of URLs I can GET (including folders, indexes, searches, etc), and why aren't my contacts represented as a bunch of URLs I can POST new email to?

 

T 2008-05-27T22:22:06 emacs scroll keys:

I like making the keypad plus/minus keys scroll my emacs window without moving the cursor. For ~/.emacs:

(defun scroll-down-keep-cursor ()
;; Scroll the text one line down while keeping the cursor
(interactive)
(scroll-down 1))

(defun scroll-up-keep-cursor ()
;; Scroll the text one line up while keeping the cursor
(interactive)
(scroll-up 1))

(global-set-key [kp-subtract] 'scroll-down-keep-cursor)
(global-set-key [kp-add] 'scroll-up-keep-cursor)


[Main]

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