So a friend of mine bought himself one of those Battlestar Galactica viper models and wanted to light it up to look as if it was exploding. I started off with this circuit design to mimic the licking flames coming from the ship. As there are only one or two projects out there detailing how to setup three PWM outputs on the ATtiny85 and powering 70mA LEDs, I thought I'd share my design:
1. Code generation:Any good code editor will suffice, I made use of Komodo Edit from ActiveState.com, a free to use editor, but any text editor will work. Just save the code below with the extension "*.c"
2. Compiling:I make use of AVR-GCC on linux, but you can also run AVR-GCC in DOS or make use of the WinAVR application on Microsoft.
Commands:
avr-gcc -g -Os -mmcu=attiny85 -c foo.c
avr-gcc -g -mmcu=attiny85 -o foo.elf foo.o
avr-objcopy -j.text -j.data -O ihex foo.elf foo.hex
3. Upload to ATtiny85I use AVRDude with a USBTinyISP uploading device using the command:
avrdude -c usbtiny -p t85 -U flash:r:foo.hex:i
Comments
Please log in or sign up to comment.