First of all, yes, I googled, have used the search function et cetera, and my project is quite simple, for I want to use an Arduino to quickly measure up to 6 pieces of my AA-eneloops (the 1900mAh type, of which I have many), which go from 0 to 1.5V if fully charged, and in theory, this is easy: Connect each positive terminal to one of the analog inputs, the negative terminals to ground, and get the readings.
I want however to avoid troubles when there is a) no battery inserted and b) the battery has been dropped in wrong end first.
I had some ideas with diodes and resistors on how to do this properly, but would it not suffice to just to set up the battery holder in parallel with a resistor, and connect this to 3.3V with another resistor and ground and read the input from there?
┌─(battery)─┐ 3V3──R1──┬──┤ ├──GND │ └────R2─────┘ │ └analog input
I think this would work, and it would cover all cases (battery inserted correctly, reversed, or not at all). Am I right, or would it not, or are there better ways to do it?