-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Frequency parameter is not working as expected #31
Comments
Also tested with frequencies 200 on pin1 and 400 Hz on pin2 and both pins show a 400 frequency. |
what board are you using? |
XIAO ESP32-S3 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi and thanks for this library.
It seems like the frequency parameter that can be passed to the attach function is not actually changing the frequency but the pulse width.
I have initialized two Servos like this:
Here are signals measured on two pins, the first (yellow) one was set at 200Hz, and the second (blue) one was left at default value which is 50Hz
![image](https://private-user-images.githubusercontent.com/3592991/314646107-a842789d-c2e5-4483-92e4-fd68df18cbbf.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTg2MTcxNzQsIm5iZiI6MTcxODYxNjg3NCwicGF0aCI6Ii8zNTkyOTkxLzMxNDY0NjEwNy1hODQyNzg5ZC1jMmU1LTQ0ODMtOTJlNC1mZDY4ZGYxOGNiYmYucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI0MDYxNyUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNDA2MTdUMDkzNDM0WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9Y2M5ZDFlODY1ZjM2N2IzN2RiN2E3YTg4YTc3ODI3MDdlNzE4YjIyZWVhY2RiNTIzZDMyY2JkMThlYmU0YjcyZiZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmYWN0b3JfaWQ9MCZrZXlfaWQ9MCZyZXBvX2lkPTAifQ.iWEkaHOD-r2V6qGlWo6wnoSEsWaULbMrKGsRQpO8laM)
And both signals are actually at 50Hz
Here is what is expected: the yellow signal has a frequency 4 times higher:
![image](https://private-user-images.githubusercontent.com/3592991/314647586-85b1904d-326e-45b2-b5b8-6471af30fead.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTg2MTcxNzQsIm5iZiI6MTcxODYxNjg3NCwicGF0aCI6Ii8zNTkyOTkxLzMxNDY0NzU4Ni04NWIxOTA0ZC0zMjZlLTQ1YjItYjViOC02NDcxYWYzMGZlYWQucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI0MDYxNyUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNDA2MTdUMDkzNDM0WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9ZTZjZTkxYWUwYWQ1NmJiNDEwMzFiNGUzMzcwNTg1Y2QzODFkMjY0YzE5NTE3MjQ5YTk5MTFkMjlhYzhjZTk3ZCZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmYWN0b3JfaWQ9MCZrZXlfaWQ9MCZyZXBvX2lkPTAifQ.33_vkYpMGH-_xOhmOUrSmBGtmrH93_WBTzvfBNMrpBY)
The text was updated successfully, but these errors were encountered: