Quote:
Originally posted by Jnadke
they easy way:
Code:
drive_L var byte
drive_R var byte
tempjoystick var byte
drive_R = (((2000 + p1_y + p1_x - 127) Min 2000 Max 2254) - 2000)
drive_L = (((2000 + p1_y - p1_x + 127) Min 2000 Max 2254) - 2000)
'single joystick drive code
if p4_sw_aux1 = 1 then
tempdrive = drive_R
drive_R = 254-drive_L
drive_L = 254-tempjoystick
endif
|
Your code is correct except for what is bolded. You are using two different Variables. Probably just an error when you typed it. Your code is similar to what I use on our robot.