Hi Mark,

Work with the latest version from of tinyos-2.x from the CVS.
Interfaces have been changed since tinyos-2.1.0

Best,
Miklos

On Fri, Mar 19, 2010 at 11:14 AM, Mark Patrick Cabrera
<[email protected]> wrote:
> Hi Miklos,
>
> I use the SHT11 driver you gave from this link:
> http://szte-wsn.cvs.sourceforge.net/viewvc/szte-wsn/tinyos/tos/lib/Mts400/
> and tried to compile my application but I got the following errors:
>
> In interface `I2CPacket':
> /opt/tinyos-2.1.0/tos/interfaces/I2CPacket.nc:63: syntax error before
> `flags'
> /opt/tinyos-2.1.0/tos/interfaces/I2CPacket.nc:79: syntax error before
> `flags'
> In component `Adg715ControlC':
> Adg715ControlC.nc:55: syntax error before `TI2CBasicAddr'
> Adg715ControlC.nc:71: cannot find `I2CPacket'
> ...
> In component `Atm128I2CMasterPacketP':
> /opt/tinyos-2.1.0/tos/chips/atm128/i2c/Atm128I2CMasterPacketP.nc:128:
> conflicting types for `I2CPacket.read'
> /opt/tinyos-2.1.0/tos/interfaces/I2CPacket.nc(Atm128I2CMasterPacketP):63:
> previous declaration of `I2CPacket.read'
> /opt/tinyos-2.1.0/tos/chips/atm128/i2c/Atm128I2CMasterPacketP.nc:179:
> conflicting types for `I2CPacket.write'
> /opt/tinyos-2.1.0/tos/interfaces/I2CPacket.nc(Atm128I2CMasterPacketP):79:
> previous declaration of `I2CPacket.write'
> In component `HplAdg715C':
> HplAdg715C.nc:65: cannot find `I2CPacket'
> In component `HalSensirionSht11C':
> HalSensirionSht11C.nc:55: no match
> make: *** [exe0] Error 1
>
> I don't understand why I got this error in the I2CPacket interface. Help!
>
> Patrick
>
>
> On Fri, Mar 19, 2010 at 4:21 PM, Miklos Maroti <[email protected]>
> wrote:
>>
>> Hi Mark,
>>
>> They work for iris so I guess it works for the micaz (which is
>> essentially the same except for the radio).
>>
>> Miklos
>>
>> On Fri, Mar 19, 2010 at 6:16 AM, Mark Patrick Cabrera
>> <[email protected]> wrote:
>> > Hi Miklos,
>> >
>> > I checked the files that you linked but I guess these are for the telosb
>> > platform. Can I use it in micaz?
>> >
>> > Patrick
>> >
>> > On Sun, Mar 14, 2010 at 4:44 AM, Miklos Maroti
>> > <[email protected]>
>> > wrote:
>> >>
>> >> Hi!
>> >>
>> >> You might want to look at the SHT11 driver for the MTS400 on the
>> >> tinyos-2.x tree here:
>> >>
>> >>
>> >> http://szte-wsn.cvs.sourceforge.net/viewvc/szte-wsn/tinyos/tos/lib/Mts400/
>> >>
>> >> Best,
>> >> Miklos
>> >>
>> >> On Sat, Mar 13, 2010 at 9:25 PM, Michael Schippling <[email protected]>
>> >> wrote:
>> >> > If those are the pins that work with the MTS400,
>> >> > once you've found the right definitions thereof,
>> >> > they should work with your board. The schematic
>> >> > you ref'd wasn't there for me so I can't check.
>> >> >
>> >> > It's looking a bit like this is an I2C interface,
>> >> > in which case I'd closely check the impl code.
>> >> > The I2C for the iris is implemented in software
>> >> > on a fairly advisory level, e.g. it doesn't deal
>> >> > with wait states. I haven't used it anywhere else.
>> >> >
>> >> > MS
>> >> >
>> >> > Mark Patrick Cabrera wrote:
>> >> >> Thank you for your reply.
>> >> >> In any case, here is my problem. I am trying to make a revised
>> >> >> sensorboard that will run on a micaz mote. I have "wired" the SHT11
>> >> >> pins
>> >> >> based on the HplSensirionSht11C but the sensor seems not to work
>> >> >> properly. So I tried to debug by retracing the "wiring" of the
>> >> >> MTS400
>> >> >> sensorboard.
>> >> >>
>> >> >> So if I assume that PortE7 is the correct connection for the SHT11
>> >> >> DATA
>> >> >> pin (i.e., DATA = HplAtm128GeneralIOC.PortE7), where should I
>> >> >> connect
>> >> >> the SCK and the PWR pins so as to interface an SHT11 sensor without
>> >> >> using an MTS400 sensorboard?
>> >> >>
>> >> >> Patrick
>> >> >>
>> >> >> On Sat, Mar 13, 2010 at 2:25 AM, Michael Schippling
>> >> >> <[email protected]
>> >> >> <mailto:[email protected]>> wrote:
>> >> >>
>> >> >>     Rather than believing the comments, which are such a rarity
>> >> >>     in the grad-student code base, one should look for where the
>> >> >>     pin is actually defined...which seems to be wrong anyway...
>> >> >>     at least in my T1 tree,
>> >> >>        platform/mica/hardware.h says INT3==D3
>> >> >>     but
>> >> >>        platform/mica2/hardware.h says INT3==E7
>> >> >>
>> >> >>     I'm not sure what platform you are on but I'd bet E7 is the
>> >> >> right
>> >> >>     pin connection, even if it is the wrong name. There's no
>> >> >> explanation
>> >> >>     for why "they" renamed the pin. If you  look at the ATMEGA
>> >> >> manual,
>> >> >>     the official INT3 is in fact D3, and E7 is INT7...
>> >> >>
>> >> >>     MS
>> >> >>
>> >> >>     Mark Patrick Cabrera wrote:
>> >> >>
>> >> >>         I retraced the "wiring" of the SHT11 of the MTS400
>> >> >> sensorboard
>> >> >>         and found this in ~/xbow/tos/sensorboards/mts400:
>> >> >>         #define HUMIDITY_SET_CLOCK()        TOSH_SET_PW3_PIN()   //
>> >> >>         sbi(PORTC, 3)
>> >> >>         #define HUMIDITY_CLEAR_CLOCK()        TOSH_CLR_PW3_PIN() //
>> >> >>         cbi(PORTC, 3)
>> >> >>         #define HUMIDITY_SET_DATA()        TOSH_SET_INT3_PIN()   //
>> >> >>         sbi(PORTD, 3)
>> >> >>         #define HUMIDITY_CLEAR_DATA()        TOSH_CLR_INT3_PIN() //
>> >> >>         cbi(PORTD, 3)
>> >> >>         #define HUMIDITY_MAKE_DATA_OUTPUT()
>> >> >>  TOSH_MAKE_INT3_OUTPUT()
>> >> >>         // sbi(DDRD, 3)
>> >> >>         #define HUMIDITY_MAKE_DATA_INPUT()    TOSH_MAKE_INT3_INPUT()
>> >> >>         //cbi(DDRD, 3)
>> >> >>
>> >> >>         Does this mean that the DATA pin of the SHT11 is connected
>> >> >> in
>> >> >>         _PortD3_ and the SCK to PortC3?
>> >> >>
>> >> >>         If the answer is yes, why does the schematic diagram of the
>> >> >>         MTS400
>> >> >> <www.xbow.com/support/.../MTS-MDA_Series_Users_Manual.pdf
>> >> >>
>> >> >> <http://www.xbow.com/support/.../MTS-MDA_Series_Users_Manual.pdf>
>> >> >>
>> >> >> <http://www.xbow.com/support/.../MTS-MDA_Series_Users_Manual.pdf>>
>> >> >>         shows that the DATA pin of SHT11 is connected to INT3
>> >> >> (_PortE7
>> >> >>         of the Atm128L_)?
>> >> >>
>> >> >>
>> >> >>         Can someone clarify to me this thing?
>> >> >>
>> >> >>         On Wed, Mar 10, 2010 at 5:22 PM, Mark Patrick Cabrera
>> >> >>         <[email protected] <mailto:[email protected]>
>> >> >>         <mailto:[email protected]
>> >> >> <mailto:[email protected]>>>
>> >> >>         wrote:
>> >> >>
>> >> >>            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
>> >> >>
>> >> >>
>> >> >>         Patrick
>> >> >>
>> >> >>
>> >> >>
>> >> >>
>> >> >> ------------------------------------------------------------------------
>> >> >>
>> >> >>         _______________________________________________
>> >> >>         Tinyos-help mailing list
>> >> >>         [email protected]
>> >> >>         <mailto:[email protected]>
>> >> >>
>> >> >>
>> >> >> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
>> >> >>
>> >> > _______________________________________________
>> >> > Tinyos-help mailing list
>> >> > [email protected]
>> >> >
>> >> > https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
>> >> >
>> >
>> >
>

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

Reply via email to