Forum Software Ferduino code Enable pullup pin digital

Enable pullup pin digital  [SOLVED]


Post Number:#1 Post Mon Feb 20, 2017 5:05 pm
Posts: 101
Topics: 22
Solve rating: 0
Joined: Wed Sep 10, 2014 7:07 pm
Topics: 22
Age: 49
Gender: None specified
National Flag:
Italy
Hello
I would have the need to activate the resistance of pullup on a arduino digital pins to use it for a sensor but in the ferduino code is not active


const byte sensoreosmosi = 13 ;

pinMode(sensoreosmosi, INPUT_PULLUP);



logically pin 13 I'm using I freed from fanpin on which I assigned another pin

but unplugged always remains low

if I try without the card ferduino code works fine

Post Number:#2 Post Mon Feb 20, 2017 5:41 pm
Posts: 1699
Topics: 38
Images: 301
Solve rating: 233
Joined: Mon Mar 03, 2014 5:59 pm
Topics: 38
Age: 39
Location: São Paulo
Gender: Male
National Flag:
Brazil

Hi!

Firstly I think you should follow this "consiglio" and try learn the basic first.

Secondly this type of problem haven't anything related with Ferduino code so should be asked in Arduino forum.

Thirdly you should read Arduino documentation before ask.

Look for this page: https://www.arduino.cc/en/Tutorial/DigitalPins

NOTE: Digital pin 13 is harder to use as a digital input than the other digital pins because it has an LED and resistor attached to it that's soldered to the board on most boards. If you enable its internal 20k pull-up resistor, it will hang at around 1.7V instead of the expected 5V because the onboard LED and series resistor pull the voltage level down, meaning it always returns LOW. If you must use pin 13 as a digital input, set its pinMode() to INPUT and use an external pull down resistor.


Therefore this behaviour is expected on pin 13.

Best regards.
Post your doubts on forum because it can help another user too. Just PM me for support if it's absolutely necessary.

Post Number:#3 Post Mon Feb 20, 2017 8:25 pm
Posts: 101
Topics: 22
Solve rating: 0
Joined: Wed Sep 10, 2014 7:07 pm
Topics: 22
Age: 49
Gender: None specified
National Flag:
Italy
thank you and excuse me

however, I followed the advice I read such a book, but I find it hard to understand how it works equally




Return to Ferduino code





Who is online

Users viewing this topic: No registered users and 1 guest

cron