Classes are not essential but help organisation and clarity.
You need discrete PWM objects but you also need a discrete method to control each instance. Create a class object (instantiate) and you have this within the object. If I understand your requirements then run each within a thread.
My interests have taken me over to the Pico and MicroPython where asyncio (asynchronous multitasking) works really well. Each PWM object would then handled within a task, executed by the scheduler.
You need discrete PWM objects but you also need a discrete method to control each instance. Create a class object (instantiate) and you have this within the object. If I understand your requirements then run each within a thread.
My interests have taken me over to the Pico and MicroPython where asyncio (asynchronous multitasking) works really well. Each PWM object would then handled within a task, executed by the scheduler.
Statistics: Posted by dBerriff — Fri Mar 28, 2025 7:32 pm