By Darryl Mocek on May 15, 2013
Let's not forget efficieny as it pertains to power...important for embedded devices, especially battery powered ones. I mentioned avoiding idle tasks in the last installment and the suggestions here build on that same theme (CPU (therefore power) conservation):
Avoid inefficient polling - inefficient polling will keep the CPU busy and waste power. You should spend time thinking about your polling algorithm and optimize it to reduce CPU usage. Can you poll when the CPU isn't being utilized much?
Avoid idling and block waiting on asynchronous events - these are also things which will consume CPU. Instead of waiting, implement a listener pattern so your application is event-driven.
Provide quiet periods to allow the CPU to sleep - any time the CPU is asleep, power is being conserved.
Don’t assume there are multiple CPU cores - coding for multiple cores can place a demand on a single-core machine. Try to code efficiently for the machine you'll be running on.