A Few Palm Pre Application Ideas
2008 Headshot
[info]unwiredben
As I mentioned on Twitter, I'm one of the lucky developers that are in the Palm webOS developer program. My status as an ex-Palm-employee probably helped my application stand out a little. We recently had our developer agreement amended to allow discussion of the development experience in public forums, so here's my first post on the topic.

First, from watching the homebrew world, I fully expect that lots of obvious niches will be filled very quickly once the app catalog for the Pre opens up. There will be scientific calculators, tip calculators, and shopping list apps. Some one will have a "Drug Wars/Mob Wars" style game, and various dice and puzzle games will quickly appear. The catalog will look a lot like the early Palm OS days.

It will take a little longer for more serious programs to appear, both because of the learning curve of webOS and because developers will want to realize a return on their investments. That means having a larger user pool.

OK, so what are my ideas right now? I've got a few:
  1. "Required Reading", a client for a variety of web services that keep track of bookmarks like Read It Later, Delicious, Mozilla Weave, and Newsgator Clippings. This app would let you view your lists, open the bookmarks in the web browser, and have those links marked as read or visited.
  2. "Memosa", an application that addresses the problem that you can't easily migrate your Palm OS memos. I envision a web service that lets you upload a Palm OS memo database file and returns a RSS feed of the memo entries. Make this use HTTPS and require a password and you can do one-time conversions. The Pre app could then download and store the memos locally.
  3. "Couch to 5K Tracker". I've got an app on my iPod Touch that handles audio cues for the timing of the various C25K runs, but it's biggest limitation is that you've got to start your playlist before you start the app, and if you want to change music, you've got to pause and resume your run. On the Palm Pre, you can just use the multitasking and not have to worry about the timer getting messed up.
  4. "Electronics RefCard". This is a simple app to help you figure out the value of resistors and other components by their color markings. I also imagine having some way to store IC pin outs here for quick reference, and maybe having calculators for Ohm's Law and parallel/series circuits.
  5. "Photo Puzzle". The standard 4x4 block of sliding tiles with one missing. You get to rearrange them in the right order. The hook: unscramble your own photos instead of a bunch of numbers.
  6. "IP Toolkit". Front-end for a web service that lets you ping hosts and do DNS and WHOIS lookups.
Some of these are fairly easy to code, and others will take a bit more work.  I'm currently working on the C25K tracker as my first application; it has an immediate appeal to me because I'm going through that training program right now, and there's some interesting challenges with keeping the device awake to do accurate timing and mixing my alert sounds with the other audio streams.  However, I've also got some code in place for the Electronics application.  I could do a really poor job on that one quickly, but I'd like for it to actually have a nice user interface.


Introducing @palmpretips
2008 Headshot
[info]unwiredben
On a whim this afternoon, I set up another Twitter account -- this one is @palmpretips. It's a collection of useful tips for the new Palm Pre smartphone, both ones I've discovered and ones sent to me from friends and contacts. So far, it seems to be catching on a little; we're up to about 20 followers in just a few hours. I'll probably try to publicize it on some of the message boards later tonight, but I think we've already got a critical mass of useful items.

To my followers on @unwiredben, this means that you won't have to see a mass of Pre tips show up there anymore; it's back to being all about me and the weird things I notice.

Where My Future Wife Works and the GM Fail
2008 Headshot
[info]unwiredben
Yesterday, GM declared bankruptcy. They did it from the 25th floor of the GM Building. Annelies works about ten floors above that. She was told the avoid the 25th floor on Monday.

This story from the Gothamist has a nice picture of the very tall building. It's the only skyscraper in New York that fills up a whole city block.

I wonder if there's a connection with us getting rid of our cars and GM (and Chrysler) going under? I expect that if we'd stayed in a place where we needed cars, we'd probably not be considering any current GM cars. I'm a guy who bought two cars in my life, both Saturns. They gutted that brand and its promise and they failed to deliver better technology and more efficient vehicles. I hope the best for those affected by the collapse of that manufacturing area, but I think I agree with Robert Reich in Salon: "...in many ways, what has been bad for GM has been bad for much of America. The answer is not to bail out GM. It is to smooth the way to a new, post-manufacturing economy."

By the way, the GM Building hasn't been owned by General Motors for a while. According to the Wikipedia article, it was sold back in 1998, and currently is owned by real estate funds primarily financed in Kuwait, Qatar, and Dubai. You still get paper badges with a GM logo on them when you visit.
Tags:

Velcro's a LOLCat now
2008 Headshot
[info]unwiredben

