Skip to content
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

Fix thrusters spinning randomly when stopped #29

Open
antoinepetty opened this issue Jun 15, 2021 · 3 comments
Open

Fix thrusters spinning randomly when stopped #29

antoinepetty opened this issue Jun 15, 2021 · 3 comments

Comments

@antoinepetty
Copy link
Member

I think it's a problem with the timing of the Servo library on the Nano 33. Using its native mbed pwm control may solve the problem

example: https://forum.arduino.cc/t/interrupt-latency-problems/656255/4

This would need to be done in the outputs/esc class

@antoinepetty
Copy link
Member Author

Code for reference:

Example using the normal Servo library (current implementation) https://github.com/ncl-ROVers/arduino/blob/master/arduino-main/src/equipment/output/genericEscMotor.cpp
(Those constants at the top are dead code and should be removed oops)

Example using the separate servo control board https://github.com/ncl-ROVers/arduino-2019-20/blob/master/arduino-main/src/equipment/output/genericEscMotor.cpp

@antoinepetty
Copy link
Member Author

antoinepetty commented Jun 17, 2021

related pull request:
#30

@antoinepetty
Copy link
Member Author

Best solution would be to get the Adafruit Servo Driver as proposed for 2020

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant