In module 2, unit 1 of the “Learn ESP32 with Arduino IDE” course, which resistor goes where? There is one associated with the button and one with the LED. I am asking because I feel like I should probably know how to assume, given the situation or that one’s with a button and one’s with an LED. I’m can easily trial and error the two options but it’d be more useful to know for some reasoning that I might have missed!
Hi Rob.
I’m sorry for the delay in my response.
The resistor for the button is a 10k Ohm. And the resistor for the LED is a 330Ohm resistor.
Our schematic diagrams present the resistors with their colors. So, you can check a resistor color chart to identify the resistor value. Here’s a good one: https://www.digikey.pt/en/resources/conversion-calculators/conversion-calculator-resistor-color-code-4-band
For example, the resistor next to the LED comes with the following colors:
- orange (digit: 3)
- orange (digit: 3)
- brown (multiplier: 10)
- gold (tolerance: +/- 5%)
So, you have 33×10 = 330Ohm resistor
I hope this helps.
Let me know if you need anything else.
Regards,
Sara
So the pin is not floating. The resistor goes to one of the extremes (5V or GND). When you press the button the pin goes to the other extreme. Otherwise with a floating pin you could get almost any reading. And if you did not have the resistor you would be connecting 5V directly to GND which could blow up the pin.