RGBLed icon indicating copy to clipboard operation
RGBLed copied to clipboard

Support for Arduino ESP32 3.0 API migration

Open The39thBit opened this issue 7 months ago • 0 comments

The API Change currently breaks this project specifically in the RGBLed Constructor for ESP-32 based projects

Maybe change from

        ledcSetup(0, 5000, 8);
	ledcSetup(1, 5000, 8);
	ledcSetup(2, 5000, 8);

	ledcAttachPin(_red, 0);
	ledcAttachPin(_green, 1);
	ledcAttachPin(_blue, 2);

to something like?

        ledcAttachChannel(_red, 5000, 8, 0);
	ledcAttachChannel(_green, 5000, 8, 1);
	ledcAttachChannel(_blue, 50000, 8, 2);

in RGB.cpp

There is also the automatic channel finding of 'ledcAttach()'

Thanks for your work on the project!

The39thBit avatar Jul 22 '24 00:07 The39thBit