How to add simple Servo code from a Tutorial?

Yes, I think the Arduino standard tone() functions will work well with your code.
I think, It shouldn't be too much rewriting work.
The tone() function reference documents will give you a hint.
https://www.arduino.cc/reference/en/language/functions/advanced-io/tone/

This is a long-standing problem with third-party Arduino libraries.
The wrap it as a function to easily use, the harder it is for beginners to understand what is going on inside a code.
In addition, there is a similar problem such as "It doesn't work on another board because it coding for specific to the hardware".
To solve these on just yourself, you need to be able to read and understand the coding of the library, which may no longer be a "beginner" ...

Well, in many cases forum volunteers will help you with the solution.
(But probably I'm not a very useful member! :grin:)

You have done the steps to get that help pretty well.
Posted the code using code tags correctly and explained in an easy-to-understand way what you was trying to do and what wasn't working.

It's a pity that the project has a deadline, but I hope it works well.
Of course, if you need any help, please post here. But I'm sorry if my reply wasn't in time.
However, other all forum volunteers also have amazing knowledge than me.


Good night. :zzz:

1 Like