Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Electrical (http://www.chiefdelphi.com/forums/forumdisplay.php?f=53)
-   -   Turning the Robot (http://www.chiefdelphi.com/forums/showthread.php?t=34852)

Idaman323 17-02-2005 21:29

Turning the Robot
 
I have one joystick programmed up to the robot, I have the p1_y's all programmed and it moves forward and backward. I have the p1_x's on pwm05 and pwm06. I have two pwm01's going to 2 victors and two pwm02's going to the other 2 victors. So where do I put the pwm05's and 06's on the victors??

ConKbot of Doom 17-02-2005 23:58

Re: Turning the Robot
 
You have to mix the values in the code. In the default code, pins 13-16 have a mixed signal for one joystick drive.

Look for the one joystick drive section in user_routines.c

You'll see something like
pwm13 = pwm14 = LimitMix (2000 + p1_y - p1_x + 127);

that may not be exactly it, but it will be similar. I have heard that if you use a lot of interrupts in the code, pwms 13-16 get twitchy, so you may want to change them in the code to another pwm channel. We are keeping it simple on ours, 01 for right, 02 for left, 03 for the arm motor.

Good luck

Idaman323 18-02-2005 00:48

Re: Turning the Robot
 
So with this code, the robot should turn? I tried this and it didn't work, I'll have to look at it tomorow i guess.


All times are GMT -5. The time now is 13:46.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi