Search found 1 match

by dj.petr
Sat May 11, 2024 2:23 pm
Forum: General Discussion
Topic: PWM for low-cost ClassD audio amplifier
Replies: 1
Views: 703

PWM for low-cost ClassD audio amplifier

Hi, everyone! I´m new in ESP and I need to control duty of PWM by analogue signal connected to the internal ADC. I have this code: const int analogInputPin = 36; const int pwmOutputPin = 2; void setup() { pinMode(analogInputPin, INPUT); ledcSetup(0, 78000, 10); // freq of PWM 78kHz, 10bit ledcAttach...