View Single Post
  #2   Spotlight this post!  
Unread 23-01-2003, 22:07
srawls's Avatar
srawls srawls is offline
Registered User
#0122 (Nasa Knights)
 
Join Date: Dec 2001
Location: Yorktown
Posts: 507
srawls is an unknown quantity at this point
Send a message via AIM to srawls
Hmmm ... what I would do is keep the robot tethered up, and debug some values. Assuming you call your motor outputs driveL and driveR, put something like this in the bottom of your code:
Code:
debug ? p1_x
debug ? p1_y
debug ? driveR
debug ? driveL
debug "Filler Text"
debug cls
Then, run the robot and don't touch the joystick (keep it centered). Adjust the trim (the right and bottom wheels) until you see p1_x and p1_y are close to 127. Then Tape the trim down, so it doesn't move. If you move the joystick, then it goes to center, and the p1_x/p1_y don't say 127, then you've got a problem with your joystick. If p1_x/p1_y do say 127, but driveR/driveL don't, then there is a problem with your code (unlikely since it is the default code). If they all say 127 but the wheels are still moving, then you've got a real problem! (in that case, check the wiring to make sure it's all correct, and the pwm cables go to the right number that the serout command expects).

Sorry I can't be of more help, but I haven't had this problem before, so I don't know what to say.

Stephen

PS. Kind of obvious, but just in case: when you do this testing, make sure you set your robot up on some blocks so the wheels can move freely without contacting the ground.