[Tinyos-help] Accelerometer Sampling on MTS310
Jin-Yu, Ou
M9656001 at mail.npust.edu.tw
Thu Jun 18 01:37:52 PDT 2009
Hi
I had found out if I turn off Temperature and Light both, AccelX and
AccelY both will sample in error readings.
My changing history:
(1) Sensing order at file XMTS310M.nc is
ADCBATT, Temperature, Light, MicADC, AccelX, AccelY, MagX and MagY.
I only want MTS310 to sample AccelX and AccelY both,
for reach this, first I had put the code at area of AccelY.dataReady by
following lines
atomic {
if (!sending_packet) {
sending_packet = TRUE;
post send_radio_msg();
}
(2) The sensing order at file XMTS310M.nc is
ADCBATT, Temperature, Light, MicADC, AccelX and AccelY.
The second, I had put the code at area of ADCBATT.dataReady
under line "call Temperature.getData();" by this line "call
AccelX.getData(); ",
and annotated lines "call Temperature.getData();".
async event result_t ADCBATT.dataReady(uint16_t data) {
if (!sensinginsession) return FAIL;
readings.vref = data;
atomic sensinginsession = FALSE;
post battstop();
//call TempControl.start(); //call Temperature.getData();
call AccelX.getData();
return SUCCESS;
}
Now, though I had reached my target, but readings AccelX and AccelY both
is exporting in wrong value.
--
Best regards,
Jin-Yu, Ou
E-mail: ojwesoet at gmail.com
Tel : +886-8-7703202 ext 7917
Multimedia Information Network Advanced Research Lab.
http://minar.npust.edu.tw/
Department of Management Information Systems
http://mis1.npust.edu.tw/
National Pingtung University of Science & Technology
http://www.npust.edu.tw/
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: XMTS310M.nc
Url: https://www.millennium.berkeley.edu/pipermail/tinyos-help/attachments/20090618/b6a377fb/attachment-0002.txt
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: XMTS310.nc
Url: https://www.millennium.berkeley.edu/pipermail/tinyos-help/attachments/20090618/b6a377fb/attachment-0003.txt
More information about the Tinyos-help
mailing list