redone button logic for analog

using one analog pin and few resistors