Skip to main content
Wdowa.1
Associate
May 10, 2021
Question

Safe multitasking

  • May 10, 2021
  • 1 reply
  • 588 views

What is the best way and safer way to make one led blinked and, at the same time, control one motor?

    This topic has been closed for replies.

    1 reply

    TDK
    Super User
    May 10, 2021

    You could set the LED on a timer pin and have it generate a PWM signal with no CPU usage. Then you can control the motor.

    Pretty high-level question. The "best" approach will depend on the details. Doing multiple things at once are why RTOSs exist, if you can accept the complexity/issues that come with them.

    "If you feel a post has answered your question, please click ""Accept as Solution""."