Comments (5)
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.
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.
@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.
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.
Closing this issue for now as there have been no replies.
from pca9685.
Related Issues (13)
- Error in the main example HOT 1
- Error reported when running simple script. HOT 1
- Version 2.2.0 appears broken HOT 3
- Enhancement: Provide a speed control HOT 2
- tsconfig.json contains "target" twice HOT 1
- when two servos given simultaneous instructions, madness ensues HOT 13
- Error initializing PCA9685 HOT 2
- LEDs flicker due to PCA9685 load balancing. HOT 4
- Update i2c-bus version HOT 1
- PCA9633 compatibility HOT 1
- About ESC HOT 4
- How to reverse the throttle? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pca9685.