LVMakerHub / LINX

LabVIEW Community Edition LINX
Other
108 stars 114 forks source link

Feature request: control (enable/disable) internal pullup resistor Arduino #61

Closed Ryton closed 9 years ago

Ryton commented 9 years ago

Is it (would it be) possible to use (enable/disable) the internal (weak) pullup-resistor trough a LINX function from Labview on a digital Arduino pin?

Probably you know, but arduino's have a build in, switchable pullup resistor on most pins.

In arduino code, this switching is done by writing setting the pinMode to INPUT_PULLUP http://arduino.cc/en/Reference/PinMode

Is this possible already, with the current LINX code? In other words; is there a "hex-command" reserved already for this? I think not, but could be wrong?

EDIT: I see in the source code (linx.ino under arduino) that it already exist! Therefore, you can ignore this. Thus, you can safely close this issue (sorry for the disturbance...)

case 0x0040: // Set Digital Pin Mode linxSetDigtalPinMode(commandPacketBuffer, responsePacketBuffer);

I'll try to get it working. If not, I'll discuss it further on the forum.

Ryton commented 9 years ago

Hmm, sorry, reopened this issue again... Because I see in the source code (LINX.ino) that this command is calling: pinMode(digitalPin, digitalVal); I assume I should send the string as a part of the payload to the LVH-LINX.lvlib:Device.lvlib:Unpack DI Values?

I see that the digital pin mode.ctl contains an Input and OUTPUT dropdown menu, so, assuming this code snippet is proper, I'll try to add INPUT_PULLUP then and send this as a command packet.

Ryton commented 9 years ago

Last but not least: I'm an idiot :1234: I finally found the "Set Digital Pin mode.vi"... Forgive my ignorance (case closed)

PS: one thing maybe: still adding INPUT_PULLUP would make sense :-)