Re: [Tinyos-help] TelosB and IRIS sensor value calculation

2012-05-09 Thread Conny Schmitt
Hallo,

Thanks a lot. Now I am just look for the equations to calculate the voltage 
value of IRIS MTS400 and the sound value for MTS300.

Regards,
Conny

 Original-Nachricht 
 Datum: Mon, 23 Apr 2012 15:18:47 +0200
 Von: Francesco Ficarola francesco.ficar...@gmail.com
 An: laptop...@gmx.de
 CC: tinyos-help@millennium.berkeley.edu
 Betreff: Re: [Tinyos-help] TelosB and IRIS sensor value calculation

 Hi,
 
 On 04/23/2012 03:04 PM, laptop...@gmx.de wrote:
  The light sensor now reports a value of 467. But in the datasheets I can
 not find a conversion formular for international units. The only unit I
 found is for the temperature value.
 
 Look at this: http://www.taosinc.com/ProductDetails.aspx?id=133
 
 Download the following PDF and look at page 11:
 TSL2550 AMBIENT LIGHT SENSOR WITH SMBus INTERFACE
 
 Regards,
 -- 
 Francesco Ficarola
 Department of Computer and System Sciences
 Sapienza, University of Rome
 Via Ariosto 25, room B112
 00185, Rome
 Phone: (+39) 0677274119
 Skype: francesco.ficarola
 DIS email: ficarola_at_dis.uniroma1_dot_it
 Nexse email: francesco.ficarola_at_nexse_dot_com
 Home email: francesco.ficarola_at_gmail_dot_com
 GPG KeyID: 0xDBA99D92
 

-- 
NEU: FreePhone 3-fach-Flat mit kostenlosem Smartphone!  

Jetzt informieren: http://mobile.1und1.de/?ac=OM.PW.PW003K20328T7073a
___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help


[Tinyos-help] Compute instant energy consumption

2012-05-09 Thread David Rodenas

Hi all
I wonder if there is any TinyOS component or any method to measure the instant 
energy consumption (or get the average energy consumption periodically) on the 
nodes in a real fashion (not by means of simulation tools). I am working with 
Micaz devices and the only idea that comes to my mind is using theoretical 
values from MicaZ's datasheet. However, this would be just an estimation, and 
it would take too much time to compute this information. 
All the help possible would be appreciated. Thanks in advance, 
David ___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Re: [Tinyos-help] Compute instant energy consumption

2012-05-09 Thread antonio rosa
Hi David,

You can measure the voltage level of batteries (using  VoltageC component)
during a period and then make a figure with the evolution of the voltage
level over the time. After if you calculate the mean slope you get the mean
slope that means the consumption (but it's the mean consumption and not the
instant consumption).

Best Regards, Antonio Rosa.

2012/5/9 David Rodenas drod...@hotmail.com

  Hi all

 I wonder if there is any TinyOS component or any method to measure the
 instant energy consumption (or get the average energy consumption
 periodically) on the nodes in a real fashion (not by means of simulation
 tools). I am working with Micaz devices and the only idea that comes to my
 mind is using theoretical values from MicaZ's datasheet. However, this
 would be just an estimation, and it would take too much time to compute
 this information.

 All the help possible would be appreciated. Thanks in advance,

 David

 ___
 Tinyos-help mailing list
 Tinyos-help@millennium.berkeley.edu
 https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Re: [Tinyos-help] how to measure code execution time

2012-05-09 Thread Xiaohui Liu
Hi,

Where can I find the ISR for each interrupt, e.g., SFD interrupt when a
packet is received? Is it part of TinyOS implementation? Thanks.

On Wed, Aug 10, 2011 at 11:04 AM, Janos Sallai
sal...@isis.vanderbilt.eduwrote:

 Have you thought of modifying each and every ISR routine to store (and
 accumulate) the time spent serving interrupts? This accumulated value
 should then be subtracted from the running time of the code snippet.

 I suggest that you directly read the counter registers in the ISRs
 (vs. calling LocalTime.get(), which may have additional overhead). The
 counter registers should not overflow more than once while the
 interrupt handler is running.

 This gets a little tricky, though, if there are nested interrupts.
 AFAIK it's only the ADC subsystem that uses nested interrupts on the
 AVR platforms. If your application doesn't use the ADC, the above
 simple solution would suffice.

 Janos



 On Tue, Aug 9, 2011 at 10:27 PM, Xiaohui Liu whu...@gmail.com wrote:
  Hi everyone,
  How can I measure the time for a snippet of code (e.g., a function call
  foo), either synchronous or asynchronous, to execute?
  A straight forward way can be:
  start_time = Call LocalTime.get();
  foo();
  end_time = call LocalTime.get();
  (end_time - start_time) is regarded as the execution time of function
 call
  foo(). However, asynchronous code can preempt foo() during its execution,
  thus (end_time - start_time) may be overestimation of foo()'s actual
  execution time.
  An alternative can be something like the following:
  disable interrupt;
  start_time = Call LocalTime.get();
  foo();
  end_time = call LocalTime.get();
  enable interrupt;
  However, this can be problematic also if some critical interrupts (e.g.,
  packet reception) occur when the interrupt is disabled. Can anyone have
 some
  idea on how execution time can be measured without the above issues? Any
  help is appreciated.
  --
  -Xiaohui Liu
 
  ___
  Tinyos-help mailing list
  Tinyos-help@millennium.berkeley.edu
  https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
 




-- 
-Xiaohui Liu
___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

