43c43
< ledcWriteTone(pwmChannel, 0);
---
> ledcWriteTone(pin, 0);
50c50
< ledcWriteTone(pwmChannel, computedNote.frequency);
---
> ledcWriteTone(pin, computedNote.frequency);
90c90
< ledcWriteTone(player->pwmChannel, 0);
---
> ledcWriteTone(player->pin, 0);
102c102
< ledcWriteTone(player->pwmChannel, computedNote.frequency);
---
> ledcWriteTone(player->pin, computedNote.frequency);
212,214c212,213
< ledcSetup(pwmChannel, 2000, resolution);
< ledcAttachPin(pin, pwmChannel);
< ledcWrite(pwmChannel, 125);
---
> ledcAttach(pin, 2000,resolution);
> ledcWrite(pin, 125);
220,221c219,220
< ledcWrite(pwmChannel, 0);
< ledcDetachPin(pin);
---
> ledcWrite(pin, 0);
> ledcDetach(pin);
It gives several compile errors related to the API changes to the LEDC functions.
I modified
melody_player.cppto make it work. Here is the diff output: