• Skip to main content
  • Skip to primary sidebar

RNTLab.com

The Ultimate Shortcut to Learn Electronics and Programming with Open Source Hardware and Software

  • Courses
  • Forum
    • Forum
    • Ask Question
  • Shop
  • Account
  • Blog
  • Login

Onboard Pullup resistors

Q&A Forum › Category: ESP8266 › Onboard Pullup resistors
0 Vote Up Vote Down
timhuffam asked 6 years ago

Hi.
I’ve just started your book on Micropython with the ESP32/8622 (really great book thanks very much!!).
You mention that the ESPs have internal pullup/down resisters that you can use with the Pin object.  
In your LED and button examples you use resistors in the circuits .  Could you use the ESPs internal resistors instead ?
Thanks
Tim

Question Tags: Resistors
4 Answers
0 Vote Up Vote Down
Sara Santos Staff answered 6 years ago

Hi Tim.
I’m glad you’re enjoying our MicroPython book.
Yes, you can use the internal resistors instead of the 10kOhm resistor on the pushbutton.
In our example, just remove the resistor from the circuit, and set the pushbutton with an internal pull_down resistor as follows:

button = Pin(4, Pin.IN, Pin.PULL_DOWN)

I hope this answers your question.
Regards,
Sara
 

0 Vote Up Vote Down
Sara Santos Staff answered 6 years ago

Hi again.
I don’t recommend setting internal PULL_UP or PULL_DOWN resistors on the strapping pins (which includes GPIO4) because they may prevent your ESP go into upload/flashing mode and you may have trouble uploading new code to your ESP32.
Here are the strapping pins you should avoid setting the pull_up and pull_down resistors:

  • GPIO 0
  • GPIO 2
  • GPIO 4
  • GPIO 5
  • GPIO 12
  • GPIO 15

You can use pull_up and pull_down resistors on other pins without any problems.

0 Vote Up Vote Down
timhuffam answered 6 years ago

Thanks for the explanation Sara – much appreciated.
Again, thank you for the excellent book (and all the other resources you guys provide) – keep up the great work!
Cheers
Tim

0 Vote Up Vote Down
Sara Santos Staff answered 6 years ago

You’re welcome.
Thank you so much for your feedback. It is very important for us, so that we can improve our resources.
If you have any more doubts, you just need to open a new question.
Regards,
Sara
 

Primary Sidebar

Login to Ask or Answer Questions

This Forum is private and it’s only available for members enrolled in our Courses.

Login »

Latest Course Updates

  • [New Edition] Build ESP32-CAM Projects eBook – 2nd Edition April 16, 2025
  • [eBook Updated] Learn ESP32 with Arduino IDE eBook – Version 3.2 April 16, 2025

You must be logged in to view this content.

Contact Support - Refunds - Privacy - Terms - MakerAdvisor.com - Member Login

Copyright © 2013-2025 · RandomNerdTutorials.com · All Rights Reserved

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.