Go to Post The best legacy of this little machine is the inspiration she provided to a whole generation of future explorers who witnessed the unveiling of a planet through the eyes of a robot. - dlavery [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-01-2008, 12:37
d25inferno d25inferno is offline
Registered User
FRC #2554 (WarHawks)
Team Role: Leadership
 
Join Date: Nov 2007
Rookie Year: 2008
Location: Edison, NJ
Posts: 23
d25inferno is on a distinguished road
Send a message via AIM to d25inferno
Programming IR sensor

how do you program the IR sensor to alter the way the robot moves in EasyC?
I dont see an IR sensor block! Can you make blocks?

Also one other question: Is it possible to convert the 2007 default code into blocks?

Thanks in advance.
__________________
  #2   Spotlight this post!  
Unread 14-01-2008, 14:28
SamC SamC is offline
.
AKA: Sam Couch
FRC #0103 (Cybersonics)
Team Role: Programmer
 
Join Date: Mar 2006
Rookie Year: 2006
Location: Philadelphia, PA
Posts: 583
SamC has a reputation beyond reputeSamC has a reputation beyond reputeSamC has a reputation beyond reputeSamC has a reputation beyond reputeSamC has a reputation beyond reputeSamC has a reputation beyond reputeSamC has a reputation beyond reputeSamC has a reputation beyond reputeSamC has a reputation beyond reputeSamC has a reputation beyond reputeSamC has a reputation beyond repute
Re: Programming IR sensor

I got this from someone else, but this is how you would use the IR board to tell the robot to do something.

Code:
if (GetDigitalInput(1)){
doWhatever();
}
else if (GetDigitalInput(2)){
doSomethingElse();
}
change the number in GetDigitalInput to whatever to fit your needs. Good Luck!
  #3   Spotlight this post!  
Unread 14-01-2008, 15:22
Kingofl337's Avatar
Kingofl337 Kingofl337 is offline
You didn't see anything....
AKA: Adam
FRC #0501 (Power Knights)
Team Role: Mentor
 
Join Date: Feb 2005
Rookie Year: 1998
Location: Manchester, NH
Posts: 861
Kingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond repute
Send a message via Yahoo to Kingofl337
Re: Programming IR sensor

Correct you use the digital input block.

The idea behind easyC is you don't need default code you can make your own default code with like 3 blocks.
I would recommend going through the "Getting Started" section of the help file buy the time you finish you should
be an easyC Jedi !

Do you have a VEX robot you can practice on?
__________________
FIRST Team 501 PowerKnights - Mentor
FIRST Team 40 Checkmate - Mentor Alum
FIRST Team 146 Blue Lightning - Alumni

Last edited by Kingofl337 : 14-01-2008 at 15:26.
  #4   Spotlight this post!  
Unread 16-01-2008, 13:05
Chris_Elston's Avatar
Chris_Elston Chris_Elston is offline
Controls Engineer
AKA: chakorules
FRC #1501 (Team THRUST)
Team Role: Engineer
 
Join Date: Feb 2004
Rookie Year: 2001
Location: Huntington, Indiana
Posts: 751
Chris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond repute
Re: Programming IR sensor

We threw our IR board on our VEX and wrote a really, really dirty fast program.

Look at this for a sample.
Attached Files
File Type: zip vex_1501_easyC_IR.zip (19.9 KB, 177 views)
__________________
Team T.H.R.U.S.T. 1501
Download all of our past robot's source code here:Repository

Favorite CD quote:
"That can't be their 'bot. not nearly enough (if any) rivets to be a 1501 machine." ~RogerR: Team #1369
  #5   Spotlight this post!  
Unread 17-01-2008, 19:37
elvin23's Avatar
elvin23 elvin23 is offline
not cool
FRC #0354 (354)
 
Join Date: Jan 2008
Rookie Year: 2007
Location: . . .
Posts: 41
elvin23 can only hope to improve
Send a message via AIM to elvin23
Talking Re: Programming IR sensor

i love IR sensers i made a simple program take a look i dont have pics but ill write one
BEGIN
autonomous
Variables
PrintToScreen("BEGIN\n");
SetPMW(1,0);
SetPMW(2,0);
PrintToScreen("END\n");
END
__________________
I never was a cool guy but i would like to be like the guy in the pic he's cool
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 ultrasonic sensor in MPlab AdamHeard FIRST Tech Challenge 1 09-05-2006 00:40
Programming the parallax PING))) Ultrasonic Sensor edman Programming 3 18-02-2006 23:37
Banner Sensor Programming Problem 2Crisis Programming 4 24-02-2004 13:40
autonomous sensor programming ? Laura_d Programming 1 10-02-2003 17:46
Tips for Sensor Programming and Testing EricEnsor Programming 3 24-01-2003 11:28


All times are GMT -5. The time now is 18:44.

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