View Full Version : looking for 1 joystick Pbasic drive code
Greg Needel
02-09-2005, 09:46
for my battle bot i am using one of the older pbasic controllers w/ 1 joystick. We have tried for some time to play with the default 1 stick code but we can;t get it to work. So i figured i would ask and see if anyone has any successful code.
sciguy125
02-09-2005, 09:55
Could you post some code?
Mark McLeod
02-09-2005, 11:01
Here's the 1-joystick code we used for driver practice this year on a second robot using one of the older controllers. I don't remember if it's any different than the original default code other than minor changes though. It does a debug printout of the drive values being sent to the PWMs.
The right drive motors are on PWMs 1 & 2 & 13 & 14
The left motors are on PWMs 3 & 4 & 15 & 16
P.S. This second version was used on a third robot, but reverses the behavior of the joysticks due to motor wiring and mounting. It switches between 1 and 2-joystick operation based on the value of p4_sw_aux1 where we attached a switch on the OI.
John Gutmann
02-09-2005, 12:25
greg this is what i used on my robot, just pick the code you need
http://www.ifirobotics.com/first-legacy.shtml
the "default" codes are for 2 joysticks and the "user" codes are for 1 joystick
Greg Needel
02-09-2005, 14:47
greg this is what i used on my robot, just pick the code you need
http://www.ifirobotics.com/first-legacy.shtml
the "default" codes are for 2 joysticks and the "user" codes are for 1 joystick
that is the code we can;t get working....it says to put your Pwm in ports 11-12 and when you do the motor are just full on....I tried calibrating the speed controllers with no luck.
I was kinda hoping someone would have some custom code that was driven during the season during those years. Something that has been throughly tested and known to work well. IFI default codes sometimes work in theory but not in real life.
Alan Anderson
02-09-2005, 15:00
that is the code we can;t get working....it says to put your Pwm in ports 11-12 and when you do the motor are just full on...
Read it again. The 2003 default code for 1-joystick drive that I'm looking at puts the right side outputs on pwms 13 and/or 14, and the left side on pwms 15 and/or 16. Pwms 11 and 12 are set from the p3 and p4 wheel inputs, respectively.
Joe Ross
02-09-2005, 15:59
that is the code we can;t get working....it says to put your Pwm in ports 11-12 and when you do the motor are just full on....I tried calibrating the speed controllers with no luck.
Be sure to remove your custom calibration after moving to the correct PWMs or else it still won't work.
John Gutmann
02-09-2005, 17:24
that is the code we can;t get working....it says to put your Pwm in ports 11-12 and when you do the motor are just full on....I tried calibrating the speed controllers with no luck.
I was kinda hoping someone would have some custom code that was driven during the season during those years. Something that has been throughly tested and known to work well. IFI default codes sometimes work in theory but not in real life.
i am using the default code on my robot, infact i was just playing with it not too long ago today and i didtn have any problems, I never even read the directions, i just pluged the pwm cables into pwm 1 and 2 and the joysticks into 1 and 2 and it works perfectly
did you try adjusting the trim pot on your joystick?
Greg Needel
02-09-2005, 20:35
i mistyped the port numbers we were trying the correct ones.
We fixed it by trying a different controller....there was an internal problem with my joystick (but i guess that is what I get for 6 bux at goodwill :rolleyes: )
vBulletin® v3.6.4, Copyright ©2000-2017, Jelsoft Enterprises Ltd.