Hello,
i recently built a project with an attiny45. The attiny is powered by a 9V battery with a 5V regulator.
Unfortunately the battery is empty after a few days, because the attiny consumes about 4.8 mA while doing nothing.
I read about a sleep mode in the manual, so the attiny could wake up on a button-press for example.
What code is needed for the sleep mode?
(I'm programming the attiny with arduino code, like described here)