Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

5
  • 1
    Ahhh that's sorted it, should have known that really. Thanks for your help! Commented Dec 5, 2019 at 15:49
  • I also aligned your code slightly (next time select it and press ctrl-k), to make it better, remove the empty lines and align the code nicer. Commented Dec 5, 2019 at 15:49
  • You're welcome (if it is the correct solution, upvote and accept the answer). Welcome to Arduino Stack Exchange. Commented Dec 5, 2019 at 15:49
  • 1
    I was thinking of a while loop since the title of the OP says "while" but this works just as well if the OP is only spinning a motor in the loop() method. Commented Dec 5, 2019 at 17:55
  • @KingDuken True, probably if he sees the motor is running he has a starting point how to proceed Commented Dec 5, 2019 at 20:14