LabVIEW Interface for Arduino Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

Button input and utilizing Arduino's internal pull-up resistors

Hey, I'm looking for the simplest way to provide a button input into a digital IO port.

Normally, when not using LabView, I connect one pin of my button to ground and the other to a DIO port.  Then I set that DIO pin as an INPUT and digitalWrite(HIGH); to activate the pull-up resistor. That DIO pin then stays normally high and whenever I push the button the DIO pin is pulled low.

Is this possible with LabView?  I remember reading somewhere that it wasn't but can't remember where, nor can I find it again. 

If this is not possible, what is the easiest way (wiring-wise) to provide momentary push-button input to the arduino via a digital port?

Thanks!

0 Kudos
Message 1 of 3
(4,871 Views)

Should be possible if it works like you explain.  It simply requires a custom LIFA command/function.

0 Kudos
Message 2 of 3
(3,618 Views)

Actually, after reading the documentation, you should be able to do it with no modifications:

http://arduino.cc/en/Tutorial/DigitalPins

Note also that the pullup resistors are controlled by the same registers (internal chip memory locations) that control whether a pin is HIGH or LOW. Consequently a pin that is configured to have pullup resistors turned on when the pin is an INPUT, will have the pin configured as HIGH if the pin is then swtiched to an OUTPUT with pinMode(). This works in the other direction as well, and an output pin that is left in a HIGH state will have the pullup resistors set if switched to an input with pinMode().

  • Set PinMode as Output.
  • Set Pin as HIGH.
  • Set PinMode as Input.
0 Kudos
Message 3 of 3
(3,618 Views)