Go Down

Topic: About the INPUT_PUULUP option (Read 735 times) previous topic - next topic

JMD1

Hi guys, today my question is the following:
Is there only one pull-up resistor available? Can I make all the pins with attached pull-up resistor aka enable the pinMode(pin,INPUP_PULLUP) for all?
Thank you.

groundFungus

#1
Dec 03, 2017, 02:46 pm Last Edit: Dec 03, 2017, 02:46 pm by groundFungus
To set all at once I think you need to use direct port manipulation.
 This thread has a discussion on the subject.

JMD1

Damn... the direct port manipulation seems like a pretty difficult task for me... But thanks anyway.
P.S.  So its not possible to use pull-up resistors on several pins?

Grumpy_Mike

#3
Dec 03, 2017, 05:19 pm Last Edit: Dec 03, 2017, 05:20 pm by Grumpy_Mike
Quote
Is there only one pull-up resistor available?
Each pin has its own pull up resistor.

Quote
So its not possible to use pull-up resistors on several pins?
Yes it is possible, just enable them on each individual pin. You can do it in two lines of code.
Code: [Select]

for(int i = 0; i < 21 ; i++){
pinMode(i,INPUT_PULLUP);
}

JMD1


Each pin has its own pull up resistor.
Yes it is possible, just enable them on each individual pin. You can do it in two lines of code.
Code: [Select]

for(int i = 0; i < 21 ; i++){
pinMode(i,INPUT_PULLUP);
}


Thank you so much!!!

Jiggy-Ninja

Hi guys, today my question is the following:
Is there only one pull-up resistor available?
Every pin has its own resistor.

Go Up