[Tinyos-help] Change radio range/ Listen Pin6 ADC

2012-05-09 Thread Rivo Sitraka Andriambolamalala RANDRIATSIFERANA
Hi all,

I'm starting to use tinyos and telosb platform, I want to change RF power
(Or Radio range).  My idea  as follow :
- first, I send a message ( for example : RF power, or Radio range = 1
meter)  per second;
 and at time fired, I will increment +1 a radio range value which I define
before.

- Second, I want to switch on/off a tranceiver :

* Boot: Radio switch-off,
* I want to listen/read Pin6 ADC (readADC, interrupt) :
How do to read/get a value of this Pin6 ?
 if  Voltage v = 1 V,
 Radio switch-on.

Can you give mes some idea, and what are the component / interface can I use to
implement this algorithm two?

Thank you for your help.

Sitraka
___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Re: [Tinyos-help] interrupt vs event

2012-05-09 Thread Xiaohui Liu
Hi,

I find something related to TOSH_SIGNAL:
// The signal attribute has opposite meaning in msp430-gcc than in avr-gcc
#define TOSH_SIGNAL(signame) \
  void sig_##signame() __attribute__((interrupt (signame), wakeup)) @C()
in msp430hardware.h

  TOSH_SIGNAL(NMI_VECTOR)
  {
volatile int n = IFG1;
if (n  NMIIFG) { signal NMI.fired(); return; }
if (n  OFIFG)  { signal OF.fired();  return; }
if (FCTL3  ACCVIFG) { signal ACCV.fired(); return; }
  }
 in HplMsp430InterruptNMIP.nc
But I'm still not sure how the hook from an interrupt works. Can you
explain a little bit? Thanks.

On Sun, Jun 6, 2010 at 8:33 PM, Eric Decker cire...@gmail.com wrote:

 okay, let me try.

 On Sun, Jun 6, 2010 at 11:05 AM, Xiaohui Liu whu...@gmail.com wrote:

 Hi,

 Can I say event is at higher level while interrupt is at lower level? I
 guess event handler may be sync if you look at Receive.receive() event.


 An interrupt handler typically handles a h/w interrupt.   In TinyOS you
 can find where we hook into the interrupt handlers by looking for
 TOSH_SIGNAL.

 In TinyOS, modules are interfaced using two mechanisms, commands for call
 in, and signals for call out.   Signals are wired to event handlers.   This
 is in the context of TinyOS.  Other environments will vary.

 Commands and event handlers can be labelled as sync or async.   Normally,
 one wants to keep everything sync.  Life is simpler that way.  TinyOS is
 about keeping things simple because less goes wrong that way.  Its one of
 the reasons why static allocation is preferred over dynamic (ie. malloc).
  Wild pointers aren't much fun.

 However, one clearly needs to be able to signal asynchronous event too.
  Like how do we further connect to TinyOS modules from the interrupt
 handler?  To denote that things can be happening in an asynchronous
 fashion, the keyword async word is used.

 The toolchain keeps track of the call chain and flags sync labelled
 routines that are callable from async routines because it violates the
 assumptions that make sync level stuff simple.

 Hopefully that adds some clarity.



 Can you help me find an example of interrupt handler in TinyOS? Thank you.


 Look for TOSH_SIGNAL.  That is how code is hooked into the h/w interrupt
 handler.



 On Sat, Jun 5, 2010 at 3:28 PM, Ali Baharev ali.baha...@gmail.comwrote:

 Hi,

 a callback subroutine in an operating system or device driver 
 http://en.wikipedia.org/wiki/Interrupt_handler


 When quoting, it helps to quote the whole thing...

 An *interrupt handler*, also known as an *interrupt service routine* (*
 ISR*), is a 
 callbackhttp://en.wikipedia.org/wiki/Callback_(computer_science) subroutine
 in an operating system http://en.wikipedia.org/wiki/Operating_system or 
 device
 driver http://en.wikipedia.org/wiki/Device_driver whose execution is
 triggered by the reception of an 
 interrupthttp://en.wikipedia.org/wiki/Interrupt.
 Interrupt handlers have a multitude of functions, which vary based on the
 reason the interrupt was generated and the speed at which the Interrupt
 Handler completes its task.

 The major difference between an event and an interrupt handler is how the
 event is generated.  A h/w event is an interrupt and gets hooked in with
 TOSH_SIGNAL.  An event handler is declared using event void ... and
 invoked using signal ...




 ---

 an event handler is an asynchronous callback subroutine that handles
 inputs received in a program
 http://en.wikipedia.org/wiki/Event_handler


 Well that depends.  On the context.  There are places where that is true.
  However, we are talking about TinyOS.  So the above confuses things.



  Ali




 --
 -Xiaohui Liu

 ___
 Tinyos-help mailing list
 Tinyos-help@millennium.berkeley.edu
 https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help




 --
 Eric B. Decker
 Senior (over 50 :-) Researcher





-- 
-Xiaohui Liu
___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

[Tinyos-help] difference between AMSenderC and ActiveMessageC

2012-05-09 Thread Xiaohui Liu
Hi,

What is the difference between
components new AMSenderC(APP_AM_TYPE);
App.AMSend - AMSenderC;
and
components ActiveMessageC;
App.AMSend - ActiveMessageC.AMSend[APP_AM_TYPE];
? Can I still use ActiveMessageC directly when there are multiple
communication clients, or AMSenderC abstraction is a must in this case?
Thanks in advance.

-- 
-Xiaohui Liu
___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help