|
Page 1 of 1
|
[ 5 posts ] |
|
Use of Magnetic Sensor in RobotC
| Author |
Message |
|
wildcats
Rookie
Joined: Thu Oct 27, 2011 2:49 pm Posts: 1
|
 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 
|
| Thu Nov 17, 2011 5:31 pm |
|
 |
|
MHTS
Guru
Joined: Sun Nov 15, 2009 5:46 am Posts: 1023
|
 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 |
|
 |
|
mightor
Moderator
Joined: Wed Mar 05, 2008 8:14 am Posts: 2864 Location: Rotterdam, The Netherlands
|
 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
_________________| Some people, when confronted with a problem, think, "I know, I'll use threads," | and then two they hav erpoblesms. (@nedbat)| My Blog: I'd Rather Be Building Robots| ROBOTC 3rd Party Driver Suite: [ Project Page]
|
| Fri Nov 18, 2011 4:38 am |
|
 |
|
Synergy975
Rookie
Joined: Fri Feb 17, 2012 5:13 pm Posts: 1
|
 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 |
|
 |
|
mightor
Moderator
Joined: Wed Mar 05, 2008 8:14 am Posts: 2864 Location: Rotterdam, The Netherlands
|
 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
_________________| Some people, when confronted with a problem, think, "I know, I'll use threads," | and then two they hav erpoblesms. (@nedbat)| My Blog: I'd Rather Be Building Robots| ROBOTC 3rd Party Driver Suite: [ Project Page]
|
| Fri Feb 17, 2012 6:02 pm |
|
|
|
Page 1 of 1
|
[ 5 posts ] |
|
Who is online |
Users browsing this forum: No registered users and 1 guest |
|
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
|
|