[Tinyos-help] Re ad Adc - humidity value
Hi , i use Tinyos-2.. I want to read humidity data from EC-5 soil sensor. i want to read values from adc with SendingMote (RssiDemo) ,using also compoment MicaBusC. I have already motify the code but i i think need some help here. New lines SendingMoteC.nc #include ApplicationDefinitions.h #include RssiDemoMessages.h module SendingMoteC { uses interface Boot; uses interface TimerTMilli as SendTimer; uses interface GeneralIO as PW1; uses interface MicaBusAdc as Adc7 uses interface AMSend as RssiMsgSend; uses interface SplitControl as RadioControl; } implementation { message_t msg; event void Boot.booted(){ call RadioControl.start(); call PW1.makeOutput(); } event void RadioControl.startDone(error_t result){ call SendTimer.startPeriodic(SEND_INTERVAL_MS); } event void RadioControl.stopDone(error_t result){} event void SendTimer.fired(){ call Adc7.getChannel(); call RssiMsgSend.send(AM_BROADCAST_ADDR, msg, sizeof(RssiMsg)); call PW1.toggle(); } event void RssiMsgSend.sendDone(message_t *m, error_t error){} } Thank you. -- View this message in context: http://old.nabble.com/Read-Adc---humidity-value-tp31655696p31655696.html Sent from the TinyOS - Help mailing list archive at Nabble.com. ___ Tinyos-help mailing list Tinyos-help@millennium.berkeley.edu https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
Re: [Tinyos-help] Re ad Adc - humidity value
With all this i mean that , i want to get the right ADC channel , sample the value , store it in a struct and send it to Base and then to pc. George_1985 wrote: Hi , i use Tinyos-2.. I want to read humidity data from EC-5 soil sensor. i want to read values from adc with SendingMote (RssiDemo) ,using also compoment MicaBusC. I have already motify the code but i i think need some help here. New lines SendingMoteC.nc #include ApplicationDefinitions.h #include RssiDemoMessages.h module SendingMoteC { uses interface Boot; uses interface TimerTMilli as SendTimer; uses interface GeneralIO as PW1; uses interface MicaBusAdc as Adc7 uses interface AMSend as RssiMsgSend; uses interface SplitControl as RadioControl; } implementation { message_t msg; event void Boot.booted(){ call RadioControl.start(); call PW1.makeOutput(); } event void RadioControl.startDone(error_t result){ call SendTimer.startPeriodic(SEND_INTERVAL_MS); } event void RadioControl.stopDone(error_t result){} event void SendTimer.fired(){ call Adc7.getChannel(); call RssiMsgSend.send(AM_BROADCAST_ADDR, msg, sizeof(RssiMsg)); call PW1.toggle(); } event void RssiMsgSend.sendDone(message_t *m, error_t error){} } Thank you. -- View this message in context: http://old.nabble.com/Read-Adc---humidity-value-tp31655696p31658429.html Sent from the TinyOS - Help mailing list archive at Nabble.com. ___ Tinyos-help mailing list Tinyos-help@millennium.berkeley.edu https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
Re: [Tinyos-help] Re ad Adc - humidity value
I use Iris Mote and MDA100CB development area. George_1985 wrote: With all this i mean that , i want to get the right ADC channel , sample the value , store it in a struct and send it to Base and then to pc. George_1985 wrote: Hi , i use Tinyos-2.. I want to read humidity data from EC-5 soil sensor. i want to read values from adc with SendingMote (RssiDemo) ,using also compoment MicaBusC. I have already motify the code but i i think need some help here. New lines SendingMoteC.nc #include ApplicationDefinitions.h #include RssiDemoMessages.h module SendingMoteC { uses interface Boot; uses interface TimerTMilli as SendTimer; uses interface GeneralIO as PW1; uses interface MicaBusAdc as Adc7 uses interface AMSend as RssiMsgSend; uses interface SplitControl as RadioControl; } implementation { message_t msg; event void Boot.booted(){ call RadioControl.start(); call PW1.makeOutput(); } event void RadioControl.startDone(error_t result){ call SendTimer.startPeriodic(SEND_INTERVAL_MS); } event void RadioControl.stopDone(error_t result){} event void SendTimer.fired(){ call Adc7.getChannel(); call RssiMsgSend.send(AM_BROADCAST_ADDR, msg, sizeof(RssiMsg)); call PW1.toggle(); } event void RssiMsgSend.sendDone(message_t *m, error_t error){} } Thank you. -- View this message in context: http://old.nabble.com/Read-Adc---humidity-value-tp31655696p31658449.html Sent from the TinyOS - Help mailing list archive at Nabble.com. ___ Tinyos-help mailing list Tinyos-help@millennium.berkeley.edu https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help