Skip to content

Commit de211f8

Browse files
committed
set espressif version
1 parent 5a04720 commit de211f8

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

library.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"url": "https://github.com/ClusterDuck-Protocol/ClusterDuck-Protocol"
1616
},
1717
"frameworks": "arduino",
18-
"platforms": ["espressif32"],
18+
"platforms": ["espressif32@6.3.1"],
1919
"license": "Apache-2.0",
2020
"export": {
2121
"include": [

src/DuckLed.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,16 @@ DuckLed* DuckLed::getInstance() {
1010

1111
void DuckLed::setupLED(int redPin, int greenPin, int bluePin) {
1212
#ifdef ESP32
13-
ledcAttach(redPin, 12000, 8); // assign RGB led pins to channels
14-
ledcAttach(greenPin, 12000, 8);
15-
ledcAttach(bluePin, 12000, 8);
13+
ledcAttachPin(redPin, 1); // assign RGB led pins to channels
14+
ledcAttachPin(greenPin, 2);
15+
ledcAttachPin(bluePin, 3);
1616

1717
// Initialize channels
1818
// channels 0-15, resolution 1-16 bits, freq limits depend on resolution
1919
// ledcSetup(uint8_t channel, uint32_t freq, uint8_t resolution_bits);
20-
// ledcSetup(1, 12000, 8); // 12 kHz PWM, 8-bit resolution
21-
// ledcSetup(2, 12000, 8);
22-
// ledcSetup(3, 12000, 8);
20+
ledcSetup(1, 12000, 8); // 12 kHz PWM, 8-bit resolution
21+
ledcSetup(2, 12000, 8);
22+
ledcSetup(3, 12000, 8);
2323

2424
// ledcAttachChannel(redPin, 12000, 8, 1);
2525
// ledcAttachChannel(greenPin, 12000, 8, 2);

0 commit comments

Comments
 (0)