View unanswered posts | View active topics It is currently Fri Dec 19, 2014 6:47 am






Reply to topic  [ 4 posts ] 
Is this possible (turn sensors on and off) 
Author Message
Rookie

Joined: Mon Oct 26, 2009 8:29 pm
Posts: 4
Post Is this possible (turn sensors on and off)
Turning on and off sonar sesors is easy in EasyC, how can I do this in robotc?

http://www.vexforum.com/showthread.php?t=676

example of EasyC code that does this.


Sun Nov 08, 2009 2:32 am
Profile
Expert

Joined: Sun Aug 19, 2007 2:43 pm
Posts: 142
Location: New Jersey
Post Re: Is this possible (turn sensors on and off)
in RobotC? Absolutely.... using the sensor type.

sensorLightActive = 5, // NXT bricks only
sensorLightInactive = 6, // NXT bricks only

yes, I know it is not in the documentation. I found it in the header file TSensorTypes.h


Sun Nov 08, 2009 8:11 am
Profile WWW
Rookie

Joined: Mon Oct 26, 2009 8:29 pm
Posts: 4
Post Re: Is this possible (turn sensors on and off)
Sorry I meant to put that this is for a vex mc.


Sun Nov 08, 2009 11:57 am
Profile
Creator
Creator

Joined: Fri Feb 09, 2007 9:21 am
Posts: 615
Post Re: Is this possible (turn sensors on and off)
To turn off a sensor set the sensor type to "none"
Code:
sensorType[in1] = sensorNone;

Replace "in1" with the appropriate port number name.


Wed Dec 09, 2009 3:58 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 4 posts ] 

Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  



Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.