|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools | Rate Thread | Display Modes |
|
#1
|
||||
|
||||
|
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?
|
|
#2
|
||||
|
||||
|
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. Last edited by Ryan M. : 29-01-2006 at 18:46. |
|
#3
|
|||
|
|||
|
Re: Pwm and pot
Actually, you'd have to do something more like:
Code:
pwm01 = Get_Analog_Value(rc_ana_in01) >> 2; |
|
#4
|
|||
|
|||
|
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.
|
|
#5
|
||||
|
||||
|
Re: Pwm and pot
thankx alot.
|
|
#6
|
||||
|
||||
|
Re: Pwm and pot
Quote:
-Kevin |
|
#7
|
||||
|
||||
|
Re: Pwm and pot
Quote:
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| reading hobby PWM | sciguy125 | Programming | 2 | 17-10-2005 20:47 |
| R/C Control types | Andy Brockway | Programming | 43 | 24-11-2003 17:07 |
| How do you set a speed limit on the servo | Fares | Programming | 6 | 01-01-2003 15:04 |
| Pwm | VanWEric | Programming | 17 | 01-11-2002 16:07 |
| More pBasic Woes... | Dan 550 | Programming | 4 | 11-11-2001 23:08 |