Hi Everyone
attached is some code i have written for a timer for freeflight model aeroplanes.
it uses an ATtiny85 powered from 1 LiPo cell to drive a motor that activates a dethermalizer mechanism on the aeroplane.
The code works so far, but i would like to have it go to sleep when it has triggered or when the voltage is too low, untill the reset button is pressed. the reset uses the ATtiny's reset pin.
i borrowed the sleep code from Jack Christensen.
i measure battery voltage with code from here: http://provideyourown.com/2012/secret-arduino-voltmeter-measure-battery-voltage/
in Jacks sleep code, it disables the ADC. will this persist after a reset? will i have to enable it in the setup each time?
i have had a go at adding sleep to my code and was wandering if i have implemented it correctly. i do not need wake on interrupt, as i use reset to start the program again each time. i cant test yet as i am waiting for my new ATtiny's to arrive
any advice would be appreciated.
dylan_atttiny_dt.ino (8.85 KB)