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!