The latest Picasa now has an easy-to-use text tool that seems perfect for LOLing a picture. Here's my test of it's effectiveness.

Turning a Mistake Into a Nightlight
2008 Headshot
[info]unwiredben

A few weeks ago, I sent off the 1.3 version of my RGB LED Shield to get fabbed. It was waiting for me when I returned from the Mozilla All-Hands meeting in California, but when I'd put it all together, it didn't work. I started checking soldering joints and electrical connections and discovered the problem; two rows of pins were swapped in my board layout, so it wasn't connecting the right pins to the Arduino. Because of the way that the TLC5490 pins are connected to special timer outputs, I couldn't fix this in software. I tried to see if I could reroute the signals on the board, but it didn't seem possible, However, I was able to verify that if I connected the board up with wires to the right pins, it did work.

Fast forward a couple of weeks. I'd gotten in a little board called the Stickduino. It's a small Arduino-compatible board that is about the size of a Flash drive. One end is a USB port, although it's not quite thick enough to make good contact in my laptop. I fix that with a couple of pieces of cardboard and a glue stick. I uploaded my arrows sketch to the board, then wired it up to the 1.3 RGB shield. The solid core wire was stiff enough to hold things in place, and it worked when I plugged it into my laptop.

To power this, I got out a $5 USB power supply I'd picked up on my California trip. It's not the most reliable gadget, but it's small, and if you aim the USB port to the ceiling, it will hold up the whole contraption. The picture is from it running in my bathroom. I've also got a YouTube video of it running it's very bright pattern below.

I'd probably not use this as a real nightlight, but as a quick light show at a party, I'm all over it. I also now have something to do with the rest of my v1.3 boards.


Another RGB LED Shield Video
2008 Headshot
[info]unwiredben
Here's one with a color box pattern that I wrote:


Video of the RGB LED Shields
2008 Headshot
[info]unwiredben


This was taken Sunday night over at Eric's place. The patterns you see going up/down from the LEDs are artifacts from the CCD sensor; you don't see them with your eyes. I think I'll do another video of the patterns bouncing off a wall to give a more ambient experience.

First Three RGB LED Shields in Action
2008 Headshot
[info]unwiredben

I got my first PC board back from Seeed Studios on Saturday; they arrived mid-week, but since they shipped from China, I had to go to the Post Office to retrieve them and sign the customs form. The box had a variety of parts including a big bag of tiny switches, and it had the five PC boards. I put my own board together that afternoon and tested it, but the real fun was earlier tonight when we got three more of the boards populated and flashing lights. Eric Moore got his waves test pattern running in a spiral configuration, and it looks really nice, especially bounced off a dark ceiling or wall.

There's more pictures at Flickr, and I should soon have the website at http://combee.net/rgbshield populated with part lists and assembly instructions. I've got a few tweaks to make for a version 1.2 of the shield based on our experiences putting these together, but nothing that should be too difficult to setup.

Introducing webduino
2008 Headshot
[info]unwiredben
I've been working on a pretty nice chunk of code for the class I'm teaching later today. The main idea of the class is to put a web server on an Arduino board. Once you've got that, you can use any computer with a browser to pull data from the board or send commands to control things. As I worked on the code, I realized that a little refactoring would turn it into a nice framework for building lots of different webby things.

If you're interested, the project is hosted at http://webduino.googlecode.com. I'm releasing it with a MIT-style license. I expect to do a few more modifications to it over the next few days, especially after feedback I get from the class. I'll also probably restructure it to fit into the library scheme used for Arduino add-ons; right now, you just put a copy of the header into the folder with your code, which is nice for keeping it with your sketch, but not-so-nice for code duplication.

Crystal and Jack
2008 Headshot
[info]unwiredben

These are two little figures I made from spare parts I'd scavenged from a broken Atari 2600 video game console and a probably-working-but-useless Atari XM301 300-baud modem. They're held together with hot glue, and each one has a small magnet on its back so they can watch the kitchen from the freezer section of the refrigerator.

My first one is sitting at Annelies' desk; it stands upright with resistor legs embedded in a small piece of antistatic foam. I don't have a picture of that one yet.

I was inspired by the Maker Shed Store's Capacitor Robot Charms, but they're my own take on the idea.

Velcro and Magnolia in the Closet
2008 Headshot
[info]unwiredben

We got our two kitties spayed on Monday, and Annelies and I have been watching them closely at home. This morning, they got away from me and I couldn't find them. Ends up, like R. Kelly, they were trapped in the closet. Well, not quite trapped; they seem content.

