![]() |
How to make a max speed
we want to make a motor on our robot have a max speed so it doesnt just shoot to fastest speed. what is the programing code. we are planning to hook it up to a pwm and use the p2_wheel to control it. thx for input.
|
Re: How to make a max speed
If you want to measure the max speed in feet/s or m/s, you will need a way to measure the robot's speed. Trial and error - use the code to assign one value to the speed controllers, and measure the actual speed. Then limit the speed controller to the closest value that you want. If you want some sort of more advanced, much more reliable, and all-around better solution, experiment with some sort of encoder - either the hall effect sensors or maybe an optical encoder to read actual speed off the drive system.
|
Re: How to make a max speed
Quote:
|
Re: How to make a max speed
if (yourpwm > p2_wheel) yourpwm = p2_wheel;
Watch out, because our wheels go from 64-250, they don't actually hit 0 |
| All times are GMT -5. The time now is 17:47. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi