Winter Hobbies

During the good weather, I enjoy riding my bike a bit with my free time, but in the winter I am often de-motivated. That makes it a good time to focus on one of my other hobbies: electronics. I had a pretty fruitful weekend (so far!) on the electronics front. For Christmas, I had bought Tyler a “Game of Life” kit. This isn’t the board game you are likely thinking of, but rather a one (or zero, depending on how you look at it!) player computer simulation of a colony of organisms. A grid of cells is represented by LEDs, and their death or birth is dependent on the level of crowding in their neighborhood. Tyler did a great job soldering the kit together, I think we counted over 100 connections had to be soldered! Certainly, the most challenging project he’s put together thus far.

Trouble is, although you can connect multiple boards together (very clever!), they do cost $$ and a single board ends up with very fleeting generations. I thought to myself, “Well, since this is a board with a software programmed micro-controller, I ought to be able to change the delay between generations!

That idea ended up causing me a lot of work (and/or expense…). First, I had to build the AVR programmer kit that I’d bought previously, figure out how to install a driver for it (on my Win64 system), install all the AVR dev tools, solder a programming header on the board, figure out just enough to be dangerous, mod the code, and upload the new firmware.

Happily, this all worked pretty well! Except for the final step. It should be obvious, but I can’t figure out where the delay between generations comes from, ultimately. But, in preparation, I did all the rest of the above, along with re-building the current firmware, and just reloading that.

I’ve posted a question or two in the Adafruit forums on where the delay might be coming from, so hopefully someone will help me out there.

Sign Switcher

For our church pageant, we retold the Christmas story in the guise of a Christmas Trivia game show. There was going to be a person responsible for holding up signs like “Applause!” etc. but I thought to myself, “I have some scrolling LED signs. I bet with a little effort, I can build/program a device to let someone select from a list of pre-defined messages.” And it turns out, I was right! Pictured below is a slightly updated version of the device. It now has a (lighted) power switch, to save battery, and the Display on/off switch has been upgraded from a bat handle toggle to a nice rocker. Oh, and I changed the messages to some that could be used in a sermon…

20120111-205156.jpg

So intuitive, even a (very bright) dog can use it 🙂

Virtually Impossible

I received a new laptop at work, which is always a treat, but also always a pain trying to get the necessary programs and data migrated from the old one to the new one. My usual crutch is to create a “virtual” copy of the old laptop to run on the new one for the transition period. I end up using the virtual copy less and less as time goes on. Then eventually, I run short on space on the “new” laptop and have to delete the old copy.

I’ve done this through my 2 most recent laptop transitions, and also used the same technique when we got Susan a MacBook to replace an old Dell laptop. The biggest problem I’d had to date was a licensing issue with Susan’s — the Windows license on it was an OEM license, and when going to authorize it, it wouldn’t take my semi-legitimate MSDN license. I finally wore someone down on the phone until they let the registration go through.

With this laptop, though, I’ve had nothing but trouble. And it has nothing to do with the new hardware, AFAIK. I started with my favorite Virtualization engine, VMware. They offer a free “Player” application and also a free “P2V” application for taking a Physical computer and creating a Virtual copy of it. Even getting the P2V process going was challenging, though, as it required software running on both systems, and dealing with Windows permissions, with the old laptop being a member of the work domain, and the new one not yet. And then copying 62 GB over the wireless network wasn’t going very quickly, so I cancelled the process then connected the two systems to the wired network. At that point, name resolution stopped working in one direction, making other things that much more difficult. The process, once I was able to get it started, did go much quicker over the wired network, though. Starting up the newly created VM in Player, though, did not go well. It started with a BSoD related to some supposedly missing file. A little web searching led me to running a “repair” from the install disc, which got me to the next error, which was a different BSoD. That one seemed to have to do with the VM being configured with one kind of storage, and the installed system expecting another kind. You might think the P2V process would manage all of this appropriately, or at least I would, but you’d be wrong, or at least I was wrong. Anyway, after many fruitless hours of web searches, regedits from the repair console, extracting VMware disk metadata from the virtual disk file, modifying it, and re-inserting it, I gave up. I’ve never had such a miserable experience with VMware.

On to Microsoft. Sure to be a slam dunk. Well, the new version of Virtual PC is weird, and is implemented as some shell extensions so it doesn’t even really look like an app. I first tried an application that converts virtual disks from one format to another. I can’t really remember the failure mode of that attempt, but the VM wouldn’t boot. I was willing to accept this, given the heritage of the virtual disk file, and the myriad of changes I’d made to it since first making the image. I then moved on to creating a virtual disk with a Microsoft (sysinternals) tool. I figured I’d try a “simpler” wired network this time, with both nodes on a small hub, but the throughput was terrible. I then remembered that it really was a hub, and not a switch, and I disconnected the other system I had plugged in there, and disconnected the internet connection, and then things really moved along quickly. When I came back a few hours later, though, the app complained that the network connection was lost. Didn’t look it to me, but what do I know. I re-configured the two computers’ network interfaces to have static IP addresses, and I addressed the shared folder for storing the newly created virtual disk with the IP address of the target instead of its name. But that new copy ended up having an even weirder failure mode. The VM would begin to boot, but then simply power down. No BSoD, no error message, no nothing. I did some searching but my GoogleFu failed me, and I could find no similar reports.