Teaching an Embedded Web Server Class
2008 Headshot
[info]unwiredben

BTW, if you're up here in New York and want to learn about making embedded devices that act like web servers, I'm teaching a two hour class on the subject on March 28th at NYC Resistor. After the class, I'll be putting my materials online, but I'm still working on everything right now.

You can get details on the class at http://www.eventbrite.com/event/302042417.

Scrounging Parts from a 2600
2008 Headshot
[info]unwiredben

I recently installed a video mod board from the Longhorn Engineer into an Atari 2600. This gives the system real composite and s-video output ports, letting me bypass the RF modulator. The result is a much cleaner picture, especially with the s-video connection. If you're curious about how it went, you can check my comments on the AtariAge forums.

However, in attempting to install it in my first 2600, I think I fried something. I got no video signal at all or any signs of life on the audio jacks. Since I'd already clipped off resistors and removed the RF output on the board, I couldn't easily test it to see if it worked without the mod board soldered in, so I called it a loss. However, that left me with a mostly good 2600 motherboard.

Now, this isn't the original classic 2600 with four or six switches on the front, it's a "2600 Junior" that was introduced late in the system's life. The board has a 1983 copyright notice on it. However, that's still old enough that everything was soldered on as through-hole parts. Most modern devices use surface-mount parts that are much smaller and only connect to one side of a PC board. Back in the 1980's, surface mount technology hadn't taken over, so most parts were soldered to holes drilled in PC boards. In general, it's much easier to hand-assemble a through-hole design, but if you're doing automated assembly, surface mount works much better.

So, like any good electronics hobbyist, I didn't just throw away the dead 2600 motherboard. Instead, I got out my iron and my desoldering pump, and I started taking off components that might be useful in the future.

First to go was the 28-pin cartridge port. This is useful for modifying an Atari Flashback 2 console, one of those $30 plug-and-play game systems sold a few Christmases ago. The designer included pads on the PC board that you can wire to a real cartridge port to play old Atari games. I got a second unit at a Goodwill, so I'll probably try this modification soon.

Also useful were the many switches. There were switches for power, color selection, TV channel selection, and left and right difficulty. The power jack is a standard 1/8" headphone jack, so that's useful. I was also able to take off the two joystick ports; they're DB-9 connectors, but I'll probably use them to hook an old Atari joystick up to an Arduino.

I got a couple of potentiometers from the video circuit. These were used to adjust the color values at the factory. There was a big 5V power regulator chip that I could use in a future circuit. I was able to remove the power LED too, as it had long leads to be near the panel display hole.

What's left on the board is mostly not worth saving. There are about a hundred resistors, but the leads are clipped, so they would be hard to reuse. There are a few more ICs, but they aren't very useful outside of repairing other 2600s. I could save a few capacitors or transistors, but I'll probably just hold onto the board and just remove parts as I need them.

More with Mozilla and htinkering
2008 Headshot
[info]unwiredben
Work continues with Mozilla.  We're about to go into a week of testing on the first beta release of Fennec for the Nokia N810.  I've got one major patch that should be in this release.  I've been working in the JavaScript code that acts as the front-end of the browser.  We had a problem that we could drag around the content of the page, but lists that were in the chrome around the page, like the URL suggestion list or the bookmark list, couldn't be moved.  My patch moved the drag handling to a higher level so it can be used to handle both cases.  Most of the implementation strategy came from Stuart and Mark, but I did the actual grunt work of writing the code and getting it to run correctly.

I really like the Mozilla review process.  Basically, I do work on my own machine and post it as a proposed patch to the bug.  Other people on the team get a change to review the change, and if they like it, they give it a thumbs up.  If they have issues, they post them back to the bug, I fix them, and produce a new patch.  Once the reviews are all accepted, the change gets landed in the source repository, and it goes into the next official build.

Outside of Mozilla, I've started doing some work with a new hacker group here in New York called HTINK.  The h is silent, so it's pronounced like "tink", and makes me a htinker.  We've got a big workshop we're doing here in NYC on March 14th where we'll be building lots of Arduino-compatible microcontroller boards and hooking them up to RGB LEDs and robot servo motors.  There's more stuff being discussed later in the year too.  I'm also working on material for an Arduino web server workshop where I'll show how to hook up one of the boards to your Ethernet and run a simple server on it so you can read sensors or change outputs.  That class will happen at NYC Resistor, probably in early April.

First Week at Mozilla
2008 Headshot
[info]unwiredben
I'm wrapping up my first week as a paid employee of Mozilla; I'm still out in Mountain View right now, but I'll be heading back to New York tonight.

