Hello, I have a question about wiring the arduino for a project i have, I just want to be sure before potentially destroying my board (Im new to this). I have an Arduino Nano and it will be powered by the mini USB (from PC). I want it to read the voltage of another device's USB port (to see if it is powered or not), so basically I want to know if it receives 5v or not.
First question is about the wiring, I presume i would wire the positive to a pin and the negative of the signal wire to the GND of the arduino. Is this correct?Is this even safe?
Second, I'm not sure whether to use an analog pin or digital pin as input since I only care about it having voltage or not (the measurement is not required).
Third, would I need to connect a resistor in series with the 5v signal wire to limit current?
Thanks in advance for your help, and sorry If I'm asking banal questions but I just want to make sure.