I spent some time during Thanksgiving to build an automatic cat feeder but I’m just now getting around to writing something about it. Our cats want to be fed at 6am but I don’t want to get up to do so. This aims to get them fed and back to bed without waking us up! All the good stuff after the break. Continue reading
Archive for January, 2010
Auto-dine 2009
Posted in Projects with tags atmega8, autodine, AVR, cat, feeder, h-bridge, servo on January 30, 2010 by Mike SzczysWriting a Bus Pirate udev rule
Posted in ubuntu with tags bus pirate, rules, symlink, udev on January 21, 2010 by Mike SzczysIt only took a couple of instances where the Bus Pirate wasn’t linked to /dev/ttyUSB0 before I got sick of that game and wrote a udev rule to create a symlink. Now, every time I plug it in it is available at /dev/buspirate. This simple bit of code creates the rule:
sudo echo 'SUBSYSTEM=="usb", ATTR{idVendor}=="0403", ATTR{idProduct}=="6001", MODE="0660", SYMLINK+="buspirate"' | sudo tee /etc/udev/rules.d/47-BusPirate.rules sudo restart udev
Note: The restart udev command is for Ubuntu 9.10 Karmic Koala. Older version should run “sudo /etc/init.d/udev restart” instead.
That should do it. You can now point your serial terminal program to ‘/dev/buspirate’. This doesn’t differentiate between different devices using the same FTDI chip but I don’t have any others so this isn’t a problem. If you need to specifically pinpoint this Bus Pirate as a unique device, add a compare key that looks at the serial number (ATTRS{serial}==”YourSerialNumberHere”).
Using the Bus Pirate with Ubuntu
Posted in ubuntu with tags bus pirate, ian lesnet, mincom, ubuntu, udev on January 20, 2010 by Mike SzczysIan Lesnet sent me a Bus Pirate to play with, thank you! I’m excited to dig in but first thing’s first, I’ve got to get it running with Ubuntu. It took me an embarrassingly long time to figure out what I was doing so I thought I’d post a quick-start guide for Ubuntu users. Continue reading
Tetrapuzz – Tetris clone for AVR
Posted in AVR with tags atmega168, glcd, ks0108, tetrapuzz, tetris on January 13, 2010 by Mike SzczysThis is a projected that I finished development on over a year ago and I’m just now getting around to documenting it. I wanted to program Tetris from scratch and make it modular so it could be used with different displays. Right now I know it’s working with a KS0108 graphic LCD screen. I also did quite a bit of work on it with the Nokia 3595 screen which is the trunk build of the SVN right now. For this writeup I threw together the KS0108 hardware and loaded that branch of the svn onto the ATmega168 so that I could take some pictures. I’m happy to say it worked like a charm. Details after the break.
First Arduino program
Posted in Arduino with tags Arduino, dragon rider, hello world on January 12, 2010 by Mike SzczysI know this is underwhelming, but everyone starts somewhere. I threw together a “hello world” type of program for the Arduino I just got. It uses the LED array on the Dragon Rider 500 (check out my Instructable) to scan six LEDs attached to pins 0-5 of the Aduino:
int tracker = 0; int myDelay = 80; void setup() { for (int i=0; i<6; i++) { pinMode(i, OUTPUT); } } void loop() { digitalWrite(tracker, HIGH); delay(myDelay); digitalWrite(tracker, LOW); if (++tracker > 5) tracker = 0; }
Thank you SparkFun!
Posted in misc with tags Arduino, FedEx, free day, SparkFun on January 12, 2010 by Mike SzczysThe doorbell just rang and I saw FedEx standing there and thought “Who set me something”? He was holding a red box in his hand and delight washed over me as I realized it was my shipment from SparkFun. I was one of the lucky bastards who got a $100 credit on free day.
This is my first order from SparkFun and I love the way they package their products. I’ve been surprised in the past by the amound of packaging that comes in an order from Mouser. SparkFun doesn’t go with the one-component-model-per-bag, but instead uses up all of the space in each bag by heat sealing the plastic between each collection of parts.
I won’t fill you in on a complete list of items, but I am excited about the Arduino Duemilanove that I ordered. I’ve written about Arduino over at Hackaday so much that the commenters accuse me of being in love with it. I find it ironic because I’ve been purely AVR up to this point but I guess we’ll see what happens. Off now to blink some LEDs.
Thank you SparkFun! By the way, I want to work there.