I'm rather new to Arduino. I've been performing some current consumption measurements lately, with a INA219 current sensor, on the blue LEDs from a starter kit.
I plugged three LEDs, on pins 2, 3, and 4 of my Arduino UNO, and wrote a simple script:
digitalWrite(led1, 1);
delay(2000);
digitalWrite(led2, 1);
delay(2000);
digitalWrite(led3, 1);
delay(2000);
digitalWrite(led1, 0);
digitalWrite(led2, 0);
digitalWrite(led3, 0);
Which turns on the leds one by one, and finally turn them off at once. I measured the current consumption of the first LED, and measured that:
- When it's the only one on, LED 1 consumes ~23.5 mA
- When the second one is on, LED 1 consumes ~21.7 mA
- When the third one is on, LED 1 consumes ~20.2 mA
Could you please tell me why it behaves that way ? Is there any source I should read that would formalize that ?
Thank you