Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit c28c9b1

Browse files
Merge pull request #1233 from per1234/fix-nano-esp32-led-pins
Correct pin numbers for Nano ESP32 LED
2 parents afc8be2 + 286bfec commit c28c9b1

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 changed

‎content/hardware/03.nano/boards/nano-esp32/tutorials/cheat-sheet/cheat-sheet.md‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -346,16 +346,16 @@ There are several examples provided bundled with the core that showcase how to m
346346

347347
## RGB
348348

349-
The ESP32 features an RGB that can be controlled with the `0`, `45` and `46` GPIO. These are not connected to any physical pins.
349+
The ESP32 features an RGB that can be controlled with the `LED_RED`, `LED_GREEN` and `LED_BLUE` pins. These are not connected to any physical pins.
350350

351351
***Some boards from the first limited production batch were assembled with a different RGB LED which has the green and blue pins inverted. Read our full Help Center article [here](https://support.arduino.cc/hc/en-us/articles/9589073738012)***
352352

353353
To control them, use:
354354

355355
```arduino
356-
digitalWrite(46, STATE); //red
357-
digitalWrite(45, STATE); //green
358-
digitalWrite(0, STATE); //blue
356+
digitalWrite(LED_RED, STATE); //red
357+
digitalWrite(LED_GREEN, STATE); //green
358+
digitalWrite(LED_BLUE, STATE); //blue
359359
```
360360

361361

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /