|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
||||||
|
||||||
|
looking for 1 joystick Pbasic drive code
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.
|
|
#2
|
|||
|
|||
|
Re: looking for 1 joystick Pbasic drive code
Could you post some code?
|
|
#3
|
|||||
|
|||||
|
Re: looking for 1 joystick Pbasic drive code
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. Last edited by Mark McLeod : 02-09-2005 at 11:25. |
|
#4
|
||||
|
||||
|
Re: looking for 1 joystick Pbasic drive code
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 |
|
#5
|
||||||
|
||||||
|
Re: looking for 1 joystick Pbasic drive code
Quote:
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. |
|
#6
|
|||||
|
|||||
|
Re: looking for 1 joystick Pbasic drive code
Quote:
|
|
#7
|
||||||
|
||||||
|
Re: looking for 1 joystick Pbasic drive code
Quote:
|
|
#8
|
||||||
|
||||||
|
Re: looking for 1 joystick Pbasic drive code
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 ) |
|
#9
|
||||
|
||||
|
Re: looking for 1 joystick Pbasic drive code
Quote:
did you try adjusting the trim pot on your joystick? |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Change joystick to pwm mapping | Joe Lewis | Programming | 3 | 30-03-2005 19:27 |
| Drive Straight C Code using Encoders without PID? | Chris_Elston | Programming | 17 | 15-02-2005 23:41 |
| trentonDrive.c: our joystick/wheel drive code | gnormhurst | Programming | 16 | 03-02-2005 14:40 |
| Team THRUST - Kevin's Code and Camera Code Combine | Chris_Elston | Programming | 3 | 31-01-2005 22:28 |
| TechnoKats Automated Test Drive Code | Greg McCoy | Programming | 1 | 16-01-2003 17:45 |