void setup() {
// put your setup code here, to run once:
Serial.begin(115200);
Serial.println("Hello, ESP32!");
ledcSetup(0, 30000, 10); //pwm频道, 频率, 精度
ledcSetup(1, 30000, 10); //pwm频道, 频率, 精度
ledcSetup(2, 30000, 10); //pwm频道, 频率, 精度
ledcAttachPin(15, 0);
ledcAttachPin(16, 1);
ledcAttachPin(17, 2);
}
void loop() {
// put your main code here, to run repeatedly:
delay(10); // this speeds up the simulation
}
Loading
esp32-devkit-c-v4
esp32-devkit-c-v4