Skip to content
This repository was archived by the owner on Jan 3, 2020. It is now read-only.

Add support for reading and subscribing to input pullup #102

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

JAgostoni
Copy link

I was setting up a demo using buttons and ran into problems using the internal pullup resisters on my Arduino UNO and YUN. After looking at the source code, it looks like the PULLUP PinMode is just ignored. This PR adds in support for subscribing to the port and reading the state out of the cache.

Add support for reading and subscribing to input pullup
@jsiegmund
Copy link

+1 for this, spent an entire night trying to figure out why this wasn't working. Pretty sloppy to not give any error but just completely ignore the pinMode imho.

Copy link

@jsiegmund jsiegmund left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested and works as expected.

@zfields
Copy link
Contributor

zfields commented Oct 11, 2016

Thanks for the commit! I'm starting to get back into this project. I'll give it a review and pull it as soon as possible.

@zfields
Copy link
Contributor

zfields commented Dec 30, 2016

This is a good stop gap, but it is not setting the internal pullup resistor on the Arduino. The message defined here, by the Firmata team...

#define PIN_MODE_PULLUP         0x0B // enable internal pull-up resistor for pin

...needs to be added to UwpFirmata.h, and sent to the Arduino during the RemoteDevice::pinMode(). It also needs to be disable when either a strict INPUT or OUTPUT mode is set.

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

Successfully merging this pull request may close these issues.

6 participants