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.

16
  • The arduino keeps time in microseconds. You can't have fractional microseconds. It only lets you have integer microseconds. floats are inherently inaccurate. They simply cannot hold many values exactly, they're just approximations. Using floats here is not good. You should be using unsigned long variables instead and keeping time in milliseconds instead of seconds. That will greatly improve performance once you get it done and also make your work easier. Commented Apr 28, 2020 at 4:01
  • Arduino can't multithread, but you can certainly have code that is constantly switching back and forth checking each thing once every few microseconds. You just have to write your code to do things in short chunks. It's called "non-blocking" code. Look that up. Commented Apr 28, 2020 at 4:02
  • Answer to #2: It really depends on what exactly you're using. That doesn't sound like a normal limitation. It has to be an issue with either the module you have or the software you're using somewhere. You have to share all those kinds of details if you really want help. Commented Apr 28, 2020 at 4:04
  • Answer #3. You haven't really explained the end goal or what you want to actually accomplish. Are you blinking lights to the beat or something? Either way, there is probably a better way to do it. Commented Apr 28, 2020 at 4:04
  • 1
    What exactly do you mean when you say "pop off"? Commented Apr 28, 2020 at 4:06