I can't seem to use the output pin in open drain mode when using PWM - not sure if I'm doing something wrong or if this is not possible. If I can set it to open drain then I can remove some components from my design.
Code: Select all
const int redPin = 17;
const int freq = 1000;
const int redChannel = 0;
const int resolution = 8;
pinMode(redPin, OUTPUT_OPEN_DRAIN); // doesn't seem to have any effect
ledcSetup(redChannel, freq, resolution);
ledcAttachPin(redPin, redChannel);