3 ms·
When trying to squeeze runtime out of a battery, you want all pins to be 0v or Vcc with no current flowing. That means that if you're connected to an LED, set
by londons_explore 5y ago
When trying to squeeze runtime out of a battery, you want all pins to be 0v or Vcc with no current flowing. That means that if you're connected to an LED, setting the pin to an input is a very bad plan. The voltage will sit around 1 volt, which will cause internal circuitry within the microcontroller to use substantially more current - in some cases multiple microamps (compared to nanoamps for some microcontrollers sleeping).