Asked
— Edited

I believe I know how to do this but I want to confirm. Using an adc port, I would connect the positive to the in on the button and the ground to the signal/receive? yes or no?
I believe I know how to do this but I want to confirm. Using an adc port, I would connect the positive to the in on the button and the ground to the signal/receive? yes or no?
Like a momentary switch as in a bumper or something? If so I would do it on a digital port, not analog...In that case you wire the button between signal and ground pins on your ezb...
You could do it on either an adc port or digital port.
ADC would be across signal and vcc. When the switch is closed it makes the circuit which puts the voltage on the signal pin and can be detected by ARC.
Forgot to mention, on the digital port... reading the digital port with the button attached will return 0 or 1 depending on whether the button is pressed or not.... No matter which way you do it, it is between signal and ground (vcc as Rich stated)... do not use the red voltage pin...
Thanks guys. Richard, I wanted to use adc for port conservation. Thanks though.
Hey no worries... Glad you got it worked out...
Cheers
Keep in mind that you may want a pull up or pull down resistor to avoid false positives.
Your body has an electro static field. When you put your hand near the switch, it may return a false positive because your body will discharge to the floating input pin.
Resistors help prevent that
ooops... Forgot about that... Thanks DJ...
It's okay, because I would only be using the button as a fun little "press to do action" setup.