Is there an Arduino function to measure energy consumption within the board?

Hello everyone,

I've lately been trying to measure energy consumption within the Arudino environment, though have been unsuccessful. In my project I'm trying to optimize energy consumption for the Arduino in conjunction with the Arduino WiFi shield though I need to know this information within the Arduino environment rather than just manually through a multimeter. Is there any function of way possible in which I can measure energy consumption spontaneously without having to do so manually(exactly as how the millis()/micro() function works but with energy consumption instead of time)? I understand this may require more energy but I that won't make a difference in my project.

I realllly need help and have been trying to find any way possible. If anyone has any suggestions it would be greatly appreciated!!!

Thank you very much!!!

The Arduino board itself can't tell how much energy it's using, but you can always find a current sensor, connect it to the Arduino's input power line and check the readings with the Arduino.

Remember that many available sensors are not extremely accurate, and make sure the one you get lets current pass through it even when the sensor itself gets no power- otherwise the Arduino will not be able to start :slight_smile: