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:
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 =
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
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'.
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
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
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
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
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