Hi,
I am trying to read from two serial TMP175 I2C sensors, using only one
Resource interface, on Telosb.
I have two instances of a generic module, each one with a Read interface:
generic configuration I2CAppC(uint16_t devAddr){
provides interface Read<uint16_t> as Temperature;
}
implementation
{
components MainC;
components new HplTMP175LogicP(devAddr) as I2Csensor;
I2Csensor.Boot -> MainC;
components
new Msp430I2CC() as I2CResource;
I2Csensor.Resource -> I2CResource;
I2Csensor.I2CBasicAddr-> I2CResource;
Temperature = I2Csensor;
}
generic module HplTMP175LogicP(uint16_t devAdd)
{
uses interface Boot;
uses interface I2CPacket<TI2CBasicAddr> as I2CBasicAddr;
uses interface Resource;
provides interface Read<uint16_t> as Temperature;
}
In my app I have:
new I2CAppC(TMP175_SLAVE_ADDR_1) as TmpSensor1,
new I2CAppC(TMP175_SLAVE_ADDR_4) as TmpSensor2,
MyAppP.TmpTemperature1 -> TmpSensor1.Temperature;
MyAppP.TmpTemperature2 -> TmpSensor2.Temperature;
Reading from only one sensor is OK but the readDone comes always from the
same interface.
When I read from TmpTemperature1 and then from TmpTemperature2 I always have
a readDone from TmpSensor1, despite I passed different devAddr parameters.
I think that this comes from de arbiter, but until now I could not fix this
problem.
Any clue of what is wrong?
Thanks you very much,
Pablo
_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help