logoalt Hacker News

dlcarrierlast Sunday at 4:16 AM2 repliesview on HN

    It highlights that an idle loop in Arduino is energetically detrimental.
That's not particularly uncommon. Many compilers or OSes default to wait loops when there's nothing to do, and they can be pretty power hungry.

Replies

retSavatoday at 10:38 AM

Yes, TFA article says they never activated any power-saving, so the idle loop is more or less just staying in active mode, which has the same power consumption as doing calculations.

But one thing the article didn't point out is what hardware peripherals each firmware activated by default. Eg, activating UART might use default pins and activate an UART RX on a pin, which might incur a mA-order penalty. Hence, a useful first step in optimizing power is to identify what functionality you need and ensure all else is always powered down (eg uart rx, clocks and timers, radio peripherals.

mbanzilast Sunday at 9:20 AM

The arduino framework is optimised for ease of use. Battery powered devices were not the target back then when it was created. This benchmark should have used one of the many techniques that optimise for power consumption.