View Single Post
  #15   Spotlight this post!  
Unread 04-02-2007, 19:41
JBotAlan's Avatar
JBotAlan JBotAlan is offline
Forever chasing the 'bot around
AKA: Jacob Rau
FRC #5263
Team Role: Mentor
 
Join Date: Sep 2004
Rookie Year: 2004
Location: Riverview, MI
Posts: 723
JBotAlan has a reputation beyond reputeJBotAlan has a reputation beyond reputeJBotAlan has a reputation beyond reputeJBotAlan has a reputation beyond reputeJBotAlan has a reputation beyond reputeJBotAlan has a reputation beyond reputeJBotAlan has a reputation beyond reputeJBotAlan has a reputation beyond reputeJBotAlan has a reputation beyond reputeJBotAlan has a reputation beyond reputeJBotAlan has a reputation beyond repute
Send a message via AIM to JBotAlan Send a message via Yahoo to JBotAlan
Re: Code to have speed of motors dependent on how hard you push the joystick

I take it from your terminology that you are using easyC. If so, wouldn't this code work--see the attached screenshot...sorry, easyC won't let me copy code out of it...

I don't know much about easyC, so this might not be the right answer.

If you are using MPLAB:

Code:
pwm01 = p1_y;
pwm02 = p2_y
would map joystick 1's y axis to pwm output 1, and joystick 2's y axis to pwm output 2.

Ask if you need more help.

Good luck,
JBot
Attached Thumbnails
Click image for larger version

Name:	easyC tank drive.JPG
Views:	85
Size:	26.8 KB
ID:	5009  
__________________
Aren't signatures a bit outdated?