Scott's Blog
Scott Kirkwood's Personal Blog Programming, Python, Brazil, Google
Wednesday, August 17, 2011
Hello Streetview
Hello streetview, how are you doing?
Friday, December 10, 2010
Vanity URL
Finally decided to buy scottkirkwood.com for my vanity URL, why not?
It points to my blog.instead of the less memorable scottkirkwood.blogspot.com and paying for 5 years is relatively cheap.
It points to my blog.instead of the less memorable scottkirkwood.blogspot.com and paying for 5 years is relatively cheap.
Monday, April 05, 2010
Key-Train Launched
In the spirit of "Release Early/Release Often" I've shipped the first version of key-train (key-train-0.1.0.zip).
Here's a screenshot:
If you'd like to contribute you can say so on the discussion list or send me an email (at scott @ forusers.com).
Here's a screenshot:
Features include:
- Training for all the lowercase keys on the main part of the keyboard in two languages (English/Brazilian Portuguese) and two keyboards (qwerty/ABTN). More languages and keyboards should be easy to add.
- Easy for others to contribute better lessons and new keyboards.
- Easy for others to translate the software using the standard gettext package (I recommend using poedit). The key-train.pot file is created automatically - so don't edit it. For your language, you would create a .po file like, this one.
- A reasonable progression of keys and training (27 lessons).
- Speed and accuracy training by typing in parts of Wikipedia articles.
- Only one lesson file is required for different languages and keyboards.
But the program isn't complete, here's a list of the biggest problems:
- The package is way too big, I have to split out the Wikipedia parts and drop the articles/paragraphs which would never be used (because they are too long/short or have ö∂đ ĉȟᴀɹâçťêƦƨ).
- Although you can change the keyboard, the keyboard displayed on the screen doesn't yet change.
- The Portuguese translation is both incomplete and of poor quality.
- The lesson plan needs work.
- A students progression is stored. It doesn't continue where they left off.
- There are no graphs, problem keys, etc.
- Even though most parts use SVG for display, it still looks pretty ugly.
- The setup.py doesn't automatically install the dependancies (i.e. python-yaml).
- It's doesn't use pip, distribute, nor does it have a debian package.
- There are known bugs.
If you'd like to contribute you can say so on the discussion list or send me an email (at scott @ forusers.com).
| Reactions: |
Thursday, January 21, 2010
fsck'd my drive
After a few power failures during a week of storms I rebooted my Ubuntu Linux computer and fsck found some errors. Next time I booted it found (and corrected) even more errors, until, eventually I wasn't able to boot anymore (couldn't find grub).
I have a good backup system* so I wasn't too concerned (although this was my first real test). I had run smartctl on the first sign of trouble and it didn't give any errors, so it didn't appear to be a hard disk failure. I figure this is an opportunity for me to setup 64bit version of Ubunt and I've also been thinking about dual booting to Windows® because Steam looks like an easy and cheap way to install games.
I put an old version of Windows XP in the drive and... it blue screened. It just didn't want to install. I tried two other versions and it also failed. I then got the Ubuntu disk and it installed with no problems. I tried Windows again, again it failed to install even though I had reformatted the disk when install Linux.
After much forth and back I decided to reset my BIOS to factory defaults, and low and behold, Windows installed! Not very nicely, however. I had no Ethernet, no sound, slow graphics and in only one monitor, but at least it was running. I then installed 64 bit Ubuntu desktop and proceeded to restore all my files.
Next day I went back to Windows to figure out what was wrong. It's been years since I've touched Windows and I was at a loss. How can I get the updates if it can't connect to the internet? Then I thought every time we buy some device it comes with a little CD which I normally throw out - I wonder why they do that? Do people still use CDs, how archaic?
So I put in the CD for my motherboard which I luckily happened to have kept and in installed the drivers for Ethernet and sound and I was back business. Now I have Steam installed and the Torchlight game I bought for $5 bucks. I'm a little sad that my computer has Windows on it, but such is life.
*Actually, I should have also backed up my package list (i.e. dpkg --get-selections) and my cron list (crontab -l), then it would have been even more painless. I've updated my backup program to dump out this information as well.
I have a good backup system* so I wasn't too concerned (although this was my first real test). I had run smartctl on the first sign of trouble and it didn't give any errors, so it didn't appear to be a hard disk failure. I figure this is an opportunity for me to setup 64bit version of Ubunt and I've also been thinking about dual booting to Windows® because Steam looks like an easy and cheap way to install games.
I put an old version of Windows XP in the drive and... it blue screened. It just didn't want to install. I tried two other versions and it also failed. I then got the Ubuntu disk and it installed with no problems. I tried Windows again, again it failed to install even though I had reformatted the disk when install Linux.
After much forth and back I decided to reset my BIOS to factory defaults, and low and behold, Windows installed! Not very nicely, however. I had no Ethernet, no sound, slow graphics and in only one monitor, but at least it was running. I then installed 64 bit Ubuntu desktop and proceeded to restore all my files.
Next day I went back to Windows to figure out what was wrong. It's been years since I've touched Windows and I was at a loss. How can I get the updates if it can't connect to the internet? Then I thought every time we buy some device it comes with a little CD which I normally throw out - I wonder why they do that? Do people still use CDs, how archaic?
So I put in the CD for my motherboard which I luckily happened to have kept and in installed the drivers for Ethernet and sound and I was back business. Now I have Steam installed and the Torchlight game I bought for $5 bucks. I'm a little sad that my computer has Windows on it, but such is life.
*Actually, I should have also backed up my package list (i.e. dpkg --get-selections) and my cron list (crontab -l), then it would have been even more painless. I've updated my backup program to dump out this information as well.
| Reactions: |
Sunday, December 27, 2009
Seven Segment Display in Inkscape
Today I got a little sidetracked while working on my key-train (keyboard training) project. I thought I might spruce it up a little by using a seven segment display for the digits (say for the words per minutes), similar to what kTouch has. I found an open source font, but it appears to be difficult to just use a ttf font in GTK.
So I figured, it's only 10 images, I'll just make them in svg.
I vaguely remembered a heathenx inkscape podcast describing how to make an LCD display and decided to use that at my base. Unfortunately, they didn't provide any source files in the show-notes (as far as I could see) so I had to watch and redo the drawings myself!
By naming each of the seven segments I could create the 10 digits simply by deleting a few elements in one template svg file. I can create the template as beautiful as I like and quickly create the 10 derived images with these programs.
Unfortunately, both ImageMagick and GraphicsMagick don't handle svg blur properly so my little routine to make the nice combined image doesn't work correctly, but here's what a blurred (glowing) digit might look like.
So the you have it, some open source 7 segment SVG digits for you to use.
So I figured, it's only 10 images, I'll just make them in svg.
I vaguely remembered a heathenx inkscape podcast describing how to make an LCD display and decided to use that at my base. Unfortunately, they didn't provide any source files in the show-notes (as far as I could see) so I had to watch and redo the drawings myself!
By naming each of the seven segments I could create the 10 digits simply by deleting a few elements in one template svg file. I can create the template as beautiful as I like and quickly create the 10 derived images with these programs.
So the you have it, some open source 7 segment SVG digits for you to use.
| Reactions: |
Monday, December 14, 2009
Choo choo, get on the Key-Train
Well I've done it again, started another open source project. Renata and I want Victor to learn how to touch type, but these days, it's hard to find a school that teaches just that.
So I looked at what available in open source and found KTouch. It's pretty good however I found some issues with it:
So I looked at what available in open source and found KTouch. It's pretty good however I found some issues with it:
- The lecture files aren't very obvious. It's not clear, for example, that it has already loaded the default lecture file.
- The keyboard is rather plain looking.
- The scrolling text area you type in is nifty, but gets in the way for advanced users. My typing speed is limited to how fast it can scroll back. Also, as you get near the end of the line it's becomes difficult to see what characters are coming up, slowing you down and creating additional errors.
- Like many other typing tutor programs, it shows only one line of text at a time, it's not obvious how many lines you have left to do. The first time I ran it I thought it was going to go on forever.
- It doesn't teach you proper hand positions very obvious (i.e. it doesn't show a picture of the hands in position).
- It forces you to learn the space and return key very early. It also doesn't show you how you should click them (i.e. use the thumbs for the spacebar and pinkie for the enter key).
- It allows you to type-in mistakes, forcing the student to learn the backspace key very early as well.
- The progression of keys is rather odd. It teaches the C, N and T keys before G and H keys for example.
- It doesn't teach all the keys, Comma, Dot, Slash, and Quote keys are never taught, for example.
I also found that the BBC has a nice online keyboard trainer that does a good job in many respects.
I decided to try my hand at making a keyboard training program for Linux with PyGTK. I already have some experience with keyboards in my key-mon project, although this project looks like it'll be a little bit larger in scope.
Here's what I want to include, eventually:
- Show the hand positions. I'm taking photographs of my hands and digitizing the outline with Inkscape, like I did above.
- Have a nice looking keyboard, the one above is an early (ugly) version.
- Show the whole lesson in one big textbox. Thus it will be obvious when you're done and how far you have to go.
- Use interesting text. I'm thinking of grabbing pages from Wikipedia (like above) and using that instead of randomized text for the more advanced levels.
- Use real words when possible. Use the aspell dictionary to verify if the words exist in the chosen language.
- Use bi-grams and tri-grams from the chosen language instead of random sets of characters (I believe that is what KTouch does as well).
- Automatically drop incomplete or weird training sessions to not adversely affect the final scores and progression statistics. For example, you started training and then the phone rang.
- Have it all scalable, by using SVG for all the graphics.
- Have lots of options. For instance:
- Show (or not) the keyboard depending on the level.
- Permit mistakes or not, i.e. forcing the student to hit the backspace or not.
- Show the key the user typed on the keyboard or not. Could be distracting.
- Show where the key is on the keyboard when the student makes a mistake.
- Sound on/off.
Grabbing text from Wikipedia isn't that difficult and I'm contemplating using text from there for the advanced lessons. My first thought was to use text from Project Gutenberg, but I found it difficult to find useful text there in other languages. Also, it's too easy to grab possibly inappropriate text, and the text in Gutenberg is all old, and may contain language that isn't in common use today. Wikipedia is modern, safe, clean, interesting and has article standards.
I'm also planning to grab Wikipedia text to get some rough bi-gram and trigram frequencies for each language for 'random' text. It won't be perfect, but who needs perfect?
Last night I decided that I'll create the image for the keyboard on the fly. They keyboard shown above was created with my Inkscape plugin. The original idea was to use this only as a starting point and then to pretty up the graphics afterwards. I realized, however, that always building the keyboard on the fly gives me more flexibility for the keyboard layout (ex. international keyboards). It also will be easier to highlight better what keys you are learning, what keys you've already been taught and what keys have yet to be taught.
You'll find the code at key-train, but it's not quite usable yet, I still have some work ahead of me!
Labels:
gtk,
opensource,
python
| Reactions: |
Wednesday, December 09, 2009
Keyboard Monitor is being used
I saw this week that Meet the Gimp is using my keyboard monitor program and gave me nice plug as well.
It was thrill, but bittersweet, since key-mon still doesn't support the Wacom table (and I don't know how to fix it).
I also feel it could look a little better (at least that I can fix).
It was thrill, but bittersweet, since key-mon still doesn't support the Wacom table (and I don't know how to fix it).
I also feel it could look a little better (at least that I can fix).
Thursday, December 03, 2009
Feeling a little homesick
Street view has some great shot's of Lennoxville.
Bishop's University
View Larger Map
Lion's Pub
View Larger Map
Also of the the house I grew up in in Montreal.
Exibir mapa ampliado
No street view for Kingston yet. But there's this areal view of where I used to go windsurfing.
Exibir mapa ampliado
Bishop's University
View Larger Map
Lion's Pub
View Larger Map
Also of the the house I grew up in in Montreal.
Exibir mapa ampliado
No street view for Kingston yet. But there's this areal view of where I used to go windsurfing.
Exibir mapa ampliado
Thursday, November 26, 2009
Additions to key-mon
I've been busy and did lots of updates to key-mon, my keyboard status monitor.
The big news is that it's now resizable!
Normal size:

