Step 14Final Assembly
All that's left is to program the chip and affix the board assembly to the lid of your jar.
As to how to program the chip, I'm afraid that's a bit beyond the scope of this document and is heavily dependent on what platform of computer you're using and what development environment you're working with. I've provided the source code (written for GCC) as well as compiled binaries but figuring out what to do with them is up to you.
Thankfully, there are loads of good resources out there for getting started with AVR, here are a couple:
http://www.avrfreaks.net/ - This is the penultimate site for AVR. The active forums are indispensable.
http://www.avrwiki.com/ - I found this site quite helpful when I got started.
If there's sufficient interest I may put together a kit so that people don't have to get their hands dirty with the chip programming aspect.
As for attaching the board and battery to the lid, there are probably a million ways to do this but I'm not confident that I've found the best one yet. The methods that I've tried have been to use either epoxy or hot glue. I've already had a few instances of epoxied boards pop off so I wouldn't recommend using that. Hot glue seems to work ok but I have little faith that after a few hot/cold cycles it'll fair much better than the epoxy.
So, I leave figuring out how to attach the board and battery holder to the lid up to you as well. However I will offer a few tips:
-- Be careful that when you attach the battery holder that the two pins don't short out due to the metalic lid. Some lids are insulated, others aren't.
-- http://www.thistothat.com/ -- This is a website that offers glue recommendations based on what you're trying to glue. For glass to metal (the closest approximation I can think of for silicon circuitboard) they recommend "Locktite Impruv" or "J-B Weld". I haven't ever used either.
| « Previous Step | Download PDFView All Steps | Next Step » |

























































By the way, I used Lady Ada's USBtinyISP to program my MCU along with AVRdude in Ubuntu. I'm not sure what the actual correct settings should be used for the fuses though. I used Low: 0x62, High: 0xDF, Extended: 0xFF.
What it boils down to is this: When programming a chip that's already soldered to a finished circuit, don't let the programmer power the process via USB--remove the jumper and install a battery in the firefly circuit, instead.
(Thanks to Lady Ada herself for discovering the solution for me!)