Go to Post Where can I buy the awesomeness that you used on that? Do they sell it at andymark? - HansJ [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 13-01-2006, 23:01
DRH2o's Avatar
DRH2o DRH2o is offline
Registered User
AKA: Dan Waters
FRC #1598 (Team Talon)
Team Role: Mentor
 
Join Date: Jan 2005
Rookie Year: 2005
Location: Danville, VA
Posts: 147
DRH2o is a glorious beacon of lightDRH2o is a glorious beacon of lightDRH2o is a glorious beacon of lightDRH2o is a glorious beacon of lightDRH2o is a glorious beacon of lightDRH2o is a glorious beacon of light
Where switches & sensors go?

In easy c where should the limit switches be placed ? Should they be in Initialize, Autonomous, or Operator Control ? Where does the pressure switch for the compressor and the relay go? These need to be active any time the robot is active so do they go in each section as needed? In the limit switch test file it is in the Main section but you cannot place it there while using the Competition Project.
  #2   Spotlight this post!  
Unread 14-01-2006, 08:02
BradAMiller BradAMiller is offline
Registered User
AKA: Brad
#0190 ( Gompei and the Herd)
Team Role: Mentor
 
Join Date: Mar 2004
Location: Worcester, MA
Posts: 590
BradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant future
Re: Where switches & sensors go?

Quote:
Originally Posted by DRH2o
In easy c where should the limit switches be placed ? Should they be in Initialize, Autonomous, or Operator Control ? Where does the pressure switch for the compressor and the relay go? These need to be active any time the robot is active so do they go in each section as needed? In the limit switch test file it is in the Main section but you cannot place it there while using the Competition Project.
Good questions.

You can place code for the limit switches any place a mechanism, like an arm, is operating that needs to be protected by that limit switch. I'd suggest writing an function that operates the arm or whatever thing has the limit switch on it. Then you can call the function from Autonomous or OperatorControl. That way the code won't be duplicated.

You can write the Autonomous and OperatorControl functions as infinte loops, polling inputs and running motors. EasyC will automatically take the program out of your Autonomous function when the field switches, and put it into the OperatorControl function.

Same with the compressor, you could write a function that runs the "polls" the pressure switch and turns the compressor on or off as needed. You would call this function periodically in Initialize, Autonomous, and OperatorControl. I know that this is inconvenient, and we are hoping to incorporate a better solution for the compressor shortly in an update.

Brad
  #3   Spotlight this post!  
Unread 14-01-2006, 09:00
DRH2o's Avatar
DRH2o DRH2o is offline
Registered User
AKA: Dan Waters
FRC #1598 (Team Talon)
Team Role: Mentor
 
Join Date: Jan 2005
Rookie Year: 2005
Location: Danville, VA
Posts: 147
DRH2o is a glorious beacon of lightDRH2o is a glorious beacon of lightDRH2o is a glorious beacon of lightDRH2o is a glorious beacon of lightDRH2o is a glorious beacon of lightDRH2o is a glorious beacon of light
Re: Where switches & sensors go?

Thanks Brad.

I will pass this on to our programmer. He is trying to decide whether he wants to use easy c or mplab. We were able to be somewhat successful last year in autonomous ( scoring about 75% of the time ) but did not use the camera or other sensors. This would be easy to do in easy c.
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
jumper cabling from sensors to controller Gary Dillard Electrical 4 23-12-2005 07:42
Alternative to limit switches? RbtGal1351 Electrical 27 10-12-2005 15:30
Bumper sensors jeffmorris FIRST Tech Challenge 1 02-10-2005 16:20
Getting Fancy with Sensors FadyS. Programming 30 10-03-2004 15:02
Why not analog sensors?? gnormhurst Programming 16 07-03-2004 16:14


All times are GMT -5. The time now is 04:33.

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