ROBOTC.net forums
http://robotc.net/forums/

Is this possible (turn sensors on and off)
http://robotc.net/forums/viewtopic.php?f=11&t=1939
Page 1 of 1

Author:  awri [ Sun Nov 08, 2009 2:32 am ]
Post subject:  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.

Author:  elizabeth.mabrey [ Sun Nov 08, 2009 8:11 am ]
Post subject:  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

Author:  awri [ Sun Nov 08, 2009 11:57 am ]
Post subject:  Re: Is this possible (turn sensors on and off)

Sorry I meant to put that this is for a vex mc.

Author:  Dick Swan [ Wed Dec 09, 2009 3:58 pm ]
Post subject:  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.

Page 1 of 1 All times are UTC - 5 hours [ DST ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/