Re: [Tinyos-help] Why the sample frequency is limited to 31Hz using Tinyos2.0

2007-05-16 Thread Hugo Sousa
For stream reading you have to use AccelReadStreamP and AdcReadStreamClientC, but why don't you use the component AccelXStreamC? You don't have to write your own component. Note: you have to post a buffer for every read you do Cheers, Hugo On 5/16/07, Fangming Zhang [EMAIL PROTECTED] wrote:

Re: [Tinyos-help] Why the sample frequency is limited to 31Hz using Tinyos2.0

2007-05-16 Thread Fangming Zhang
Hi, Do you mean that I use the component AccelXStreamC in DemoSensorStreamC like following: generic configuration DemoSensorStreamC() { provides interface ReadStreamuint16_t; } implementation { components AccelXStreamC, AccelYStreamC; ReadStream = AccelXStreamC.ReadStream; ReadStream =

Re: [Tinyos-help] Why the sample frequency is limited to 31Hz using Tinyos2.0

2007-05-16 Thread Hugo Sousa
Generic components have to be instantiated, you're already using that, when you instantiate DemoSensorC in your configuration file (GetAccelAppC.nc i suppose) Note: you don't have to place every sensor component inside a DemoSensor file, you can just wire the AccelXStreamC and AccelYStreamC

Re: [Tinyos-help] Why the sample frequency is limited to 31Hz using Tinyos2.0

2007-05-15 Thread Fangming Zhang
Hi Philip, I still feel very difficult to finish this project. The main difficulty is how to write component AccelStreamC. I feel how to make a interface between ReadStream and Read as AdcReadClient only provide interface Read.I will explain in next. I define the packet name as 'GetAccel'.

Re: [Tinyos-help] Why the sample frequency is limited to 31Hz using Tinyos2.0

2007-05-13 Thread Fangming Zhang
Hi Hugo, Your guess is right. I read one axis, then wait readDone() to start another axis. Your explanation let me understand what caused this problem. However, I still cannot understand how to use accelStream. I list my old methods as follows. Please help find how to solve the problem. I

Re: [Tinyos-help] Why the sample frequency is limited to 31Hz using Tinyos2.0

2007-05-13 Thread Hugo Sousa
Hi Fangming, You don't have to wait for a readDone() to read the other, you can call both Reads because accelconfigp has an arbiter that prevents simultaneous access. It is also better that you call them both because that way the sensor is not turned off between the two readings, doubling your

Re: [Tinyos-help] Why the sample frequency is limited to 31Hz using Tinyos2.0

2007-05-13 Thread Philip Levis
On May 13, 2007, at 5:01 PM, Hugo Sousa wrote: Hi Fangming, You don't have to wait for a readDone() to read the other, you can call both Reads because accelconfigp has an arbiter that prevents simultaneous access. It is also better that you call them both because that way the sensor is

Re: [Tinyos-help] Why the sample frequency is limited to 31Hz using Tinyos2.0

2007-05-12 Thread Hugo Sousa
We need more information about your application, but I'm guessing you are reading one axis, and when you get the readDone() you read the other axis, right? The accelerometer sensor has a warmup time of 17 ms (check AccelP.nc), that means that every time you do a Read.read() it takes 17 ms to

[Tinyos-help] Why the sample frequency is limited to 31Hz using Tinyos2.0

2007-05-11 Thread Fangming Zhang
Hi everyone, My hardwares are MIB520, MTS310, and MICAZ. The transmitting rate of MIB520 is 57.4Kbps, and that of MICAZ is 250Kbps. The platform is Tinyos2.0. My objective is getting sample frequency of 64Hz when I only need data of accelerometer data, X and Y axis. However, it shows we can only