Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: Control (enable/disable) internal pullup resistor on Digital pin in Arduino #63

Open
Ryton opened this issue Feb 17, 2015 · 1 comment

Comments

@Ryton
Copy link

Ryton commented Feb 17, 2015

Hi,

in the device lib, there is a function "Digital pin mode" (under Private/device/Peripheral / Digital) which allows to set the digital pin mode for an arduino to either INPUT or OUTPUT. However, there is a 3rd option, enabling the internal pullup resistor, setting the mode to "INPUT_PULLUP".

Could this be added to the library? I tried this myself, since I saw that the LINX firmware for Arduino is already programmed so that it should be possible to send an INPUT_PULLUP command from Labview, but I didn't manage to activate the state of the pullup trough this method. Maybe it's case sensitive?
(Didn't measure +4.9 V level on the pin with a DMM).

PS: Also, at this moment, whenever linxDigitalRead() is executed, the pinmode is -again- set to INPUT in the firmware code. If the input_PULLUP option is going to be implemented, INPUT_PULLUP should become an optional flag (with INPUT as default value) in this LinxDigitalRead() function, accessible from Labview as well.

From LINX.ino (arduino)

void linxDigitalRead(unsigned char* commandPacketBuffer, unsigned char* responsePacketBuffer)
...
//Set Pin As Input (Might Make This Configurable)
pinMode(pinNumber, INPUT);
//Read Pin And Insert Value Into retVal
retVal = retVal | (digitalRead(pinNumber) << bitOffset);

@samkristoff
Copy link
Contributor

Closing Duplicate of this issue (leaving this one open for now)
See https://www.labviewhacker.com/forums/viewtopic.php?f=11&t=480

#65

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants