Enabling pull-ups on analog ports

Hi there,

I would like to be able to enable the pull-up resistors on the analog ports of the grovepi so that when a sensor is not plugged in I will always get the same value when reading the port.

Does the grovepi have internal pull-ups, and how would I access them in my python script?

Hi,
Right now you cannot enable the pullups on the GrovePi from the Raspberry Pi. You can modify the firmware a bit to do it. Arduino documentation does warn against doing that http://arduino.cc/en/Tutorial/AnalogInputPins .

We have not tried this at our end. If you still want to try it, this should help: http://www.dexterindustries.com/GrovePi/engineering/grovepi-protocol-adding-custom-sensors/ . On the python library, you’ll have to modify this https://github.com/DexterInd/GrovePi/blob/master/Software/Python/grovepi.py#L78-L83 and on the firmware this https://github.com/DexterInd/GrovePi/blob/master/Firmware/Source/v1.1/grove_pi_v1_1/grove_pi_v1_1.ino#L60-l61 to accomodate the different modes.

Let us know how the test goes if you try it.

-Karan