Jump to content
I2Cdevlib Forums

MPU-6050 and programmable xbee


Recommended Posts

hi everyone, i trying to read data from the accelerometer of this sensor conneted to an an xbee XB24CZ7PISB003 programmable .
i found this function http://exsilium.github.io/xbee-sdk-doc/ ... __i2c.html but i don't am sure about if i can use one sensor with i2c protocol on my xbee..
this, because in the datasheet i have no found anything about i2c protocol but only about uart and spi..

 

i try to write on codewarrior the sample api i found, in this way : 

 

 
i2c_config(0);
i2c_set_addr(0x68);
rtc_set_timeout(HZ *2);
for (;;) {
now = rtc_get_uptime();
if (rtc_timeout_expired() ) {
 
n=i2c_read(txbuf, 16);
printf("bytes read  %d -",n);
printf("reading  : %s\n\n", txbuf);
rtc_set_timeout(HZ *5);
}
 

i have connect the sda to pin 8 , the scl to pin 32, like codewarrior says. and grn and vcc to 3.3V

where i am wrong? is it 0x68 correct? and some resistors? 

thanks a lot!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...