CubeCell Internal Pullup


i am bit confused. how can i activate the internal pullup resistor for the cubecell?

I’ve tried “pinMode(GPIO4, INPUT_PULLUP);”, but the Arduino IDE showed up an error while compiling.
I took a look in the “ASR_Arduino.h” and found instead of pinMode “INPUT_PULLUP” the pinMode “OUTPUT_PULLUP”. Does it makes sense?

typedef enum
ANALOG = 0, /** \brief High Impedance Analog /
* \brief High Impedance Digital /
* \brief Resistive Pull Up /
* \brief Resistive Pull Down /
OD_LO , /
* \brief Open Drain, Drives Low /
OD_HI , /
* \brief Open Drain, Drives High /
* \brief Strong Drive /
* \brief Resistive Pull Up/Down */

Not an answer yet, but this issue on github is the same question, with an ongoing discussion.

Indeed you can use the OUTPUT_PULLUP (at least, it worked with my own tests). In the github issue mentioned above I’ve added a snipped from the documentation. You could write the following code:

// setup
pinMode(pin, OUTPUT_PULLUP);
digitalWrite(pin, HIGH);
// later, e.g. loop

If you cannot change the code, e.g. because it is in a library: I’ve created a pull request with a workaround (defining a macro that accepts INPUT_PULLUP/DOWN as well). Again, see github.