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

Use of Magnetic Sensor in RobotC
http://www.robotc.net/forums/viewtopic.php?f=52&t=3746
Page 1 of 1

Author:  wildcats [ Thu Nov 17, 2011 5:31 pm ]
Post subject:  Use of Magnetic Sensor in RobotC

Hello Everybody
My team is using robotC but we do not know how to use the magnetic sensor in our code :( . We have downloaded the drivers but dont know where to begin, we bought the sensor from HiTechnic. Would anyone be able to help us?
-williston wildcats :breakcomputer:

Author:  MHTS [ Thu Nov 17, 2011 6:11 pm ]
Post subject:  Re: Use of Magnetic Sensor in RobotC

If you have downloaded Xander's driver suite, it contains the driver as well as the sample code to use the magnetic sensor. I don't have my laptop in front of me but I remember the name is something like HTMAG-test.c or something similar.

Author:  mightor [ Fri Nov 18, 2011 4:38 am ]
Post subject:  Re: Use of Magnetic Sensor in RobotC

MHTS,

You remembered almost correctly, it's HTMAG-test1.c and HTMAG-SMUX-test1.c (if you're using a HiTechnic Sensor MUX). Congratulations, you are the winner of an attractive set of virtual steak knives!

- Xander

Author:  Synergy975 [ Fri Feb 17, 2012 5:19 pm ]
Post subject:  Re: Use of Magnetic Sensor in RobotC

Hi,
I have been looking for a simple code to drive a lego motor that is in port A with the Magnet sensor in port 2.
My team is using robotC and we have downloaded the drivers. Can anyone post a Sample code please thank you.
~Bob Rodi

Author:  mightor [ Fri Feb 17, 2012 6:02 pm ]
Post subject:  Re: Use of Magnetic Sensor in RobotC

Look at the code in HTMAG-test1.c, just change S1 to S2 and you're good to go.

- Xander

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