Discussion:
I2C
Suguna Subramanian
2008-07-29 07:47:47 UTC
Permalink
Hello,
I want to establish the I2C Communication between a sensor and the btnode.From the BTSENSE CODE i could not get the proper information.
It would be great if you could give me some details about it.

TwMasterTransact(BTSENSE_I2C_TC74, &tw_cmd, 1, &t, 1, 1000)


I have the BTSENSE_I2C_TC74 address as 0x32 //slave address of my sensor
I have tw_cmd as 2 bytes lone //cmd is 2 bytes long

u_char tw_cmd[2];
tw_cmd[0]=0x00;
tw_cmd[1]=0x05;

Then i want to use the piece of btsense.c

TwMasterTransact(BTSENSE_I2C_TC74, &tw_cmd, 1, &t, 1, 1000)

it always returns -1.

Note that i have preformed btsense_init already.

Could you help me to solve this.

Regards,

Suguna



Unlimited freedom, unlimited storage. Get it now, on http://help.yahoo.com/l/in/yahoo/mail/yahoomail/tools/tools-08.html/
Loading...