Question
Hi, I have a couple of MicaZ motes and MTS310 sensor boards. I was trying to take magnetic sensor readings from HMC1002 sensor. From top
Hi,
I have a couple of MicaZ motes and MTS310 sensor boards. I was trying to take magnetic sensor readings from HMC1002 sensor.
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
interface Read
However, MagXC and MagYC generic configurations also provide Mag interface for which there is the following command in the Mag.nc :
/*
* 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,
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started