Skip to content

Commit

Permalink
Fix ledcAttach for esp32 idf5
Browse files Browse the repository at this point in the history
  • Loading branch information
tyeth committed Dec 12, 2023
1 parent f23a113 commit 0c66766
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions examples/colorview/colorview.ino
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,9 @@ void setup() {

// use these three pins to drive an LED
#if defined(ARDUINO_ARCH_ESP32)
ledcAttachPin(redpin, 1);
ledcSetup(1, 12000, 8);
ledcAttachPin(greenpin, 2);
ledcSetup(2, 12000, 8);
ledcAttachPin(bluepin, 3);
ledcSetup(3, 12000, 8);
ledcAttach(redpin, 12000, 8);
ledcAttach(greenpin, 12000, 8);
ledcAttach(bluepin, 12000, 8);
#else
pinMode(redpin, OUTPUT);
pinMode(greenpin, OUTPUT);
Expand Down

0 comments on commit 0c66766

Please sign in to comment.