Go to Post I almost forgot the biggest advantage of all! Three times as many people get to hear me and Karthik sing at 2 am! - Derek Bessette [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #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
 


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Victor problem Andy Baker Electrical 15 24-06-2003 09:49
multi-bank programming problem GregC Programming 3 14-02-2003 16:13
The problem with scouting... archiver 2001 10 23-06-2002 23:49
Major problem with chipphua motors aka Scott White Motors 18 19-03-2002 19:44
Error found in programming for the pump and pressure switch sjharobotics Programming 4 06-02-2002 17:46


All times are GMT -5. The time now is 14:53.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi