Close

Trinket Issues

A project log for Thermostat Controlled TV Volume

Controlling TV volume with the house thermostat. If you're thinking WTF? click through for details!

Alex RichAlex Rich 10/28/2015 at 21:462 Comments

Did you know the Trinket uses a firmware bootloader so you can program it via USB? It does, and it's a clever solution since the ATTiny85 has no USB hardware. Somehow, due to my own ignorance, I managed to dick up the bootloader by messing with interrupts. I basically copied and pasted someone else's sleep mode code which included setting interrupts, but I missed the ISR at the end of their code. One of the firmware guys I work with says this can cause bizarre things to happen, and I guess those bizarre things include breaking the bootloader.

So my trinket was bricked which normally would mean buying another one for $6, but in this case it was an Fing disaster because I had already glued it into my $90 Bose remote!!! :

I was relieved when I googled and found these awesome instructions for repairing the bootloader using an arduino uno! https://learn.adafruit.com/introducing-trinket/repairing-bootloader

Finally a use for the Uno which is a massive brick of a board. I thought that thing was obsolete but apparently it can be used as a faux AVR programmer. Pretty cool, this is why I buy shit from Adafruit, they think of everything. Here's a shot of the UNO configured to program my Trinket's bootloader back on.

Believe it or not, it worked on the first try! Super easy, what a cool hack that is. So I fixed my Trinket code and I'm back in business now.

Discussions

marcell marosvolgyi wrote 10/29/2015 at 11:42 point

Cool hack, yes. I use my UNO as programmer too :) and I agree with you on Adafruit. Love to buy their stuff; also to support. Btw: Nice project!

  Are you sure? yes | no

Alex Rich wrote 10/29/2015 at 11:51 point

thanks marcell!  project is almost done and working.  I was impressed that Adafruit figured out how to use my Uno to repair the trinket bootloader, pretty neat.

  Are you sure? yes | no