My take on socialized medicine

One picture is worth a thousand words

One picture is worth a thousand words

Note that:

* This was free (grand total of $2 for a bus ticket)

* The entire thing took about 1 hour, I was in line for about 30 minutes tops

* I’m not even Canadian!

More on that Android serial port stuff…

Here’s a stable build for the serial-port-enabled kernel, finally! Get it at

http://forum.xda-developers.com/showthread.php?p=4521020#post4521020

and play safe!

What does it do? It lets you use the serial port present in the G1 phone for custom applications. Such as, I don’t know, robots ;)

The main change from the older one, other than “it’s easier to install” because it doesn’t need the SDK, is that the older one had issues with wifi and bluetooth occasionally. This one on the other hand Just Works with most Cupcake based firmwares, just install it on top of the firmware. Here’s a good one from another Italian developer.

A verbose explanation for a simple hack

Here’s how to modify a servo for continuous rotation. There are many ways to do this, in this brief video I’m explaining how to do it in a way that is:

1) reversible,
2) doable by people who don’t want to mess with a soldering iron.

This is very handy if you live somewhere servos aren’t easy to come by, so you have to make do with a few which means you’ll probably go back and forth; I’m also showing you how to undo the changes and get your servo back.

http://www.youtube.com/watch?v=caKvJL72BTs Part 1 (How to do)
http://www.youtube.com/watch?v=EWs5CB4cLkI Part 2 (How to undo)

If you call a phone Android, someone’ll hook it up to a robot eventually…

After seeing the excellent tutorial on Instructables on how to connect a serial cable to a G1 phone, I decided to do some followup work on that. I will post my own instructable on how to make your own serial port level shfter later — in the meantime, here’s a little treat: a 1.51 (Cupcake) kernel that lets you actually USE the serial port.

After unlocking your phone and downloading the Cupcake firmware or one of its variants (Cyanogen, JesusFreke and so on), you can try this kernel out by using fastboot (if you don’t know what that is, find an unlocking guide — you will after that!), as follows:

fastboot boot serialport_cupcake

This will let you use /dev/ttyMSM2 as a serial port. I’ve already hooked up a picaxe and servo to it, let’s see what you do :) given the compass, accelerometer and GPS in the g1 phone the navigational applications are obvious…

If you want the technical discussion, I’ve contributed to a thread here. There’s also a config file if you want to build your own.

UPDATE:

Here’s the boot image you can use to flash your gphone with the serial port enabled: you can use fastboot to load the kernel without having to do so at every boot.

Get your phone into fastboot then use

fastboot flash:raw boot kernel_cupcake_serialport kernel_ramdisk_standard

to restore, use

fastboot flash:raw boot kernel_cupcake_standard kernel_ramdisk_standard

See I’m not that well traveled?

http://maps.google.com/?q=http://spirit-plumber.com/life.kml

The places in my life I’ve been to, not counting stays of less than a month or stays where I didn’t do any study or work. Each place is indexed once. I tried to keep them in chronological order. Starts in Milan.

I’ve mostly stuck to the northern emisphere and the Atlantic really… I need to do some more exploring :)

Math is hard…

… especially when you have to contend with the limitations of whatever little microcontroller you’re working with; a lot of micros don’t have trig functions or only have sin/cos/tan. Atan2 is a fundamental function in navigation (it lets you turn two pairs of coordinates, for example where you are and where you’re going, into a heading, for example which way to turn how to get there) but if it’s there it tends to be slow as most microcontrollers don’t have lookup tables for it. You can do Taylor expansion, but it’s very slow — and on microcontrollers that can only do integer math precision is lost very quickly.

With this in mind, I had to come up with ways to approximate atan2 quickly and precisely enough to drive or sail by.

http://spirit-plumber.com/portfolio/math/fastatan2.htm

You can use this formula with a microcontroller that can handle 32 bit floating point numbers, such as the Parallax Propeller. If you’re limited to an even smaller system (say, a Basic Stamp or Picaxe or PIC micro) here’s the 16 bit integer version, accurate to 1 degree in most cases.

http://spirit-plumber.com/portfolio/math/fastatan2_integer.htm

Why the emphasis on using as few divisions as possible? Because micros generally have to do “long division in their head” by means of repeated subtraction; division generally takes long compared to other operations.

Philosophical musings on a practical problem.

Following on the “small hacks that require a very steady hand” theme, today I’ve modified my Nokia 6300i phone to be charged from the USB data cable (so that you only need 1 cable for everything, not 2). This allows me to find phone power with much greater ease as usbmini cables are easy to come by. I’d put up an instructable for this as well but — well — my camera IS my phone and I can’t have it take picture of itself when it’s taken apart, obviously!

A comment led me to thinking. On one hand, I have arguably increased the value of both my phone and computer, practically because they have extra feature and economically because they are now unique (and therefore very scarce) items. However, I’ve been berated and in one occasion mocked for decreasing their resale value. Why is this? Because I’ve voided the warranty? But I never use warranties; if something breaks I’ll fix it myself. And if anybody buys either of these items from me, I will gladly put my honor as a technician that the parts I added or modified will not be the first or even second to break.

If anybody other than this guy has an explanation, please, please share it.

How to add right click to a Macbook touchpad

I’m not talking about that two-finger-and-click thing that modern Macbooks have. I’m actually talking about how to wire a right mouse button in! This requires very few parts, does not make you disassemble a mouse, doesn’t tie up a USB port and on the Macbook Pro you can even do it without taking the computer apart! (In my explanation I do anyway to show how to do it on other macbooks, and because I had to clean up one of the fans anyway). The same method can be used to add a third mouse button using the same procedure, which should make Linux users happy; I’m also showing how to do it with almost no parts — if I was in the US I’d have adapted a microswitch, but can’t get any over here. I will redo this with a nice microswitch as soon as I can buy one.

http://www.instructables.com/id/Adding_a_right_mouse_button_to_a_Macbook/ Here’s the instructable! Be sure to read all the notes in the pictures.

1/20/09: “It is never too late to be what we might have been.”

Dear Americans: I’m very happy that your long national nightmare is over. I’m looking forward to passing by on that side of the atlantic soon.

Dear Canadians: Are you feeling a bit more relaxed now? I know I am.

A question to the wind

if there was a global database for all CCD cameras, BUT it was uneditable and available to absolutely everyone to peruse/copy without charge, would you be more in favor or more against camera surveillance?

I think that most people who are against surveillance are mostly against either its abuse (from the bottom), or their own inability to prevent abuse (from the top). Why haven’t we put that sort of camera on police helmets already?