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 Timer<TMilli> 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
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to