View Single Post
  #6   Spotlight this post!  
Unread 12-04-2002, 12:05
FotoPlasma FotoPlasma is offline
\: |
no team
 
Join Date: Jul 2001
Rookie Year: 2001
Location: San Jose
Posts: 1,900
FotoPlasma has a reputation beyond reputeFotoPlasma has a reputation beyond reputeFotoPlasma has a reputation beyond reputeFotoPlasma has a reputation beyond reputeFotoPlasma has a reputation beyond reputeFotoPlasma has a reputation beyond reputeFotoPlasma has a reputation beyond reputeFotoPlasma has a reputation beyond reputeFotoPlasma has a reputation beyond reputeFotoPlasma has a reputation beyond reputeFotoPlasma has a reputation beyond repute
Send a message via AIM to FotoPlasma
We use some robot reversal code:

Code:
'--------------------------------------------------------------------------
'|	The following code reverses joystick directoin				  |
'|	p1_sw_top[reverse jdriection];pwm1,pwm2[motor speed/direction]
'--------------------------------------------------------------------------
' it'll be confusing as hell
' but oh well
' =)

'How to Swap the Iinformation in Two Variables Without Using a Third Variable!:
'or: XOR is Your Friend =)

if p3_sw_top then forwards:
'---swap right and left pwms
	PWM1 = PWM1 ^ PWM2
	PWM2 = PWM1 ^ PWM2
	PWM1 = PWM1 ^ PWM2
'---invert values of joysticks around 127
'------Thanks to Joe Ross from team 340! :D
	PWM1 = ( 254 - PWM1 )
	PWM2 = ( 254 - PWM2 )
forwards:
It's not elaborate, or even too important, but I'm really proud of it...
__________________
I played hacky sack with Andy Baker.

2001-2004: Team 258, The Sea Dawgs
2005: Team 1693, The Robo Lobos