Quote:
Originally posted by mjt902
Yes, you can use the p1_y or p2_y but it CHANGES TO WHATEVER THE REAL VALUE IS FROM THE JOYSTICK. When your program runs, it sees your joystick at roughly 127, and then your code changing it to 150. This makes is continually switch from 127 to 150 to 127.
you could set your wheel to make p1_y = 150 but it's safer, and (although this is coming from someone completely insane and mentally unstable) easier to use your drive variable.
|
Not true. p1_y is not "bound" to the joystick. It only gets updated when you do a SERIN. Otherwise, it acts like any other normal variable. Likewise, setting PWM1 to a value won't actually change the value sent to the motor until you do a SEROUT.