[Tinyos-help] How to get local time by using counter
Mehedi Bakht
mbakht at gmail.com
Thu Jun 21 09:56:34 PDT 2007
You can use the component CounterMilli32C if you want millisecond precision.
I am using it myself with tmotes.
components new CounterToLocalTimeC(TMilli);
components CounterMilli32C;
CounterToLocalTimeC.Counter -> CounterMilli32C;
Hope it helps.
--Mehedi
On 6/21/07, Min Guo <min.guomin at gmail.com> wrote:
>
> I want to get the local time of tmote sky. I see there is a command
> "get()" in the interface "LocalTime". This command gets the local time of
> the mote by using counter. However, I am not sure which component provides
> this interface. When I try using the component "CounterToLocalTimerC", I get
> the following error:
>
> /opt/tinyos-2.x/tos/lib/timer/CounterToLocalTimeC.nc(
> TimeSyncC.CounterToLocalTimeC):44: Counter.get not connected
>
>
> I dont know how to use this CounterToLocalTimerC. Does anyone know how to
> use it? Or is there any other good way to get the local time of a mote?
>
> Best regards,
> Min
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.millennium.berkeley.edu/pipermail/tinyos-help/attachments/20070621/7b66b070/attachment.htm
More information about the Tinyos-help
mailing list