ESP32 Easy short tutorial: Difference between revisions
From wikiluntti
Line 13: | Line 13: | ||
=== Pull Up Resistors === | === Pull Up Resistors === | ||
Enable pull up: | |||
<syntaxhighlight lang="C"> | |||
pinMode(13, INPUT_PULLUP); // Enable built-in pullup on pin 13 | |||
</syntaxhighlight> | |||
Pull up resistors are between a digital input pin and the VCC. Two main purposes: | Pull up resistors are between a digital input pin and the VCC. Two main purposes: |
Revision as of 12:41, 8 August 2025
Introduction
My ESP32 is 32WROOM-32
-
Front side
-
Back side and connections
-
Tx light blinks when serial connection transfers data
Leds:
- Tx led blinks when transmitting data.
Pull Up Resistors
Enable pull up:
pinMode(13, INPUT_PULLUP); // Enable built-in pullup on pin 13
Pull up resistors are between a digital input pin and the VCC. Two main purposes:
- Avoids issues with floating inputs.
- The default "ON" state for inputs like buttons and switches which actively pull the pin low. The pull up resistor keeps the circuit reading high until the button grounds the pin.
Some pins do not have pullup resistors:
- GPIO34
- GPIO35
- GPIO36
- GPIO39
Others do:
Pin Name | GPIO Number | Pull Up? |
---|---|---|
GPIO0 | 0 | Yes |
GPIO2 | 2 | Yes |
GPIO4 | 4 | Yes |
GPIO5 | 5 | Yes |
GPIO12 | 12 | Yes |
GPIO13 | 13 | Yes |
GPIO14 | 14 | Yes |
GPIO15 | 15 | Yes |
GPIO25 | 25 | Yes |
GPIO26 | 26 | Yes |
GPIO27 | 27 | Yes |
GPIO32 | 32 | Yes |
GPIO33 | 33 | Yes |
https://thelinuxcode.com/esp32-pull-up-pins/
Blink
Linux tutorial
Great linux tutorial: https://curiousstuff.eu/post/how-to-blink-the-damn-esp32-built-in-led/