Google Directions to GPS

June 16th, 2010 robin Posted in Internet, Just for Fun No Comments »

I have a Garmin Legend HCx and have recently mounted it on my bicycle again.  I’ve even got local maps on it, so it can even do navigation by following the road, but the options for route planning on the Garmin are somewhat limited…  While Google Maps still has some shortcomings with its directions for walking or cyclists, it has one great advantage: you can grab and drag the route as you please to quickly make a path just the way you like it.  But how can you get that route to your GPS?

Here’s how:

  • In Google Maps, get the directions you want.  Drag the path, click till you’re happy.
  • In the top-right of the screen you’ll see the “Link” link – click on that, and copy the URL to your address bar

  • Now add the string “&output=kml” to the end of the url, and hit enter

  • A download dialogue should now pop up asking you where you want to save the file maps.kml – save it
  • Now use gpsbabel to transfer the track to your GPS.  For my Garmin it works like this:
gpsbabel -i kml -t -f maps.kml -o garmin -F usb:0

And that’s it… :)

AddThis Social Bookmark Button

Fridge alarm

December 23rd, 2009 robin Posted in Just for Fun 2 Comments »

Getting into PIC programming, I thought I’d start small: our fridge sometimes jams open leaking cold air out, and heating up the compressor in the back, burning electricity without end.  I could just be really careful when putting milk in, and always push the door shut, but being lazy, I like reminders – but gentle ones!

So – a little bit of C code, a little bit of soldering, and hey presto: a fridge alarm.

How it works

When the door is opened, the magnet moves away from the reed switch, it opens, and the door_open flag is set.  As time goes by, the LED first blinks slowly, then more frequently… after 30 seconds it is accompanied by an intermittent chirp from the buzzer, and if the door hasn’t closed after a minute, the buzzing and flashing gets really intense.  I don’t think I’ll be able to forget the door open any more!

Want one for yourself?  Get the code and schematics here.

AddThis Social Bookmark Button

Network thermometer

December 18th, 2009 robin Posted in Just for Fun No Comments »

Recently I ordered an AVR microcontroller based ethernet device and some sensors from Tuxgraphics*.  It’s a controller board with an atmega328p processor and ENC28J60 ethernet controller onboard.  You can connect any number of sensors and switches to the processor, so I ordered some to get started: two temperature sensors (IC2 protocol), one air pressure, one humidity and temperature.   That’s just about enough to make a weather station!

Today I got around to soldering it together and trying it out.

Finished controllerOutdoor thermometer

The big surprise: it worked first try: no soldering errors, and the programming worked too: a network enabled thermometer!  A little bit more hacking and I got a second thermometer mounted (in a broken pen body filled with silicon to waterproof it) outside my window.

And now the best part – a few quick scripts, and voila: here you have the current (updated every 5 minutes) temperature data for my house!  Please note – the indoor temperature shown is about 2-3 degrees warmer than it really is in the room because the sensor is near my computer…

Thu Jul 29 16:35:01 2010
DS18S20 Sensor Indoors            = 25.7C
DS18S20 Sensor Outdors            = 19.4C
STH11 Sensor Indoors temperature  = 27.0C
STH11 Sensor Indoors dew point    = 13.5C
STH11 Sensor Indoors humidity     = 45.0%

(or click here for the text file – F5 to update)

Pretty neat eh?  Now I just have to get all the other sensors working, and build something to measure wind and rainfall…

Related links

* If you order from Tuxgraphics, beware that they send from Canada, meaning that you may have to go to the customs to clear it.  In Munich, going to the Customs takes an hour each way, and is a big hassle… The alternative is to have it sent by TNT (they will handle the customs for you), but that costs a lot extra…

AddThis Social Bookmark Button