Arduino - Set Input_Pullup

90 views
Skip to first unread message

Gavin Morris

unread,
Oct 5, 2016, 5:02:23 PM10/5/16
to Satellite CCRMA
Anyone know if it possible to set the Digital Input pins to high from Pure Data using Firmata?Pduino?

I can't work out how to do it.

Andrew Piepenbrink

unread,
Oct 5, 2016, 8:28:20 PM10/5/16
to Satellite CCRMA
Gavin,

The solution is to write a '1' to the digital pin you want to read; this will turn on the pullup resistor. This struck me as counterintuitive, but even though the pin is in INPUT mode, you can still write to it to manipulate the pullup. Note that this is not just a Firmata thing, but is actually available in the Arduino language as well as described here (even though they say it's a "prior to Arduino 1.0.1" thing, I just tested it under 1.6.5 and it seems to work fine). So in Pduino you would set your pin (say, pin 5)
to input mode, then send a message 'digital 5 1' to the 'arduino' object. That should do the trick.

- Andrew

Gavin Morris

unread,
Oct 12, 2016, 3:55:45 AM10/12/16
to Satellite CCRMA
It took me a while to get back on this one but thank you very much!
Reply all
Reply to author
Forward
0 new messages