I had a hell of a time trying to get this to work. Most of the code out there is for the ATTiny85 with the Arduino bootloader, which I’m not using. A lot of the code that I found was old and/or wrong. The AVR programming documentation is somewhat terse and hard to deal with.. not fun at all. All I wanted to do was to find a way to put the ATTiny13A to sleep in power save mode, then wake it up again with the watchdog timer. This just for blinking an LED slowly (slower than in this code) for use as decorative elements in model making. The models are small so the LEDs will be powered by small cells such as LR44’s or R2032’s, so I need to be power efficient. At time of writing, I still haven’t got Atmel Studio (formerly AVR Studio) to run AVRDude properly, but it works fine on the command line, so that’s a fight for another day. On that note – if you want to develop code for the ATTiny13A without the Arduino IDE, you need to install WINAVR even if you are using Atmel Studio. Also, if you’re on Windows, and you’re using a USBASP to program the Tiny, google for an app called “Zadig”. It can install the correct driver for you – you need to choose libusbK rather than the default option.