Quote:
Originally posted by Tytus Gerrish
can i see an example in PBASIC please?
|
Well, the problem with that is that hardware and software are interdependant. I (or any fairly competent team programmer) could write you a program that takes the y-axis of the joystick on port 1 and maps it to the output(s) controlling the drive motor(s), and then takes the x-axis of the same joystick, and maps it to the output(s) controlling the rotational motor(s).
If you want a program ready to be slapped into an EduBot, I suggest you get in contact with 179's programmer(s), and get them to do this as a side project.
Fundamentally, though, here's how you would define the two variables which would be used to determine the four things in my previous post:
Code:
PWM1 = p1_y
PWM2 = p1_x
The default EduBot code uses some funky conventions concerning variable names and whatnot. They use the variables drive_L and drive_R, instead of PWM#.
But anyway, back to the topic at hand. Because of the actual structure of the Basic Stamp program, there're a lot of very important pieces of the program that, obviously, aren't included in the above excerpt.
Really, I suggest you find someone whom you can talk to in person about your system. Ambiguity of description isn't safe when programming robots, generally, and it's a lot easier to be clear and concise in real life, than online.