Hi Ferry,
 
I faced a problem similar to you this morning. Every timer fired, ı tried to 
read three ADC channel. It sent only the first readings, but not the other two 
channel readings. I solved it by using a integer named sequence. After the 
single ADC reading, i increment it and decide whose turn it is. 
 
 
if sequence % 3 == 0
    read ADC1;
else if sequence % 3 ==1
    read ADC2;
else if sequence % 3 ==2
    read ADC3;
 
 
event void Read1.readDone()
{
getData;
sequnce ++;
}
 
 
It solved my problem. You may say that it lowers reading frequency. You are 
right, but decreasing the timer interval will compensate i think.
 
Note: Since websense does not let, i could not see the screenshots.
 

Firat TARAKTAS

 

________________________________

From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Ferry Cialis
Sent: Tuesday, June 05, 2007 11:46 AM
To: tinyos-help@Millennium.Berkeley.EDU
Subject: [Tinyos-help] Reducing data loss in Oscilloscope application


Hello,

I've a question about data transfer loss that I need help in. Firstly, I'm 
trying to get 2 different sensor readings. The sensor readings are 
Accelerometer X-direction and Accelerometer Y-direction. Previously, I managed 
to get both sensor readings from 2 motes i.e. each motes has each sensor and 
both transmit the sensor data to TOSBASE to be displayed over via Serial 
Forwarder to Oscilloscope GUI. The link below shows a screenshot of the result:

http://i194.photobucket.com/albums/z154/ferrycia/Oscilloscope2.jpg

As seen, the green one is the Accelerometer X sensor readings in a mote in 
channel 1 while the red one is Accelerometer Y in another mote in channel 2. 
The result seems ok. 

Next, I tried to get both of the sensor readings into a single mote to improve 
efficiency. I've modified the code a bit to separate the channels. The sensor 
was mounted on top of a mote and the same procedures with Serial Forwarder and 
Oscilloscope were done. The link below sows the result: 

http://i194.photobucket.com/albums/z154/ferrycia/Oscilloscope1.jpg 

As seen, the red one which represented channel 2 had plenty of data loss and 
the reading for it was patchy and intermittent but the green one for channel 1 
runs as usual. Also, channel 2 readings 

Is the problem lies in the loss data transfer when I tried to transmit 2 (or 
more) sensor readings from the same mote ? How do I correct or optimise the 
method ? Do I need to change anything for the Oscilloscope or TOSBASE code ? 
Please advise me clearly in the matter as I'm quite at loss 

Thank you for the attention,
yours,
Ferry

_______________________________________________
Tinyos-help mailing list
Tinyos-help@Millennium.Berkeley.EDU
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to