Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 8659

Python • Re: Creating Separate PWM Objects in Multiple Threads

$
0
0
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.

Statistics: Posted by dBerriff — Fri Mar 28, 2025 7:32 pm



Viewing all articles
Browse latest Browse all 8659

Latest Images

Trending Articles



Latest Images