View unanswered posts | View active topics It is currently Tue Nov 25, 2014 7:30 pm






Reply to topic  [ 5 posts ] 
Use of Magnetic Sensor in RobotC 
Author Message
Rookie

Joined: Thu Oct 27, 2011 2:49 pm
Posts: 1
Post 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:


Thu Nov 17, 2011 5:31 pm
Profile
Guru
User avatar

Joined: Sun Nov 15, 2009 5:46 am
Posts: 1347
Post 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.


Thu Nov 17, 2011 6:11 pm
Profile
Moderator
Moderator
User avatar

Joined: Wed Mar 05, 2008 8:14 am
Posts: 3289
Location: Rotterdam, The Netherlands
Post 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

_________________
| Professional Conduit of Reasonableness
| (Title bestowed upon on the 8th day of November, 2013)
| My Blog: I'd Rather Be Building Robots
| ROBOTC 3rd Party Driver Suite: [Project Page]


Fri Nov 18, 2011 4:38 am
Profile WWW
Rookie

Joined: Fri Feb 17, 2012 5:13 pm
Posts: 1
Post 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


Fri Feb 17, 2012 5:19 pm
Profile
Moderator
Moderator
User avatar

Joined: Wed Mar 05, 2008 8:14 am
Posts: 3289
Location: Rotterdam, The Netherlands
Post 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

_________________
| Professional Conduit of Reasonableness
| (Title bestowed upon on the 8th day of November, 2013)
| My Blog: I'd Rather Be Building Robots
| ROBOTC 3rd Party Driver Suite: [Project Page]


Fri Feb 17, 2012 6:02 pm
Profile WWW
Display posts from previous:  Sort by  
Reply to topic   [ 5 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.