I have an Arduino UNO R3 where I’ve set Pin 13 to “HIGH” (as shown here) and I’ve connected an LED to Pin 13 and GND which glows brightly using a USB attached to my MacBook Air providing (I think) 5V.
Now, I’m powering the Arduino externally using a 3V (1.5+1.5) battery and the 5V/GND connection. The green light blinks showing the Arduino is being powered and the bulb glows since it’s the same circuit.
Now, I wish to connect the USB to the Arduino and basically read the voltage of the LED via Pin 13 and the GND connection. Of course, I could accomplish this by simply attaching a multimeter but that’s not the problem since it’s not the true aim of the project (which I can state if required but it’s more complicated and not too different). But when I connect the USB the LED glows brighter and the voltage across it is around 3.5V (higher than what the battery is supplying). I want the computer to read the voltage of the battery and not supply the arduino with it’s own power. How do I accomplish this (note: I’m allowed to break certain circuitry on the Arduino but I’d prefer to do this as last resort)?
Basically, how do I read voltage readings on a computer off an arduino without powering the arduino i.e. How do I convert the USB port and my computer into a multimeter with the arduino?
(I'm very new to experimenting with this so may have made crushing mistakes. Any help is appreciated)