Thread: pbasic question
View Single Post
  #1   Spotlight this post!  
Unread 23-06-2002, 23:50
archiver archiver is offline
Forum Archival System
#0047 (ChiefDelphi)
 
Join Date: May 2001
Location: Pontiac, MI
Posts: 21,214
archiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond repute
pbasic question

Posted by Stephen at 1/29/2001 9:07 PM EST


Other on team #122, NASA Knights, from Grafton High School (Robotics team is at NHGS) and NASA.



I was programming the logic to automatically calibrate the joysticks each time the robot was turned on, and I ran into a problem. I should start off saying that the code works fine as long as the wheels aren't terribly off center. The problem comes when the wheels near a limit (either 255 or 0). When I thought of the logic, I was counting on the fact that if a joystick command goes further than 255 than it would wrap around to 0; but I was wrong. Apparently it just maxes out at 255. So ... if the wheel is all the way in one direction, the robot will not be able to move in that direction. I was thinking about just changing p1_x and p1_y to word variables (as opposed to bytes [8 bits]), but that will not work- so I have come here to ask for help. If you (the chief-delphi community) cannot find a solution than it's still all right, because the code works fine as long as the wheels are somewhat close to center (leeway of about 20 either way [40 total])


__________________
This message was archived from an earlier forum system. Some information may have been left out. Start new discussion in the current forums, and refer back to these threads when necessary.