So far, it's been a great experience, although it's a major change from how I was working at Palm. It reminds me of when I first went to Metrowerks 10 years ago; I'm the new guy dealing with a lot of technology that I'd not seen before. While I've been using Firefox and the other Mozilla products for years, I never really had to dig into how it all worked. I'd a passing understanding of XUL and how the browser's front end used JavaScript to interface with a big pile of C++ code, but now I'm actually responsible for knowing how that connection works in intimate detail. There's been a lot to absorb.

However, most of the week has been more mundane stuff, like handling all the HR stuff, setting up a new laptop and figuring out how to build things for myself. Alas, Mozilla isn't 100% Joel test compliant; building the product isn't too hard to figure out, but it's not just "run this script". My current stumbling block is getting the Fennec build for the Nokia N810 working. It relies on a weird compilation environment called Scratchbox that tries to hide the fact that I'm building ARM code on a x86 machine from the build process. In theory, this works great. In practice, it means I occasionally get really weird error messages that require very analytical decoding.

I am excited by the UI possibilities of Fennec. It's core is the same as Firefox, but it's the UI where things are different. Buttons are bigger and designed for hitting with fingers, not mice. The UI tries to go away, giving you the maximum space for content. We're just now figuring out how to determine the best width to use for a given web page so we can zoom the appropriate amount to display content. We're also tacking problems like using a five-way navigator on a mobile device to move around a page effectively. These are things I've seen other browser do well, but they're problems that the Mozilla team hasn't had to handle before with their desktop focus.

The big difference with Mozilla is that we want to do all of this in an open fashion where it's easy for users to install add-ons that enhance their browsing experience or add capabilities to the browser. This justifies the work on getting the Gecko core into a widely distributed mobile web browser over just giving into Webkit. The Firefox add-on community does amazing things, and I can't wait to see that creativity on mobile devices. I'm already thinking of a few add-ons I'd like to write from the silly (turn all of the pictures on a page into low-res versions to simulate running on 8-bit computers) to the useful (e-book reading).

OK, back to work. I want to see code I built running on a N810 before I leave tonight.
Tags: ,

Moving on to Mozilla
2008 Headshot
[info]unwiredben
I'm writing this from the San Jose airport, waiting for my flight back to New York on a late Friday evening. Earlier today, I turned in my employee badge at Palm. I've got another week working for them remotely, then I'm unemployed. This is only temporary.

Later this month, I start my new job as a software engineer at Mozilla working on their Fennec mobile web browser. I'm not entirely sure what I'll be doing there right now, but I expect it will have a lot to do with making the core web browser component (what they call Gecko) run faster and use less memory on mobile devices.

My leaving isn't an indictment of Palm. I'm really quite impressed with the new Pre phone and webOS, and I think the new products will be quite successful. I think we've found a really great way to help people manage their information and their life in a simple, elegant, and powerful way. When Palm releases the device and the SDK later this year, I expect to be among the first to start making applications for the system. I might even camp out at one of the Manhattan Sprint stores.

However, professionally, I've realized that it's time for me to move on. I've admired Mozilla and their Firefox browser for years, and when they contacted me about joining the team, I paid attention. I found their mission to be quite worthy, their people to be smart and friendly, and the technical challenged to be interesting. I'm also excited to be working on a vibrant open source project and to work in an environment built on worldwide collaboration. Plus, I can blog about my work again!

To all my friends at Palm: you've got my respect and my love, and I really wish you all the success in the world.

To my new colleagues at Mozilla: I'm very excited and can't wait to get started doing great things.

What's Been Going On Lately?
2008 Headshot
[info]unwiredben
I've been very lax about writing. In part, it's been because I've been busy and I can't talk about work things here. It's also because a lot of the general "what am I doing" stuff is now showing up in my Facebook profile.

Kittens
Velco and Magnolia continue to get bigger, but they're staying very cute. I think they're getting more cuddly as they grow up, although they still have their wild kitten fight times. We're letting them around the house more, although my office is still a no-cat zone and probably will remain that way for the foreseeable future. They just had their last vaccinations, and in March they will both get spayed. They sleep with us in the evening, although that does lead to some interesting bedtimes; last night, one of them kept attacking my toes under the cover, and it got really annoying. Usually, they're quite nice, and they often curl up and nap on our laps when we're watching TV in the main room.

