Go to Post Give us six more motors in the kit, and we'll try and come up with something... - Karthik [more]
Home
Go Back   Chief Delphi > Other > VEX
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
 
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 17-03-2007, 08:09
Mark McLeod's Avatar
Mark McLeod Mark McLeod is offline
Just Itinerant
AKA: Hey dad...Father...MARK
FRC #0358 (Robotic Eagles)
Team Role: Engineer
 
Join Date: Mar 2003
Rookie Year: 2002
Location: Hauppauge, Long Island, NY
Posts: 8,800
Mark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond repute
Re: Autonomous Switching

Quote:
Originally Posted by ManicMechanic View Post
If we want to use Ports #1 & 2 (easiest to distinguish in a hurry), I'm assuming that we would have to reconfigure these as digital inputs. Are there any caveats/disadvantages to doing this, as opposed to using ports #11-16 (already configured as digital inputs by default)?

Does your variable rc_dig_in01 have to be declared anywhere prior using it to store the results of your digital input?

If we want to read a jumper in the interrupt ports instead, what command do we use to access the input from them?
Just to avoid confusing people who are reading this be aware that the example I showed was for programming through MPLAB rather than EasyC. You can do the same thing in EasyC it's just a little different.

You can safely change the default configurations of inputs 1 & 2 to use those for jumpers.
With MPLAB You have to change: Set_Number_of_Analog_Channels(NO_ANALOGS);
The only issue that might change your mind is if you wanted to use an input for an analog sensor rather than digital. The way the Vex controller is designed any analog inputs you use are declared in order before your digital inputs.

If you use MPLAB to program your robot then rc_dig_in01 is defined.
In EasyC you'd drag in "Digital Inputs" from under "Inputs" to check your jumper.
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle
Reply With Quote
Reply


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
Switching Channels Fred Agnir Control System 5 20-01-2006 20:54
Question about switching autonomous modes DemonYawgmoth Programming 2 23-03-2005 17:02
switching joysticks ten3brousone Control System 1 06-03-2005 20:51
switching joysticks ten3brousone Electrical 1 06-03-2005 20:51
Switching allys? archiver 1999 1 23-06-2002 22:34


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

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