Voting resources, early voting, and poll worker information - VOTE. ... Adafruit is open and shipping.
0

multiple LEDs with PWM
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

multiple LEDs with PWM

by Rcayot on Sun Mar 22, 2020 11:25 am

I was wondering if it was possible to control two or more LEDs with PWM simultaneously, without resorting to advanced individual timers etc.

Such as pulsing two LEDs with different periods at the same time.

I have searched and not found any examples, but maybe I missed something.

Either CircuitPython, or Arduino IDE will work on my Metro M4 Express.

Roger

Rcayot
 
Posts: 63
Joined: Sat Feb 08, 2020 6:48 pm

Re: multiple LEDs with PWM

by kcl1s on Sun Mar 22, 2020 11:52 am

This guide may be what you are looking for. https://learn.adafruit.com/multi-tasking-the-arduino-part-1

Fellow hobbyist
Keith

kcl1s
 
Posts: 1511
Joined: Tue Aug 30, 2016 12:06 pm

Re: multiple LEDs with PWM

by Rcayot on Sun Mar 22, 2020 2:47 pm

Thanks Keith. I used the first part of that on another project. Thanks for removing nding me!

Roger

Rcayot
 
Posts: 63
Joined: Sat Feb 08, 2020 6:48 pm

Re: multiple LEDs with PWM

by kcl1s on Sun Mar 22, 2020 4:02 pm

Give it a try. If you get stuck, post your code effort and we will try to help.

Keith

kcl1s
 
Posts: 1511
Joined: Tue Aug 30, 2016 12:06 pm

Please be positive and constructive with your questions and comments.