- Wed Jun 22, 2016 6:32 am
#190337
Hello,
I am trying to understand the 'color selector' project before I move on:
https://learn.sparkfun.com/tutorials/sp ... r-selector
It's just three buttons connected to digital pins and a potentiometer connected to an analog pin which together control the color and brightness of an LED.
The potentiometer is straightforward -- the middle pin inputs to A0 on the redboard and thereby provides a reading.
But I don't understand how the redboard figures out which button has been pressed. Each button is connected to a digital pin. If these pins are providing power, then pressing a button changes its voltage to low. But how does the board obtain that information? If, on the other hand, each button is inputting to the digital pin, where is power coming from?
Best,
-Trent
I am trying to understand the 'color selector' project before I move on:
https://learn.sparkfun.com/tutorials/sp ... r-selector
It's just three buttons connected to digital pins and a potentiometer connected to an analog pin which together control the color and brightness of an LED.
The potentiometer is straightforward -- the middle pin inputs to A0 on the redboard and thereby provides a reading.
But I don't understand how the redboard figures out which button has been pressed. Each button is connected to a digital pin. If these pins are providing power, then pressing a button changes its voltage to low. But how does the board obtain that information? If, on the other hand, each button is inputting to the digital pin, where is power coming from?
Best,
-Trent