Interfacing

WiringPi and pull-up or pull-down resistor

5 2174
cgen  
Edited by cgen at Fri Nov 14, 2014 00:35

Hello!

I observe a strange behavior of pullUpDnControl.

This code sets the high voltage at the input pin

  1. pinMode(0, INPUT);
  2. pullUpDnControl(0, PUD_DOWN);
Copy the Code
On the other hand, this code sets the low voltage at the input pin
  1. pinMode(0, INPUT);
  2. pullUpDnControl(0, PUD_UP);
Copy the Code
I think it should be Vice versa.
Can anybody verify ?
phiphi  
Hello,

for me? I did not succeed in using pull up or pull down. Any help

I can confirm:
* Using PUP_DOWN results in a high input.
* Using PUP_UP results in a low input.

I'm using the PBi-R1 with bananian 15.01 and have another problem too: The port numbering does not match. But i guess this is due to the different board layout.

hnsncxy  
Edited by hnsncxy at Mon Jan 26, 2015 21:11
Geldaril replied at Sun Jan 25, 2015 14:45
I can confirm:
* Using PUP_DOWN results in a high input.
* Using PUP_UP results in a low input.


Hi,
Thanks for your feedback.
The problems of the Pull-up and Pull-down have been fixed,  please check the LeMaker github at https://github.com/LeMaker/WiringBP
* Using PUP_DOWN results in a low input.
* Using PUP_UP results in a high input.

Thanks again.

cgen  
Cool !

Thank you all!

Note: The author has been banned or deleted.

You have to log in before you can reply Login | Sign Up

Points Rules