1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
C:\Users\User\AppData\Local\Temp\.arduinoIDE-unsaved202559-2668-sc55uv.ynsj\sketch_jun9a\sketch_jun9a.ino: In function 'void setup()':
C:\Users\User\AppData\Local\Temp\.arduinoIDE-unsaved202559-2668-sc55uv.ynsj\sketch_jun9a\sketch_jun9a.ino:18:6: error: 'ledcSetup' was not declared in this scope
18 | if (!ledcSetup(RED_CH, PWM_FREQ, PWM_RES)) Serial.println("❌ RED 設定失敗");
| ^~~~~~~~~
C:\Users\User\AppData\Local\Temp\.arduinoIDE-unsaved202559-2668-sc55uv.ynsj\sketch_jun9a\sketch_jun9a.ino:19:6: error: 'ledcSetup' was not declared in this scope
19 | if (!ledcSetup(GREEN_CH, PWM_FREQ, PWM_RES)) Serial.println("❌ GREEN 設定失敗");
| ^~~~~~~~~
C:\Users\User\AppData\Local\Temp\.arduinoIDE-unsaved202559-2668-sc55uv.ynsj\sketch_jun9a\sketch_jun9a.ino:20:6: error: 'ledcSetup' was not declared in this scope
20 | if (!ledcSetup(BLUE_CH, PWM_FREQ, PWM_RES)) Serial.println("❌ BLUE 設定失敗");
| ^~~~~~~~~
C:\Users\User\AppData\Local\Temp\.arduinoIDE-unsaved202559-2668-sc55uv.ynsj\sketch_jun9a\sketch_jun9a.ino:22:1: error: 'ledcAttachPin' was not declared in this scope; did you mean 'ledcAttach'?
22 | ledcAttachPin(RED_PIN, RED_CH);
| ^~~~~~~~~~~~~
| ledcAttach
exit status 1

Compilation error: 'ledcSetup' was not declared in this scope