No subject


Thu Apr 16 08:11:01 PDT 2009


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

--001636c5a2d923cd8a0469f122b3
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

<div class=3D"gmail_quote">
<div>Hi,</div>
<div>=A0</div>
<div>I=A0have a couple of MicaZ motes and MTS310 sensor boards. I was tryin=
g to=A0take magnetic sensor readings=A0from=A0HMC1002 sensor. </div>
<div>=A0</div>
<div>I think necessary components are those in the following link (the ones=
 related to magnetic sensor):</div>
<div>=A0</div>
<div><a href=3D"http://www.tinyos.net/tinyos-2.x/tos/sensorboards/mts300/" =
target=3D"_blank">http://www.tinyos.net/tinyos-2.x/tos/sensorboards/mts300/=
</a></div>
<div>=A0</div>
<div>From top to bottom level components=A0 are :=A0</div>
<div>MagXC.nc -&gt; MagReadP -&gt; MagConfigP -&gt; MagP, MicaBusC</div>
<div>MagYC.nc -&gt; MagReadP -&gt; MagConfigP -&gt; MagP, MicaBusC</div>
<div>=A0</div>
<div>Thus, it seems that i sholud use=A0=A0MagXC and MagYC <font size=3D"2"=
>generic configurations. </font></div>
<div><font size=3D"2"></font>=A0</div>
<div><font size=3D"2">I can use read interfaces provided by those=A0=A0gene=
ric configurations as=A0in the SensorMts300C.nc:</font></div>
<div>=A0</div>
<div><font size=3D"2">provides{</font></div>
<div>
<p>interface Read&lt;uint16_t&gt; as MagX; //!&lt; magnetometer sensor</p>
<p>interface Read&lt;uint16_t&gt; as MagY; //!&lt; magnetometer sensor}</p>=
</div>
<div>=A0However, MagXC and MagYC=A0 generic configurations also provide Mag=
 interface for which there is the following command in the Mag.nc :</div>
<div>=A0</div>
<div><font size=3D"2">/*</font></div>
<div>
<p>* Authors: Alec Woo</p>
<p>* Date lase modified: 8/20/02</p>
<p>*</p>
<p>* The MagSetting inteface provides an asynchronous mechanism for</p>
<p>* setting the gain offset for the Magnetometer on the mica sensorboard.<=
/p>
<p>* This is particularly useful in calibrating the offset of the Magnetome=
ter</p>
<p>* such that X and Y axis can stay in the center for idle signals. </p>
<p>* If not calibrated, the data you get may rail. (railing means</p>
<p>* the data either stays at the maximum (~785) or minimum (~240)). </p>
<p>*</p>
<p>* The gain adjust has 256 steps ranging from 0 to 255.</p>
<p>*</p>
<p>*/</p>
<p>Thus, i should somehow use this interface in my application to make some=
 settings. However, i don&#39;t know how and where=A0(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 se=
nsor readings, or not. </p>

<p>Could anyone please help me with this issue ?=A0</p>
<p>Thanks in advance,</p></div>
<div></div>
<div>By the way, I am using XubunTOS-2.1.0</div>
<div>-- <br>Mehmet Akif Antepli<br>Graduate student </div>
<div>Dept. of EEE</div>
<div>Middle East=A0Technical University</div>
<div>=A0</div></div>

--001636c5a2d923cd8a0469f122b3--


More information about the Tinyos-help mailing list