Electronics
I've taken up electronics and microcontrollers as a new hobby, mostly inspired by the antics of Brooklyn's own NYC Resistor hackerspace. I've taken a few classes there where I made some programs run on an Arduino board, then I ordered myself a soldering iron and some kits and made all of those. The immediate feedback of having code you write run on a board and control basic electronics is really great, and there's enough momentum with sources like Make Magazine. I'm fortunate to have always had a small interest in this, but I never could get over the hump of designing circuits. I think I've finally found the right combination of development hardware and support network to get me into the game.

My favorite project so far has been a solder-it-together board called the Mignonette. It's a small AVR Atmega88 microcontroller with four push buttons as inputs and a 5x7 LED matrix display. It came preloaded with a test application and simple "Munch" game. Last night, I got the TinyUSBISP programmer that I built from a kit to work and loaded up another game, Attack. I'm in the middle to taking the source for Attack and converting it into a dice roller application that uses the four buttons to let you pick a die type, pick a multiplier (for doing 3d6, for example), and roll the die. Of course, I'd make it play some sort of beep over the speaker while it's rolling so no one rolls without being noticed.

Christmas Celebration
Annelies and I stayed in New York for Christmas, but we were in contact with our families. On Christmas Eve, we used Skype to do a video call with my mom, dad, and aunt back in Georgia and we opened presents over the webcam. Annelies got us a microwave oven for the kitchen, something I think we'd both been secretly craving. My dad made some gorgeous wood stands that he shipped up here. I got a printer stand for the desk that lets me use the room above my laser printer in the corner of my desk, while Annelies got an amazing music stand that rests on the edge of a bookshelf and lets her see her sheet music while she's practicing the violin.

We cooked a nice Christmas dinner for each other with Annelies making some delicious baked macaroni and cheese, and me making braised collard greens with garlic and onion. We've been doing a fair amount of cooking together, often inspired by the great selection of produce we can get at the Park Slope Co-op. Just last night, we made portabella mushroom soba noodles with roasted beets and turnips in a red wine reduction.

Family Travel
I got my sister an airline ticket to New York for her Christmas present. She's going to be coming here in mid-January for a week in the city away from the darkness of Copenhagen. I'm very excited to be taking here around and getting a chance to do some tourist stuff that I don't normally do. We don't have a formal plan, but she'll be here on January 20th during the presidential inauguration, so I'm sure we'll find a party that evening to attend.

Debugging with CodeWarrior for Palm OS and Palm Desktop 6.22
2008 Headshot
[info]unwiredben
This is just a note for those who need to figure out why they can't use USB debugging with their Palm Centro smartphone. Apologies to my non-geek friends for this.

The Centro does support USB debugging, but you need to jump through some hoops to get CodeWarrior for Palm OS V9.3 to work with it.

CodeWarrior uses a DLL called USBPort.dll to talk to the device. It tries to be smart and looks in the Palm Desktop folder for this DLL. However, with the new desktop and HotSync manager, the API calls made to find that folder now tell CW to look in your "My Documents/Palm Desktop" directory. To get CW to find the DLL, just copy USBPort.dll from "C:\Windows\System32" to "C:\Documents and Settings\{USERNAME}\My Documents\Palm OS Desktop".

On the Centro, I also had to make sure other programs didn't use the USB port on the device before I got a reliable connection. Pocket Tunes Deluxe has a PC connection mode that you should disable by going into PTunes, going to "Prefs/Copy to PC Prefs..." in the menu, and changing the connect mode to "Off".

Also, the Centro's USB cable may not keep a good connection all of the time. When I tried debugging, I had to hold the cable in place to make sure it stayed tight. Using one of the older Athena connector cables that also had power can help with connection stability.

Reports are that USB debugging for Palm OS devices doesn't work at all with Windows Vista. I've not tried that OS to verify this, but it may just be the Palm Desktop 6.22 issue that I described above.

A Neat Use for Some of my Old PDAs
2008 Headshot
[info]unwiredben
This project boots Linux on older devices and runs PdAnywhere, a musical instrument creation language. I don't have a TX, but I do have a Nokia 770 that can be put to use with this.
Reware your PDA from Hans-Christoph Steiner on Vimeo.

My Name in Light
2008 Headshot
[info]unwiredben

This sign was made at NYCResistor's Lazzzor class using 1/8" acrylic plastic and a 35W Epilog laser cutter. Annelies and I made the designs using Inkscape, then assembled them from the pieces.

This sign used a "Army" stencil font that I downloaded from the net. I had to make Inkscape convert the letters into shapes to get it to burn right, and even then, I had a problem where the larger letters were cut twice, making some of the narrow parts a bit weak. You can see this with the missing middle piece in the "H" in "THE". I discovered the sunlight effect after I brought it home, a very happy accident.