Use a multimeter to measure the current. Then use it to measure the voltage.
HiI have made a project on automated street lighting system using IoT. I have used 4 LEDs of 10mm each connected to 4 resistors of 4.7k each parallely and with a single LDR, 9 V battery and ESP8266. Now I want to calculate the power consumption of whole system during its functioning.Please tell me how to measure power consumption of my project. Is there any requirement of separate hardware or any piece of code is sufficient to know power consumption.Also is there any effect on power consumption if LDR senses for particular time period. Please rovide your views.