Step 2Programming the microcontroller
The C code supplied does not include on/off button functionality, this should not be hard to add. you could also add a battery-voltage tester to sense when the battery is dead (this is important for lithium-ion, they are permanently damaged by discharging too much). to make a battery-voltage tester, you could (i think!) use a 3.0V zener diode and 220k resistor across the battery, and use the a-to-d converter on the mega8 to compare when the battery voltage falls below the zener reference voltage.
| « Previous Step | Download PDFView All Steps | Next Step » |
![]() |
Add Comment
|









































