Hi,

I have a couple of MicaZ motes and MTS310 sensor boards. I was trying
to take magnetic sensor readings from HMC1002 sensor.

I think necessary components are those in the following link (the ones
related to magnetic sensor):

http://www.tinyos.net/tinyos-2.x/tos/sensorboards/mts300/

>From top to bottom level components  are :
MagXC.nc -> MagReadP -> MagConfigP -> MagP, MicaBusC
MagYC.nc -> MagReadP -> MagConfigP -> MagP, MicaBusC

Thus, it seems that i sholud use  MagXC and MagYC generic configurations.

I can use read interfaces provided by those  generic configurations as in
the SensorMts300C.nc:

provides{

interface Read<uint16_t> as MagX; //!< magnetometer sensor

interface Read<uint16_t> as MagY; //!< magnetometer sensor}
 However, MagXC and MagYC  generic configurations also provide Mag interface
for which there is the following command in the Mag.nc :

/*

* Authors: Alec Woo

* Date lase modified: 8/20/02

*

* The MagSetting inteface provides an asynchronous mechanism for

* setting the gain offset for the Magnetometer on the mica sensorboard.

* This is particularly useful in calibrating the offset of the Magnetometer

* such that X and Y axis can stay in the center for idle signals.

* If not calibrated, the data you get may rail. (railing means

* the data either stays at the maximum (~785) or minimum (~240)).

*

* The gain adjust has 256 steps ranging from 0 to 255.

*

*/

Thus, i should somehow use this interface in my application to make some
settings. However, i don't know how and where (in the code) to make the
gainadjust...etc...stuff. I was wondering whether there are any TinyOS-2.x
code using the interfaces that i mentioned above and taking magnetic sensor
readings, or not.

Could anyone please help me with this issue ?

Thanks in advance,
 By the way, I am using XubunTOS-2.1.0
-- 
Mehmet Akif Antepli
Graduate student
Dept. of EEE
Middle East Technical University
_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to