History | View | Annotate | Download (2.1 KB)
Fixed timing in current sensing
The ADC interrupt didn't clear the TIFR timer interrupt flag, whichmeans the ADC wasn't triggered again on the next compare match.
Fixed overflow in current calculation
Switch ADC to timer 1 because timer 0 was taken. Oops.
Untested current RMS calculation
It's not actually RMS, it's variance. Same general idea.
Added current sensing to toolbox