Small size:

Larger size:

It can be scaled to any size not just three, here it is at 2x without the mouse and showing the meta (Windows) key:

Heathenx is helping me get nicer looking images, especially at smaller sizes. For the really small sizes I needed to change the look a bit, so now I have two sets of SVG files, one for the normal size and another for the smaller size.
Creating the different sizes was a bit of a pain. GTK wants to read the svg from disk so any changes made to svg needs to be dumped to a temporary file. Also GTK doesn't seem to have a parameter to load and resize, so I end up manipulating the svg so that it is scaled larger or smaller.
The extra work was worth it, I think. Some screencasts today are high resolution, so the key status monitor will be tiny. Other screen casts are very small, so the key status monitor takes up a lot of space. Now application is infinitely flexible and can serve anyone's needs.
Last night I thought of another application. Showing the full keyboard and showing what you are pressing as you press them. A million years ago I wrote an application for school (written in Turbo Pascal 4.0) to help the students learn the keys to Word Perfect 5.x and MS Word 3.x. I could reuse some of the code from key-mon to do something similar, maybe for a typing tutor of some sort.
The big news is that it's now resizable!
Normal size:

Small size:

Larger size:

It can be scaled to any size not just three, here it is at 2x without the mouse and showing the meta (Windows) key:

Heathenx is helping me get nicer looking images, especially at smaller sizes. For the really small sizes I needed to change the look a bit, so now I have two sets of SVG files, one for the normal size and another for the smaller size.
Creating the different sizes was a bit of a pain. GTK wants to read the svg from disk so any changes made to svg needs to be dumped to a temporary file. Also GTK doesn't seem to have a parameter to load and resize, so I end up manipulating the svg so that it is scaled larger or smaller.
The extra work was worth it, I think. Some screencasts today are high resolution, so the key status monitor will be tiny. Other screen casts are very small, so the key status monitor takes up a lot of space. Now application is infinitely flexible and can serve anyone's needs.
Last night I thought of another application. Showing the full keyboard and showing what you are pressing as you press them. A million years ago I wrote an application for school (written in Turbo Pascal 4.0) to help the students learn the keys to Word Perfect 5.x and MS Word 3.x. I could reuse some of the code from key-mon to do something similar, maybe for a typing tutor of some sort.
Labels:
opensource,
python,
utility
| Reactions: |
Monday, November 23, 2009
Created another open source utility key-mon
This weekend I was watching screencasters.heathenx.org a video podcast about Inkscape with the Miro player. Heathenx had to apologize that his key status monitor wasn't displaying mouse activity. This wasn't the first time I've seen problems with this utility, earlier in the year Meet the Gimp also had some problems getting it to work.
I downloaded the program and put in on my machine, and sure enough the mouse wasn't working for me either. Looking at the output, it complained that I have more than one mouse and it was going to pick the last one. It lied, I looked at the code and it actually picked the the first one. I changed the code so that it did pick the last mouse and it worked. I thought of submitting a patch, but I realized that arbitrarily picking the last one might break the program for others for which it was working.
To my delight the code was written in Python, using PyGTK. It wasn't even that much code, I could probably write a similar program to from scratch in a day. I've never used PyGTK (I mostyl have used wxPython), but a little googling showed that it is definitely the better choice in this case. PyGTK is already installed on most linux boxen (unlike wxPython).
At that point I started cataloging the issues I saw with the program:
Instead of having 6 large images for the mouse (normal, left-button, right-button, middle-button, scroll-up, scroll-down), I would need only one for the mouse and 5 other smaller pieces for the buttons and scroll wheel. GTK obeys the SVG document size, so I just need to make them all the same size and everything should overlay in the right location (code).
It also means that I the potential to make the window re-sizable. If the images are two small, I can make the bigger - too large, I can make them smaller (although I haven't done this yet). For many of the keys I can just search and replace the SVG contents to show different text, reducing about 100 keycap images that I would have needed to create.
It's amazing what you can code in a day these days.
Visit to http://code.google.com/p/key-mon/ and have a look.
I downloaded the program and put in on my machine, and sure enough the mouse wasn't working for me either. Looking at the output, it complained that I have more than one mouse and it was going to pick the last one. It lied, I looked at the code and it actually picked the the first one. I changed the code so that it did pick the last mouse and it worked. I thought of submitting a patch, but I realized that arbitrarily picking the last one might break the program for others for which it was working.
To my delight the code was written in Python, using PyGTK. It wasn't even that much code, I could probably write a similar program to from scratch in a day. I've never used PyGTK (I mostyl have used wxPython), but a little googling showed that it is definitely the better choice in this case. PyGTK is already installed on most linux boxen (unlike wxPython).
At that point I started cataloging the issues I saw with the program:
- Doesn't support the Meta (aka windows key).
- Doesn't support the scroll wheel, something that's used quite a bit in graphics programs.
- Need to be root to run it.
- There's no open repository (like code.google.com) to submit patches or issues to.
- Doesn't have a context sensitive menu, you can only change options at the command line.
- The window is not re-sizable.
- If you don't care about the mouse or certain keys - you are out of luck.
Instead of having 6 large images for the mouse (normal, left-button, right-button, middle-button, scroll-up, scroll-down), I would need only one for the mouse and 5 other smaller pieces for the buttons and scroll wheel. GTK obeys the SVG document size, so I just need to make them all the same size and everything should overlay in the right location (code).
It also means that I the potential to make the window re-sizable. If the images are two small, I can make the bigger - too large, I can make them smaller (although I haven't done this yet). For many of the keys I can just search and replace the SVG contents to show different text, reducing about 100 keycap images that I would have needed to create.
The original code used the evdev module by Micah Dowty. With a quick code search I found a more recent version of this module. With this version I could throw it all the keyboards and mouses and it would track them all, thus fixing the mouse problem. Running it's built in demo showed that I could easy keep track of the meta key and the scroll wheel as well. Also, on my machine, I didn't need to be root to run the program another bonus.
I still have some work to do on it (more keys, packaging, refactoring). Here's what it looks like so far: The pale buttons is just the lower dark buttons with a white semitransparent rectangle on top.
It's amazing what you can code in a day these days.
Visit to http://code.google.com/p/key-mon/ and have a look.
Labels:
opensource,
python,
utility
| Reactions: |
Monday, November 02, 2009
More Timelapse
Here's the camera taking images of the evening sky. I stopped it when it got so dark that it was taking nearly 4 seconds of exposure per shot.
Here's the movie made at 25 fps with 900 photos at 5 second intervals.
| Reactions: |
Canon EOS 450D triggered by an Arduino
I was finally able to track down a 2mm stereo plug here in Belo Horizonte (Eletronica Guarani) so I can remotely control my Canon SLR from the Arduino.
It uses two SPDT relay switches, one for the shutter and one for focus. The way it's setup, there's no way I can cross the wires and hurt my camera, even after a few beers. In the photo the black wire is hooked to ground and the blue wire to pin 12 on the Arduino (or Seeeduino in my case). So far I've only used the shutter and have left auto-focus off. Here's my first attempt of a timelapse movie with this setup:
You'll find the code here. This page helped me figure out to hook-up the plug.
Making the movie is a little tricky on Linux. First you'll need to installed GraphicsMagick (a faster version of ImageMagick):
sudo aptitude install graphicsmagickThen you'll need to downloaded and compile from source mpeg2encode to that it can do the conversion to mpeg (this doesn't come included with GraphicsMagick because of some licensing issues).
Finally to do the conversion you need to go to a directory that has all your photos and execute:mkdir -p ~/tmp cd ~/tmp wget http://www.mpeg.org/pub_ftp/mpeg/mssg/mpeg2vidcodec_v12.tar.gz tar xvf mpeg2vidcodec_v12.tar.gz cd mpeg2 make sudo cp src/mpeg2enc/mpeg2encode /usr/local/bin/ sudo cp src/mpeg2dec/mpeg2decode /usr/local/bin/ cd .. rm -rf mpeg2 rm mpeg2vidcodec_v12.tar.gz
This will convert all the jpg images in the directory to 640x480 and create a new file called movie.mpeg (-monitor is to output the progress).gm convert -size 640x480 -resize 640x480 -monitor *.jpg movie.mpeg
It's a good idea to remember to set your camera to the lowest image quality settings before hand so you don't waste time downloading large images that will be downscaled anyway.
| Reactions: |
Halloween Fun with Arduino and LCD
For Halloween this year I did two things. I redid my spinning POV hat. I basicallly, just made it stronger, and lighter since it fell apart last year. To make it lighter I used the Arduino Pro (5V) and two coin style batteries (CF2032) instead of the normal Arduino and the heavier 9 volt battery. I didn't have much time to perfect it so the effect wasn't perfect (code). I really need to put a sensor on it that senses every time it spins around for it to work correctly, at the moment I just guess how fast it's spinning and put in a delay based on that guess. What came out doesn't look that hot:
The second device I made was a little more successful. It was a 16x2 line LCD from sparkfun (GDM1602K rev 2.1) display connected to a button so that every time you pressed it one more friend would be added. I would go up to people and say "Press the button to be my friend on orkut".
There's a colloquialism here in Brazil: "Me Add" which is both a shortening of "Me adiciona" and a perversion of "Add Me" in English.
Two additional items that are still in the mail that might have made things even more interesting are this big red button and the wave shield to make some interesting noises when the button was pressed. Maybe for next year.
The pages that helped me the most to set this up were both from arduino.cc (LCD, button) and the code is here.
Here's what it looks like underneath:
I stole the button from the Mame console I made before. The potentiometer is needed to get the contrast correct (otherwise the text looks either black or empty). I wired the LCD back-lighting so that it was alway on and at 100% (since Halloween is at night). The resistor is just for the button.
Too bad there's no trick or treating in Brazil, otherwise I would have made something scary as well.
The second device I made was a little more successful. It was a 16x2 line LCD from sparkfun (GDM1602K rev 2.1) display connected to a button so that every time you pressed it one more friend would be added. I would go up to people and say "Press the button to be my friend on orkut".
There's a colloquialism here in Brazil: "Me Add" which is both a shortening of "Me adiciona" and a perversion of "Add Me" in English.
Two additional items that are still in the mail that might have made things even more interesting are this big red button and the wave shield to make some interesting noises when the button was pressed. Maybe for next year.
The pages that helped me the most to set this up were both from arduino.cc (LCD, button) and the code is here.
Here's what it looks like underneath:
I stole the button from the Mame console I made before. The potentiometer is needed to get the contrast correct (otherwise the text looks either black or empty). I wired the LCD back-lighting so that it was alway on and at 100% (since Halloween is at night). The resistor is just for the button.
Too bad there's no trick or treating in Brazil, otherwise I would have made something scary as well.
| Reactions: |
Monday, October 26, 2009
I need a weedwacker for my fish tank
I think there are some fish in there somewhere...
Here's what I ended up taking out.
Here's what I ended up taking out.
Here's what it looks like now
Tuesday, October 20, 2009
Making an Arduino Controlled Power Outlet
Over the weekend I created a Arduino controlled power outlet based on this design.
With this connected to a the Arduino I can control the two plugs independently. One end (which I cut an old US style plug) I plug into the mains power, the other end I connect to the Arduino (four connections):
The fit was a bit tight!
I did some tests to see if when the solenoids are on whether is would heat up too much.
After about about a 1/2 hour it did heat up to 32 C° which isn't too bad. So now I'm all set to scare some animals.
With this connected to a the Arduino I can control the two plugs independently. One end (which I cut an old US style plug) I plug into the mains power, the other end I connect to the Arduino (four connections):
The fit was a bit tight!
I did some tests to see if when the solenoids are on whether is would heat up too much.
After about about a 1/2 hour it did heat up to 32 C° which isn't too bad. So now I'm all set to scare some animals.
Labels:
Arduino,
diy,
electronics
| Reactions: |
Wednesday, October 14, 2009
Arduino Sonar Trigger Part 2
The idea this weekend was to setup the sonar with the Arduino so that I can get a shot of the Siriemas that pass daily at the farm, or maybe a hummingbird.
Well that didn't work out so well, turns out that the sonar is affected by the wind. Adding a bit of hysteresis to the code, fixed it for the most part.
I used lua to program the camera, except that it looks like there some issues with it and my Canon SD450. Calling get_shooting() repeatedly causes problems, for example. I got my intervalometer code to work correctly only after removing that test. Here's some timelapse photography that did work.
Well that didn't work out so well, turns out that the sonar is affected by the wind. Adding a bit of hysteresis to the code, fixed it for the most part.
I used lua to program the camera, except that it looks like there some issues with it and my Canon SD450. Calling get_shooting() repeatedly causes problems, for example. I got my intervalometer code to work correctly only after removing that test. Here's some timelapse photography that did work.
| Reactions: |
Monday, October 05, 2009
Canon SD450 Triggered by Sonar and the Arduino
This weekend I played with my Canon PowerShot SD450 (aka IXUS 55) and the CHDK along with the Arduino and the MaxBotix MaxSonar LV-EZ1. The idea is to automatically take pictures when an object moves into frame.
Part of the job involved hacking a USB cable to hook up to the Arduino which I promptly did, as you can see below.
Unfortunately, I was supposed to hack a Mini-USB cable (of which I have a dozen) and instead hacked my (only) Micro-USB cable (oops).
The end I soldered two break away headers and then encased the whole thing with hot glue.
Here's the setup. You can see the sonar on the right. I soldered a female header to it instead of soldering wires directly to the board. The hacked USB cable is connected to ground and pin 13. For the sonar I've plugged it into Ground, 5V, and pin 7.
You may also note that I'm not using the AN (analog) pin on the MaxSonar, but instead the PW (pulse width) pin, unlike most code I saw on the web. The code is near the bottom on this arduino.cc page. My final code for the arduino is here.I should mention that the CHDK is a little tricky to setup on the SD450 for shooting remotely by USB. From what I understand it's supposed to be able to do that out of the box, but it didn't work for me. However, by creating a LUA script for the camera I was able to get this to work.
To finish the project I'm going to glue that bolt you can see under the plastic container which just happens to be the right size for a tripod bolt. I'll also add a potentiometer which I'll hook up to a threshold, how far the subject must be before I take a shot. I'll probably try and take some pictures of hummingbirds near the feeder this weekend.
| Reactions: |
Saturday, August 22, 2009
Has the Web Made Us Better Readers?
In the recent past, when writers used expressions like "Procrustean bed" or "Sisyphean task", they might have been considered rather 'snobby', even if those expressions might have been appropriate.
Today, of course, we can link to the definitions or have the reader search for the definition easily. It think, as long as the article isn't full of these types of references, it isn't too much work for the percentage of readers that may not remember their greek mythology.
Today, writers don't even need to go back to ancient Greece for their archetypes:

"Jumped the Shark" is a great expression for when something has become passé (follow the link if you don't know this one).
"Streisand Effect" is when the attempt to suppress information backfires and just makes it even more widely publicized.
"Take the redpill" when you need to leave your fantasy world and meet reality.
"Dialed Up to Eleven" for when something exceeds beyond, say, 10.
If you grokked all that, I think you might agree that writing on the web can and probably will become richer over time since there's little fear in throwing in an obscure allegory, idiom, metaphore, or colloquialism. You just a click away from being a snob, to being illuminating.
Here's to the end of dumbing down for the masses and instead writing rich, interesting and insightful articles.
Today, of course, we can link to the definitions or have the reader search for the definition easily. It think, as long as the article isn't full of these types of references, it isn't too much work for the percentage of readers that may not remember their greek mythology.
Today, writers don't even need to go back to ancient Greece for their archetypes:
"Jumped the Shark" is a great expression for when something has become passé (follow the link if you don't know this one).
"Streisand Effect" is when the attempt to suppress information backfires and just makes it even more widely publicized.
"Take the redpill" when you need to leave your fantasy world and meet reality.
"Dialed Up to Eleven" for when something exceeds beyond, say, 10.
If you grokked all that, I think you might agree that writing on the web can and probably will become richer over time since there's little fear in throwing in an obscure allegory, idiom, metaphore, or colloquialism. You just a click away from being a snob, to being illuminating.
Here's to the end of dumbing down for the masses and instead writing rich, interesting and insightful articles.
| Reactions: |
Thursday, August 13, 2009
What I'm working On
At Google we have lots of internal tools, many for the command line. On occasion some googler will take one of these tools and make it into an internal web site.
Usually, when this happens I think "Why? The command line tool is much more convenient!". At first, the web site isn't all that useful, but week by week, features get added until the web version is faster, and has more useful features than the command line version.
I started thinking that I have some old programs that I wrote, years ago, which could be better off on the web.
One program I did this to is mm2notes which takes FreeMind MindMap and creates meeting notes. The original version was only for the command line. Already I can see the web version could be far more useful than running from the command line. For instance, I can e-mail the action items to the people that have something to act upon.
Another program that I wrote, even longer ago, was a program to help me learn Portuguese. It had two parts, one to train on the conjugation verbs, the other on writing checks. I wrote it in C++ and and MFC, so you have to run it in Windows.
The other day I had to write a check and I remembered that old (2005) program. I figured it was time for me to learn the Java version of the Google App Engine version with GWT and so I converted the code to Java and GWT.
It's really quite pleasant working with GWT, I have so say. This whole program is client side, you could be practicing writing checks on the airplane. If you run the program in a new version of Firefox or Safari you'll also get the benefit of @font-face css tag which will download a handwriting like font (which I purchased a long time ago from Corel).
The web site is escrevecheque and the source code can be found here.
| Reactions: |
Saturday, July 25, 2009
I'm Liking Mercurial


I've been a longtime user of subversion for source control, and with Google's Project Hosting, that was the only choice.
For a new project I'm working on I decided to try mercurial, instead.
I think I'll stick with mercurial from now on:
- It's very close to subversion for most commands.
- It's incredibly fast.
- I can perform commits without an internet connection.
- It uses only one hidden folder for the whole tree.
| Reactions: |
Subscribe to:
Posts (Atom)























