Hi everyone! I am having a problem interfacing an SHT11 sensor into a Micaz
mote.

>From the SensirionShtLogicP.nc, I got a return FAIL message from these
lines:
  error_t waitForResponse() {
    call DATA.makeInput();
    call DATA.set();
    call CLOCK.set();
    if (call DATA.get()) {
      // the device didn't pull the DATA line low
      // the command wasn't received or acknowledged
      return FAIL;
    }
    call CLOCK.clr();
    return SUCCESS;
  }

Retracing the wiring of the DATA interface, I found from
HalSensirionSht11C.nc that:
  SensirionSht11LogicP.DATA -> HplSensirionSht11C.DATA;

Now I'm not sure if I got the right connection for the DATA interface. This
is my revised code of the HplSensirionSht11C:
configuration HplSensirionSht11C {
  provides interface Resource[ uint8_t id ];
  provides interface GeneralIO as DATA;
  provides interface GeneralIO as SCK;
  provides interface Interrupt as InterruptDATA;
}
implementation {
  components HplAtm128GeneralIOC;

//  components new Msp430GpioC() as DATAM;
//  components new Msp430GpioC() as SCKM;
//  components new Msp430GpioC() as PWRM;

//  components new HplAtm128GeneralIOPinP() as DATAM;
//  components new HplAtm128GeneralIOPinP() as SCKM;
//  components new HplAtm128GeneralIOPinP() as PWRM;

//  DATAM -> HplAtm128GeneralIOC.PortE7;
//  SCKM -> HplAtm128GeneralIOC.PortC3;
//  PWRM -> HplAtm128GeneralIOC.PortC0;
  DATA = HplAtm128GeneralIOC.PortE7;
  SCK = HplAtm128GeneralIOC.PortC3;
//  DATA = DATAM;
//  SCK = SCKM;

  components HplSensirionSht11P;
  HplSensirionSht11P.PWR -> HplAtm128GeneralIOC.PortC0;
  HplSensirionSht11P.DATA -> HplAtm128GeneralIOC.PortE7;
  HplSensirionSht11P.SCK -> HplAtm128GeneralIOC.PortC3;
...

Can someone help me check if I got the connections right? I revised these
codes from the application that uses Msp430 (telos) instead Atm128 (micaz)

Thank you in advance for those who will help.

Mark Patrick Cabrera
_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to