-
-
Notifications
You must be signed in to change notification settings - Fork 483
Commit 286bfec
Correct pin numbers for Nano ESP32 LED
Arduino pin numbers are an arbitrary numerical identifier for the I/O pins on the microcontroller. They are mapped to
the lower level identifier in the board's core variant. Generally, Arduino functions that take a pin number argument
require that argument to be an Arduino pin number rather than some lower level identifier for the pin, and that is the
case with the Arduino core functions for the Nano ESP32 board.
Previously, the documentation of the pins connected to the RGB LED on the Nano ESP32 board used the lower level ESP32
GPIO pin numbers in the digitalWrite calls in the code snippet. Since digitalWrite requires the use of an Arduino pin
number, not a GPIO number, that code was wrong and did not control the RGB LED as claimed.
When correcting this error, I chose to use the human friendly constants rather than the bare integer literals (14, 15,
16).1 parent a1db178 commit 286bfec
File tree
1 file changed
+4
-4
lines changed- content/hardware/03.nano/boards/nano-esp32/tutorials/cheat-sheet
1 file changed
+4
-4
lines changedLines changed: 4 additions & 4 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
346 | 346 |
| |
347 | 347 |
| |
348 | 348 |
| |
349 | - | ||
349 | + | ||
350 | 350 |
| |
351 | 351 |
| |
352 | 352 |
| |
353 | 353 |
| |
354 | 354 |
| |
355 | 355 |
| |
356 | - | ||
357 | - | ||
358 | - | ||
356 | + | ||
357 | + | ||
358 | + | ||
359 | 359 |
| |
360 | 360 |
| |
361 | 361 |
| |
|
0 commit comments