ledcSetup with ESP32 Core V3.0.0 not work

ledcSetup,ledcAttachPin,ledcWriteNote,ledcWrite not work with ESP32 Core V3.0.0 .
showing Error.Anybody have any solution. But ESP32 core V2.0.17 work fine. ESP32 Core V3.0.0 how to use ledcSetup,ledcAttachPin,ledcWriteNote,ledcWrite ?

I am Using Arduino IDE V2.3.2,
ESP32 WROOM-DA

Why did you start a topic in the Uncategorised category of the forum when its description explicitly tells you not to ?

Your topic has been moved to a relevant category. Please be careful in future when deciding where to start new topics

Hi @Masiur20006. You can find some information on the subject in the migration guide provided by the ESP32 developers here:

https://github.com/espressif/arduino-esp32/blob/master/docs/en/migration_guides/2.x_to_3.0.rst#ledc

3 Likes

Lastly Found

ESP32 with Core V 3.0.0

Using ledcAttach, ledcWriteNote, ledcWrite, ledcDetach, below my Code

Some known code parameter change..

Like channel replace Pin No(port No)

#define soundpin 4

void setup() {

  Serial.begin(115200);
  delay(6000);
  Serial.println("Buzzer Start");

  ledcAttach(soundpin,NOTE_A,7); //ledcAttach(uint8_tpin,uint32_tfreq,uint8_tresolution); for ESP core V3
  
  delay(115); 
  ledcWriteNote(soundpin,NOTE_A, 7);    // PIN, frequency, octave for ESP core V3
  delay(900);
  
  ledcWrite(soundpin,0); // No sound 
  ledcDetach(soundpin);  
  Serial.println("Buzzer Stop");
}

void loop() {

}
1 Like

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.