vincentiu:
What do you think?
I think two things after reading that message:
- for 12-bit you need an external ADC as the Arduino's ADC offers only 10 bits resolution (the ATmega processor based ones, that is - some more exotic flavours of Arduino may offer 12-bit or higher resolution).
- that code's indentation is such a mess I can't read it easily. Please fix that first, it's a simple button press (ctrl-T).