There And Back Again, A Servo Project
Monday, April 28th, 2008Apologies to Tolkien, of course! (There really is nothing too geeky for my blog, though.) This project lets you set two positions for a standard hobby servo and switch between them. It brings together most of the things I’ve learned about the AVR thus far: digital I/O, switch debouncing, analog-to-digital conversion, servo control and persistent storage in the onboard eeprom. It doesn’t currently use interrupts, but they are pretty similar to the timer that drives the servo. I built it on one of my EMSL mini dev boards so I’ve only tried the code on the ATmega168, but it should be pretty portable to other AVRs.