Hi Jan and John,
Thank you for your responses, I finally find where the problem occured,
it seemed to be a problem of buffer copy.
I fixed this while rewriting a large part of my code so I'm not sure
about this but apparently it wasn't exactly an adc problem but when I
handle the results and copy back to the radio.
But, with this explanation I can't understand why data are ok after a
little time..
Thank you for your help Jan and John for your example which will be
probably useful to other people :)
John Griessen wrote:
Jan Hauer wrote:
Can you try this (create a new app):
- instantiate Msp430Adc12ClientAutoRVGC() and wire you application
module to it
- in your app module where you provide AdcConfigure, return a pointer
to the 1st channel configuration (with VREFplus_AVss) which you
defined as a const module variable
- in Boot.booted() you call Resource.request()
- in Resource.granted() you call Msp430Adc12MultiChannel.configure()
and then Msp430Adc12MultiChannel.getData()
- check all return values
I just fixed some code like that. A working code example of
multichannel a2d with the above kind of structure. It's at:
http://www.ecosensory.com/ch12AdcP.nc
http://www.ecosensory.com/ch12AdcC.nc
http://www.ecosensory.com/a2d12ch.h
http://www.ecosensory.com/Testch12AdcC.nc
http://www.ecosensory.com/Testch12AdcP.nc
It doesn't get the data out on a radio message yet,
but it turns on leds at the SUCCESS responses we want
from multichannel...
John Griessen
_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help