Go to Post FIRST is not all about the robot, it's about the experience. Don't sour yours by whining about it later. - StephLee [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

 
Closed Thread
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 14-02-2003, 11:09
great_one411 great_one411 is offline
Registered User
#1210 (NYACK)
 
Join Date: Jan 2003
Location: St. Louis
Posts: 18
great_one411 is an unknown quantity at this point
Question programming

How do you program the robot controller for autonomus mode
  #2   Spotlight this post!  
Unread 14-02-2003, 11:24
Matt Reiland's Avatar
Matt Reiland Matt Reiland is offline
'The' drive behind the drive
None #0226 (TEC CReW Hammerheads)
Team Role: Engineer
 
Join Date: May 2001
Rookie Year: 1999
Location: Troy Michigan
Posts: 712
Matt Reiland has a reputation beyond reputeMatt Reiland has a reputation beyond reputeMatt Reiland has a reputation beyond reputeMatt Reiland has a reputation beyond reputeMatt Reiland has a reputation beyond reputeMatt Reiland has a reputation beyond reputeMatt Reiland has a reputation beyond reputeMatt Reiland has a reputation beyond reputeMatt Reiland has a reputation beyond reputeMatt Reiland has a reputation beyond reputeMatt Reiland has a reputation beyond repute
Well there are a few threads out there for you to search on, even a whitepaper. You really should search before you ask a broad question like how to program Autonomous mode. The innovation FIRST site also has information on it in the programming reference.

However, The key bits for you to use in your program: From Innovation First

6.3. PB_Mode – Competition, Autonomous, and User
PB_Mode is a byte accessible through the SERIN command. The Competition Mode, Autonomous
Mode, and User Mode are all available in this byte. The Default Code already contains all the code
needed to use these modes.
Competition Mode
Bit 7 of the PB_mode byte (aliased as comp_mode below) indicates the status of the Competition
Control, either Enabled or Disabled. This indicates the starting and stopping of rounds at the
competitions. Comp_mode is indicated by a solid "Disabled" LED on the Operator Interface.
Comp_mode = 1 for Enabled, 0 for Disabled.
Autonomous Mode
Bit 6 of the PB_mode byte (aliased as auton_mode below) indicates the status of the Autonomous Mode,
either Autonomous or Normal. This indicates when the robot must run on its own programming. When
in Autonomous Mode, all OI analog inputs are set to 127 and all OI switch inputs are set to 0 (zero).
Auton_mode is indicated by a blinking "Disabled" LED on the Operator Interface.
Auton_mode = 1 for Autonomous, 0 for Normal.
Autonomous Mode can be turned ON by setting the RC to Team 0 (zero) and power cycling the RC unit.
User Mode
Bit 5 of the PB_mode byte (aliased as user_display_mode below) indicates when the user selects the
"User Mode" on the OI. PB_mode.bit5 is set to 1 in "User Mode". When the user selects channel, team
number, or voltage, PB_mode.bit5 is set to 0. When in "User Mode", the eight Robot Feedback LED
are turned OFF and the Out 8 – Out 15 of the PBACIS processor are sent to the OI multi-segment
display.
Note: "User Mode" is identified by the letter “u” in the left digit (for 4 digit OI's)
Note: "User Mode" is identified by decimal places on the right two digits (for 3 digit OI's)



Autonomous _Mode Example: This example shows portions of the code that reference PB_Mode. The Perform
Operations Section below uses aliases based on PB_Mode bits to execute different sections of code.
'---------- Declare Miscellaneous Variables -------------------------------------------------
PB_mode VAR byte
'---------- Aliases for the Pbasic Mode Byte (PB_mode) --------------------------------------
comp_mode VAR PB_mode.bit7
auton_mode VAR PB_mode.bit6
user_display_mode VAR PB_mode.bit5
'========== PERFORM OPERATIONS section ================================================== ====
if auton_mode = 1 then do_autonomous_stuff
'Insert your normal driver mode code here
goto end_of_autonomous
do_autonomous_stuff:
'Insert your autonomous mode code here
end_of_autonomous:
  #3   Spotlight this post!  
Unread 15-02-2003, 08:59
Raven_Writer's Avatar
Raven_Writer Raven_Writer is offline
2004 Detroit & Pittsburgh Winners
AKA: Eric Hansen
FRC #0005 (RoboCards)
Team Role: Mentor
 
Join Date: Jan 2003
Rookie Year: 2002
Location: Melvindale
Posts: 1,549
Raven_Writer is just really niceRaven_Writer is just really niceRaven_Writer is just really niceRaven_Writer is just really niceRaven_Writer is just really nice
Send a message via ICQ to Raven_Writer Send a message via AIM to Raven_Writer Send a message via MSN to Raven_Writer Send a message via Yahoo to Raven_Writer
Wouldn't it be easier just to like, write out psecudo (sp?) code, and then implement it then? Because if you just write it out, it'll cause more problems. But to write automonous mode code, just refer to Matt's post.
__________________
AIM: wisprmylastbreth
EMail: nightskywriter@gmail.com
Y!: synsoflife

"ai yoru ga" -- "Love the nights"
Closed Thread


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
Programming Compatition Angela06 Programming 30 08-04-2005 23:12
multi-bank programming problem GregC Programming 3 14-02-2003 16:13
Pneumatics electrical wiring and programming archiver 2001 1 23-06-2002 23:10
Error found in programming for the pump and pressure switch sjharobotics Programming 4 06-02-2002 17:46
pbasic programming punarhero Programming 4 21-01-2002 23:32


All times are GMT -5. The time now is 01:11.

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