[Tinyos-help] ReadStream period off on a telosb?

Michiel Konstapel m.konstapel at sownet.nl
Wed Mar 5 01:18:10 PST 2008


In C, integer constants are of type int, which on the MSP is 16 bits. I.e., you're actually sampling every (1000000 & 0xFFFF) clock ticks (are those microseconds?). To specify a long integer (32 bit) constant, add an L to the number. You can also add a U to make it unsigned: read(1000000UL) should do the trick.

HTH,
Michiel

-----Original Message-----
From: tinyos-help-bounces at millennium.berkeley.edu on behalf of Sivan Toledo
Sent: Tue 3/4/2008 9:07 PM
To: TinyOS Help Mailing List
Subject: [Tinyos-help] ReadStream period off on a telosb?
 
I am trying to read from the TelosB ADC using the ReadStream interface
(wired to AdcReadStreamClientC), and it seems that when I set a large
period, for sanity checking, the actual sampling period is much
smaller. For example, if I call read(1000000) when the posted buffers
are of size 8, I get several buffers per second back, rather than 1
every 8 seconds.

Any idea why this is happening?

Thanks, Sivan
_______________________________________________
Tinyos-help mailing list
Tinyos-help at millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://www.millennium.berkeley.edu/pipermail/tinyos-help/attachments/20080305/1cad40fc/attachment.html


More information about the Tinyos-help mailing list