Thread: RoboEmu 1.07
View Single Post
  #2   Spotlight this post!  
Unread 05-12-2002, 15:38
Adrian Wong Adrian Wong is offline
Registered User
#0596 (SciClones)
Team Role: Alumni
 
Join Date: Jun 2001
Rookie Year: 2001
Location: Hopkinton, Mass.
Posts: 146
Adrian Wong is an unknown quantity at this point
Send a message via AIM to Adrian Wong
Does your program make proper accomodations for integer math and byte overflow?

I've been having trouble with a bit of code that I wrote for a throttle. When placed on the robot, it does not work at all. When placed in RoboEmu, it works just as I expected. There must be some difference between the PC emulator and the PBASIC chip that I'm not noticing. The weird part is that it works on the emulator and not on the robot (instead of the other way around). Any help?

The code is as follows:

LDRILL = ((LDRILL * p1_wheel) / 255) + ((255 - p1_wheel) / 2)
RDRILL = ((RDRILL * p1_wheel) / 255) + ((255 - p1_wheel) / 2)

LDRILL and RDRILL are both variables of byte length.