Welcome to Synthiam!

Program robots using technologies created from industry experts. ARC is our free-to-use robot programming software that makes features like vision recognition, navigation and artificial intelligence easy.

Get Started
Asked — Edited
Resolved Resolved by Rich!

How To Wire A Button?

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?

AI Support Bot
Related Content
Synthiam
#1  
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...
United Kingdom
#2  
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.
#3  
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...
#4  
Thanks guys. Richard, I wanted to use adc for port conservation. Thanks though.
#5  
Hey no worries... Glad you got it worked out...


Cheers
PRO
Synthiam
#6  
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:)
#8  
It's okay, because I would only be using the button as a fun little "press to do action" setup.
United Kingdom
#9  
Hey guys! Sorry to dig up an older post, but I could do with some assistance wiring in a switch too and this one seems totally relevant.

I'm looking to wire in a push-to-make switch on D0 and am having the floating phenomena too. As @DJ points out, if I put my hand anywhere near the wires it sets D0 to "on" in ARC. Am I right in thinking that I should be looking at a pull-up resistor that is wired up like this? *confused*

User-inserted image


By my understanding, this will mean the signal is in a high-state when the switch is open, and low-state when the switch is closed (as the current now flows to ground).
#10  
Here's how I wire bump switches to the EZB(4)


User-inserted image
United Kingdom
#11  
Thanks @Robot-Doc. Maybe I need to re-research pull-up and pull-down resistors then! *blush* Am I right to say the "+5V" on your diagram relates to the middle pin on the EZB? Also, I calculated a 5k ohm resistor so I'm assuming my maths is totally bogus? Cheers:)

Edit: ... I've just realised you stated EZB v4, sorry I should have mentioned I'm on EZB v3
#12  
I wire mine like @Robot-Doc too. Only I tend to use a 1K resister.

If you use an ADC port you could use multiple switches I believe, sort of like
this.
#13  

Quote:

Edit: ... I've just realised you stated EZB v4, sorry I should have mentioned I'm on EZB v3


V3 same, in fact definitely +5 on the vcc pin. On the v4 it is unregulated pass through from the input voltage.

Alan
United Kingdom
#14  
Thanks @thetechguru and @JustinRatliff, I think I've cracked it with a 5k resistor :)
#15   — Edited
What do you use to see the value and how do you use that to control the robot?
#16  
Judging by your question, perhaps you should start by Googling... "what is a robot" and go from there...
#17  
LOL RR! Glad to see your still around and as much fun as ever. Hope all is well with you in your world. 

Antiboy, There is a ADC meter control in the add control menu. You can wright an EZ script to watch the value returned and have the servos or anything else react to the changes to the values returned.  Have fun.