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);
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)