At this point I was feeling pretty beat up, but in doing some research on the VHD file format (Microsoft’s virtual disk format), I read that VirtualBox also supported it. So I figured, what the heck. Since it doesn’t require making a new virtual disk, but was just a quick download, the cost to try was low. But of course that failed to boot as well — just gave me a blank screen. However, I was able to go into the settings and figure out by myself some changes to try (mainly the bus on which the virtual disk was configured), and was able to get the VM to boot. It certainly took a lot of doing to get to that point. Even so, the story doesn’t end there. The VM would boot OK, but I couldn’t access the network. The error in Device Manager was that not enough resources were available for the device. And there were a handful of devices in that state, not just the network interface. I tried deleting old hardware drivers, etc., but never got those errors to go away. Some internet research later, I learned that installing their “Guest Additions” solved many errors. So I did this, but still no luck. Some more searching (my GoogleFu had returned!) later, I came across someone who had the same problem, and his solution was to change the PCI bus driver. I did this, and voila! All was well.

All in all, it was a surprisingly miserable experience to get to this point. But thank you, Virtual Box, for coming through in the end!

Useful

On Thursday (2 days ago) I ordered an electronics prototyping kit based around an Atmel ATmega8U2 microcontroller. The kit is called an Arduino, and I ordered it from Adafruit Industries (funny name, I know), and paid for UPS ground shipping. I’m glad I didn’t pay for 2-day or 3-day “Priority” shipping, because it arrived Friday, the very next day.

The hardware is “open source” and there are many freely available open source tools for programming it. Tyler and I played around a little with it last night, and made it blink an LED. I played a little more after he went to bed and made it light up a series of LEDs in various patterns. Cute. The programming environment is C-based, so it is pretty familiar to an old programmer like me. Today (Saturday), I spend a couple of hours (chopped up into 5, 15 or 30 minute increments) and was able to make something, well, useful. It also uses a separate LCD display that I also purchased (seemed like it could be a fun add-on), and a temperature sensor that came with the kit. Using the display meant also using my nice new soldering station to solder 21 connections! Here it is:


It is a thermometer that displays the temperature when you press a button. It displays for 5 seconds, then the display turns off to conserve the battery.

I was partly inspired by a friend who also bought a kit and has been enjoying it. I had heard of Arduino starting a few years ago from the Make: blog and magazine. It is very popular among hobbyists and artists of a certain bent. It has lots of useful means of interacting with the real world, and a bevy of enthusiasts who have contributed lots of code and made add-on hardware for the platform. We have plans for a much more involved project, but for now, these little steps are still exciting.

iPad, therefore iAm

I ordered an iPad the first day that Apple was taking orders. I thought (still think…) it will make a great internet appliance for my elderly mom, who has no real experience with computers. Some of those characteristics that are perceived as negatives for techies I think will be positives for her. It has a great web browser, for an almost full internet experience (I will have to steer her away from addictinggames.com, of course), a perfectly good email application, and there are already a bunch of apps for news, which she is feeling out of touch with. Having played with it for a day and a half (on and off), I am pretty impressed. On the down side, it feels a little heavy (compared to my iPod touch. What was I expecting?), and it won’t sync wirelessly, which is a shame, because she and my dad live downstairs, and that would make it just that much easier. On the plus side, it doesn’t multi-task ;-). The touchscreen is much easier to adapt to than a mouse. It just feels much simpler than a PC/Mac, which for my use case is a decided plus. I am now waiting for the keyboard dock, which should make it more comfortable to sit and type at before I give it to her, but I have added some music, photos, contacts, apps, etc. The on-screen keyboard is definitely usable, but the lack of tactile feedback is noticeable. We shall see…

Here are the obligatory, goofy un-boxing photos:
[set_id=72157623774383176]

It’s been a while

I’m not much of a blogger. Having the summer trip provided me with an endless supply of material to write about. But (my) ordinary life hardly seems worth writing about. Another roadblock for me was that I wanted to “preserve” the trip blog as a sort of whole. And in fits and starts, I have, I think, accomplished that. There is now a Trip Diary page which lists the posts related to our Big Trip in chronological order. The blog format is nice if you’re “following along” in that the most recent entries appear at the top. However, if I were to tell someone today that we had a great trip this past summer and that they can read about it on our website, the standard blog ordering (reverse chronological) is less than ideal. So with some help from the WordPress community, I was able to code up a page that presented the trip log entries in Forward chronological order, as a diary would be. Which I think you will agree is much more friendly for the newcomer.

Whapped WAP

As I mentioned earlier, my pictures were uploading to flickr very slowly last night, and when I woke up, I was not surprised to see that the upload had failed. I started it up again, and it failed on the second picture. After a couple more iterations, I decided to take another tack, and connect to a different SSID, as there were many available and provided by the hotel. That seemed to fix it — the remaining few photos uploaded in minutes rather than hours, and the rest of the web sites I was using worked much more smoothly.

The problem felt like the LAN connection to that particular WAP must have been dropping packets (and lots!), either due to a bad cable or a bad interface. So if you’re ever at the Comfort Inn on Elm Hill Pike in Nashville, avoid BBHWIRELESS_18.

Overall, our experience with hotel wifi has been good. Performance hasn’t always been the best, but the availability has been ubiquitous, and as opposed to a few years ago, always free. The only exception was the non-national-chain sportsman-oriented motel we stayed in outside of DeSmett, South Dakota.