![]() |
Pwm and pot
i want to know if there is a way in which i can make the servos move (which are hooked in to pwm) when i trun the pot. i get the value for the pot. now i need to get the value for the servo and some how make it move when the value of the pot changes. is there a way?
|
Re: Pwm and pot
All you have to do is directly map the pot values to the PWM the servo is on:
Code:
pwm01 = rc_ana_in01;If you need more complicated control... make it more complicated yourself. ;) --EDIT-- See below message. |
Re: Pwm and pot
Actually, you'd have to do something more like:
Code:
pwm01 = Get_Analog_Value(rc_ana_in01) >> 2; |
Re: Pwm and pot
Both the above should work, The first is if the pot is connected to the OI (operator control) the second is if the pot is on the robot. Just fill in the correct context and you are good to go.
|
Re: Pwm and pot
thankx alot.
|
Re: Pwm and pot
Quote:
-Kevin |
Re: Pwm and pot
Quote:
|
| All times are GMT -5. The time now is 16:09. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi