Skip to content

Commit

Permalink
Fix LowPower sleep by setting ADMUX to _BV(REFS1) after reading Vcc. F…
Browse files Browse the repository at this point in the history
…ixes Yveaux#7.
  • Loading branch information
danielrheinbay committed Jun 2, 2020
1 parent 2b2362b commit c034076
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Vcc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,9 @@ float Vcc::Read_Volts(void)
// Apply compensation
vcc *= m_correction;

//to fix lowpower drain, ADMUX is changed again.
ADMUX = _BV(REFS1); //fixes readVcc current drain in lowPower

return vcc;
}

Expand Down

0 comments on commit c034076

Please sign in to comment.