Code Monkey home page Code Monkey logo

Comments (5)

101100 avatar 101100 commented on July 28, 2024

I've never used a continuous rotation servo before, but was able to find this reference that had this table:

Input Pulse (ms) Rotation Speed (%) Direction of rotation
1.0 100 Clockwise
1.1 80 Clockwise
1.2 60 Clockwise
1.3 40 Clockwise
1.4 20 Clockwise
1.5 0 N/A
1.6 20 Counter-Clockwise
1.7 40 Counter-Clockwise
1.8 60 Counter-Clockwise
1.9 80 Counter-Clockwise
2.0 100 Counter-Clockwise

You should be able to use setPulseLength which takes microseconds (multiplying the values in the table above by 1000) for your continuous rotation servo. If it was on channel 2, then pwm.setPulseLength(2, 1000); should go clockwise as full speed, pwm.setPulseLength(2, 1500); should stop and pwm.setPulseLength(2, 2000); should go counter-clockwise at full speed. You should also be able to use values in-between for not full speed.

Hope this helps!

from pca9685.

pedefe avatar pedefe commented on July 28, 2024

Hello,
Thank you very much, I will test it.
But it seems to be specific for each product.
I have tried step by step, and the medium value for null speed is more around 1650.
The problem is to find the extreme values for max_clockWise and max_Counter-clockWise, because it is hard to see if the servo runs quicker or stay on same speed. Thank you.
Best regards.

from pca9685.

101100 avatar 101100 commented on July 28, 2024

@pedefe Thanks for letting me know about some of the details. If you have a model number for your servo you might be able to look up the values somewhere. Good luck!

from pca9685.

101100 avatar 101100 commented on July 28, 2024

You might want to try starting at a lower value and moving up until it comes on in reverse. Then use that and the middle value to guess where the highest value would be. E.g. if the first time it turns on is at 950 and your stopping point (middle) is 1650, the full speed reverse value might be the stopping value plus the difference between it and the lowest value:

1650 + (1650 - 950)
= 1650 + 700
= 2350

Just an idea to try.

from pca9685.

101100 avatar 101100 commented on July 28, 2024

Closing this issue for now as there have been no replies.

from pca9685.

Related Issues (13)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.