multiple button values on one analog pin

Discussion in 'Embedded Systems and Microcontrollers' started by Fariida, Feb 10, 2015.

  1. Fariida

    Thread Starter New Member

    Jan 22, 2015
    13
    0
    Hi,

    I am trying to put together some code for a binary clock and want to use analog pins to be able to turn on and off the leds, change minutes and hours. My issue here is when no button is selected my serial monitor is getting a value of "10" not "0" I'm guessing its my resistor size but I'm not sure.

    Here is a link to my project. http://123d.circuits.io/circuits/559138-binary-metric-clock
    Just hit "Start Simulator" then click "Code Editor" and "Serial Monitor".
     
  2. mcgyvr

    AAC Fanatic!

    Oct 15, 2009
    4,771
    971
    google "pull down resistor"
    10k should be fine..
     
  3. Fariida

    Thread Starter New Member

    Jan 22, 2015
    13
    0
    Ahh thank you! I did change the pull down to 10k and had to change my code which was enabling the resistor in the pin.
     
Loading...