0

I did a quick search and couldn't seem to find this question posted already, but I'm sure it must have so forgive me if it's a repeat.

I'm using a piezo and Arduino on TinkerCad to produce notes using the tone function, and the quality is not great (it's as if I can hear beats while the note is playing). I vaguely remember a colleague telling me this was an issue with the way my computer speakers handle square waves (I have a Macbook Air if that makes any difference), but I'm not positive. Has anyone had success in using TinkerCad to produce nicer sounding notes? If not, can anyone explain what the issue is to me?

Thank you!

Setup on TinkerCad Sample Code

2
  • 1
    Seems to be more a Tinkercad problem, than an Arduino problem
    – chrisl
    Apr 2, 2020 at 18:04
  • 2
    Tinkercad is a simulation. It's merely an approximation of how an Arduino works. You can't expect it to be perfect. A bit of glitchiness in sound is nothing to even think about caring about.
    – Majenko
    Apr 2, 2020 at 18:10

1 Answer 1

1

To pack the comments into a proper answer to the question:

As Majenko stated in the comments, Tinkercad is a simulation. The codes doesn't get compiled and uploaded to hardware. Instead Tinkercad interprets the code on the fly. Simulations are not perfect clones of the real hardware, so you cannot expect the same performance from it as from the real Arduino. Also it is not build for producing high quality sound. The focus is entirely on simulating how the Arduino works.

If you are using this with a real Arduino you most likely will not have the glitches in sound.

What you are currently hearing is not a problem of Arduino, but of Tinkercad. You could file a problem with the developer, but probably they will not think this is an issue, or they will give it a very low priority.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.