Go to Post The biggest thing is you don't have to make your robot like another teams. Come up with something unique and go from there. RAISE THE BAR..... - camtunkpa [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 24-01-2008, 19:34
wt200999's Avatar
wt200999 wt200999 is offline
Texas Instruments
AKA: Will Toth
FRC #3005 (Robochargers)
Team Role: Mentor
 
Join Date: Mar 2006
Rookie Year: 2004
Location: Dallas, Texas
Posts: 323
wt200999 has much to be proud ofwt200999 has much to be proud ofwt200999 has much to be proud ofwt200999 has much to be proud ofwt200999 has much to be proud ofwt200999 has much to be proud ofwt200999 has much to be proud ofwt200999 has much to be proud ofwt200999 has much to be proud of
Send a message via MSN to wt200999
Re: IR Sensor

instead of having it do the actual actions when you press the button you can have it set a variable with the button, then it does a certain routine depending on the button pressed. Example:

Code:
unsigned char test;

if(rc_dig_in01)
    test=1;

if(rc_dig_in02)
    test=2;

if(rc_dig_in03)
    test=3;

if(rc_dig_in04)
    test=4;


if(test==1)
   (routine a)

etc
  #2   Spotlight this post!  
Unread 28-01-2008, 20:13
mechman9113 mechman9113 is offline
Registered User
FRC #0393
 
Join Date: Oct 2006
Location: Greenfield, IN
Posts: 3
mechman9113 is an unknown quantity at this point
Re: IR Sensor

We haven't actually done anything with the physical IR Sensor, it's just me and my programming partner are new to C and we need some tips on how to program it. We do have mplab.

Also if anyone can help with the yrg, the daa, and the gts, we would greatly appreciate it.
__________________
Team 393 Full Metal Jackets... FMJ for life.
  #3   Spotlight this post!  
Unread 29-01-2008, 00:14
AdmiralAllen's Avatar
AdmiralAllen AdmiralAllen is offline
Master of Computers and Robots
AKA: Allen Worcester
FRC #1662 (Raptor Force Engineering)
Team Role: Alumni
 
Join Date: May 2006
Rookie Year: 2005
Location: California
Posts: 37
AdmiralAllen will become famous soon enough
Re: IR Sensor

Quote:
Originally Posted by wt200999 View Post
instead of having it do the actual actions when you press the button you can have it set a variable with the button, then it does a certain routine depending on the button pressed. Example:

Code:
unsigned char test;

if(rc_dig_in01)
    test=1;

if(rc_dig_in02)
    test=2;

if(rc_dig_in03)
    test=3;

if(rc_dig_in04)
    test=4;


if(test==1)
   (routine a)

etc
is that code adequte to adjust the variable "test"
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
IR Sensor fabalafae Programming 1 19-01-2008 16:53
Sensor Molten Programming 3 17-02-2007 17:43
Sensor or no Sensor For Autonomous mode Kyle1010 Programming 14 22-01-2003 13:10
Sensor Q Brew Technical Discussion 2 10-02-2002 12:48
Sensor Oakridege_665 Technical Discussion 5 10-01-2002 16:53


All times are GMT -5. The time now is 23:10.

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