In this set:
5V -> Button -> 10 Ohm Resistor -> splitting into:
- Line to analogIN
- 270 Ohm -> GND
value from AnalogRead should be:
(1 - (10/(10+270)) * 1024 ~= 987
But for some reason I get value ~= 945
Is the equation wrong? Or maybe my Arduino UNO (clone) is corrupted somehow?
Or maybe I should use 100/2700 ohms resistors instead of 10/270 Ohm for better result?
Many thanks for help!