Go to Post I know the world needs more engineers, but FIRST isn't all about engineers and robots... that's why it's so great. - Ryan Dognaux [more]
Home
Go Back   Chief Delphi > Old Forum Archives > 2001
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 23-06-2002, 23:38
archiver archiver is offline
Forum Archival System
#0047 (ChiefDelphi)
 
Join Date: May 2001
Location: Pontiac, MI
Posts: 21,214
archiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond repute
help to rookie teams

Posted by Stephen at 1/25/2001 1:57 PM EST


Other on team #122, NASA Knights, from Grafton High School (Robotics team is at NHGS) and NASA.



This post is meant as a programming tip for rookie teams. For the past few years (well, this is what I've been told, this is actually my first year at FIRST) my team has used a button on the robot to reverse the controls; in escence switching the motors you send the certain joystick controls to. This helps to stop the disorientation you get when the robot is turned around and you have to mentally swap everything around. Well, now to the point: as you now, you are only permited 26 varibles in pbasic, and most teams (even mine last year) use a temp variable to swap:
- temp = a
- a = b
- b = temp
but, this wastes a varible. Here is very simple way to swap the varible using bitwise operations:
- a = a ^ b
- b = a ^ b
- a = a ^ b
If you want help understanding the logic, or have problems implementing this code - send me an e-mail at Steven3554@yahoo.com


__________________
This message was archived from an earlier forum system. Some information may have been left out. Start new discussion in the current forums, and refer back to these threads when necessary.
  #2   Spotlight this post!  
Unread 23-06-2002, 23:38
archiver archiver is offline
Forum Archival System
#0047 (ChiefDelphi)
 
Join Date: May 2001
Location: Pontiac, MI
Posts: 21,214
archiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond repute
Cool trick

Posted by Joe Johnson at 1/25/2001 8:50 PM EST


Engineer on team #47, Chief Delphi, from Pontiac Central High School and Delphi Automotive Systems.


In Reply to: help to rookie teams
Posted by Stephen on 1/25/2001 1:57 PM EST:



I am not a computer science guy but I play one on TV...

...in any case, I love the trick you posted. Is this
the kind of thing that they teach in all those CS
classes I never took but thought I could get by
without? If so I regret my not taking more Computer
Science class even more than I did before.

Ah well...

Joe J.

P.S. With "scratchpad" RAM on the STAMP2SX chip, the
need for such tricks is much reduced than it was prior
to Innovation First taking over the controller, but I
imagine that our code will grow over time to even use
up the 63 bytes available in the scratchpad. I will
keep your trick in my pocket to have it ready when that
day comes. JJ



__________________
This message was archived from an earlier forum system. Some information may have been left out. Start new discussion in the current forums, and refer back to these threads when necessary.
  #3   Spotlight this post!  
Unread 23-06-2002, 23:38
archiver archiver is offline
Forum Archival System
#0047 (ChiefDelphi)
 
Join Date: May 2001
Location: Pontiac, MI
Posts: 21,214
archiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond repute
at least you know how to make magic with motors...

Posted by Anton Abaya at 1/25/2001 10:39 PM EST


Coach on team #419, Rambots, from UMass Boston / BC High and NONE AT THE MOMENT! .


In Reply to: Cool trick
Posted by Joe Johnson on 1/25/2001 8:50 PM EST:



: I am not a computer science guy but I play one on TV...

: ...in any case, I love the trick you posted. Is this
: the kind of thing that they teach in all those CS
: classes I never took but thought I could get by
: without? If so I regret my not taking more Computer
: Science class even more than I did before.

: Ah well...

: Joe J.

: P.S. With "scratchpad" RAM on the STAMP2SX chip, the
: need for such tricks is much reduced than it was prior
: to Innovation First taking over the controller, but I
: imagine that our code will grow over time to even use
: up the 63 bytes available in the scratchpad. I will
: keep your trick in my pocket to have it ready when that
: day comes. JJ


while we CS people learn to do these tricks.. ur cooking some brand new scheme of using drill motors to do wonderful things.....



-anton
__________________
This message was archived from an earlier forum system. Some information may have been left out. Start new discussion in the current forums, and refer back to these threads when necessary.
  #4   Spotlight this post!  
Unread 23-06-2002, 23:38
archiver archiver is offline
Forum Archival System
#0047 (ChiefDelphi)
 
Join Date: May 2001
Location: Pontiac, MI
Posts: 21,214
archiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond repute
Re: Cool trick

Posted by Stephen at 1/26/2001 10:59 AM EST


Other on team #122, NASA Knights, from Grafton High School (Robotics team is at NHGS) and NASA.


In Reply to: Cool trick
Posted by Joe Johnson on 1/25/2001 8:50 PM EST:



Thank you, I greatly appreciate your comments. If anyone is interested, I will have this posted in the white papers section in a few days with the complete logic of how it works.

: I am not a computer science guy but I play one on TV...

: ...in any case, I love the trick you posted. Is this
: the kind of thing that they teach in all those CS
: classes I never took but thought I could get by
: without? If so I regret my not taking more Computer
: Science class even more than I did before.

: Ah well...

: Joe J.

: P.S. With "scratchpad" RAM on the STAMP2SX chip, the
: need for such tricks is much reduced than it was prior
: to Innovation First taking over the controller, but I
: imagine that our code will grow over time to even use
: up the 63 bytes available in the scratchpad. I will
: keep your trick in my pocket to have it ready when that
: day comes. JJ





__________________
This message was archived from an earlier forum system. Some information may have been left out. Start new discussion in the current forums, and refer back to these threads when necessary.
  #5   Spotlight this post!  
Unread 23-06-2002, 23:38
archiver archiver is offline
Forum Archival System
#0047 (ChiefDelphi)
 
Join Date: May 2001
Location: Pontiac, MI
Posts: 21,214
archiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond repute
Re: help to rookie teams

Posted by Patrick Dingle at 1/27/2001 8:15 PM EST


Other on team #639, Red B^2, from Ithaca High School and Cornell University.


In Reply to: help to rookie teams
Posted by Stephen on 1/25/2001 1:57 PM EST:



maybe next year innovation FIRST will enable us to download COMPILED code? It would be much faster and we could use programming languages that don't assign the universal AND symbol (^) to mean exclusive or (XOR)! Anyway, thanks for the post. I had seen the trick before but forgot all about it.

Patrick

: This post is meant as a programming tip for rookie teams. For the past few years (well, this is what I've been told, this is actually my first year at FIRST) my team has used a button on the robot to reverse the controls; in escence switching the motors you send the certain joystick controls to. This helps to stop the disorientation you get when the robot is turned around and you have to mentally swap everything around. Well, now to the point: as you now, you are only permited 26 varibles in pbasic, and most teams (even mine last year) use a temp variable to swap:
: - temp = a
: - a = b
: - b = temp
: but, this wastes a varible. Here is very simple way to swap the varible using bitwise operations:
: - a = a ^ b
: - b = a ^ b
: - a = a ^ b
: If you want help understanding the logic, or have problems implementing this code - send me an e-mail at Steven3554@yahoo.com


__________________
This message was archived from an earlier forum system. Some information may have been left out. Start new discussion in the current forums, and refer back to these threads when necessary.
  #6   Spotlight this post!  
Unread 23-06-2002, 23:38
archiver archiver is offline
Forum Archival System
#0047 (ChiefDelphi)
 
Join Date: May 2001
Location: Pontiac, MI
Posts: 21,214
archiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond repute
Universal and?

Posted by Matt Leese at 1/29/2001 3:45 PM EST


Other on team #73, Tigerbolt, from Edison Technical HS and Alstom & Rochester Institute of Technology.


In Reply to: Re: help to rookie teams
Posted by Patrick Dingle on 1/27/2001 8:15 PM EST:



^ as the universal and? The only thing remotely close to that that I know of is the upside down U used as the union of operator. PBasic gets its usage of ^ from the C programming language which is more or less the most used programming language (this includes C++ which is just a superset of C). The universal AND usually happens to be &, not ^.

Matt


__________________
This message was archived from an earlier forum system. Some information may have been left out. Start new discussion in the current forums, and refer back to these threads when necessary.
 


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 Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How are all the rookie teams doing this year? WakeZero General Forum 20 21-02-2009 12:02
I tip my hat to all rookie teams archiver 2001 2 24-06-2002 02:25
Hits, Misses, & Suggestions -- long message archiver 2000 17 23-06-2002 23:36
The Case For 'Regionalizing' teams at the Nationals. archiver 2000 33 23-06-2002 23:35
How do we view more teams? archiver 2000 0 23-06-2002 23:11


All times are GMT -5. The time now is 19:09.

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