Hi,
I'm writing an app to write to and read from an array of srf08 device (UltraSound board) connected to a mica2, but I'm unable to understand how to fill the param of the functions. I've been able to compile the app with all the modules, but I can't be able to read or write.
To start the SRF08 ranging I would want to write 0x51 to the command register at 0x00 like this: 1. Send a start sequence 2. Send 0xE0 ( I2C address of the SRF08 with the R/W bit low (even address)) 3. Send 0x00 (Internal address of the command register) 4. Send 0x51 (The command to start the SRF08 ranging) 5. Send the stop sequence.
The I2CPacket writePacket interface is: writePacket(char length, char* data, char flags);
Is char i2c_data[2]={0x00, 0x51}; ok?
My problem is that I have tried several flag options with no success.Any other example or code would be a good help, since I can't find any examples.
Thank You, Rafael Aranha
_______________________________________________ Tinyos-users mailing list [email protected] http://mail.Millennium.Berkeley.EDU/mailman/listinfo/tinyos-users
