Netduino home hardware projects downloads community

Jump to content


The Netduino forums have been replaced by new forums at community.wildernesslabs.co. This site has been preserved for archival purposes only and the ability to make new accounts or posts has been turned off.
Photo

Connect Push-Button to Analog-Pins

button analog

  • Please log in to reply
2 replies to this topic

#1 nhale

nhale

    Advanced Member

  • Members
  • PipPipPip
  • 64 posts
  • LocationHeidelberg, Germany

Posted 10 September 2013 - 10:01 AM

Hi,

 

as my digital pins are nearly all in use, I asked myself if there is a possibility to connect a pushbutton like this one (http://www.conrad.co...product/706140/) [font="arial, helvetica, sans-serif;"]to the Analog pins?[/font]

 

Is this possible via the analog pins and if yes, is there some kind of tutorial how to do it with the analog pins?

Is there some restriction in the cable length between button and pin? Do I need additional resistors or something like that? (sorry I'm no electronics guy ;-))

 

Thanks in advance.



#2 CW2

CW2

    Advanced Member

  • Members
  • PipPipPip
  • 1592 posts
  • LocationCzech Republic

Posted 10 September 2013 - 12:24 PM

The analog pins also have digital I/O function, they work as InputPort, OutputPort etc. parameters just fine. They will switch into analog mode when you pass them to AnalogInput class. There is one difference though, the analog inputs are not 5V tolerant, so you'd want to use 3.3V input signal only. The buttons should work fine, there is generally no restriction of the cable length, as long as the resistance is low enough so the voltage is between logic level thresholds. I am not sure what is the mechanical construction of the button, you'd probably need to add a debouncing circuit (resistor and capacitor), or handle it in software - there is lot of examples available on the Internet, and it has been discussed on the forum too...



#3 nhale

nhale

    Advanced Member

  • Members
  • PipPipPip
  • 64 posts
  • LocationHeidelberg, Germany

Posted 10 September 2013 - 03:52 PM

Ok, thanks, when they are also just Digital IO's then there is already some example on the Wiki here.

Many thanks!!!







Also tagged with one or more of these keywords: button, analog

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

home    hardware    projects    downloads    community    where to buy    contact Copyright © 2016 Wilderness Labs Inc.  |  Legal   |   CC BY-SA
This webpage is licensed under a Creative Commons Attribution-ShareAlike License.