mpu 6050 problem for atmega 8
disha
Posts: 3
i have interfaced a mpu 6050 to my atmega 8 & have written a code using i2c header file.
the code is to see whether the device is accessible or not. and the function used is:
return 0 = device accessible, 1= failed to access device
then i am printing the value got on lcd
ex:
so ret should either print 0 or 1.
but lcd remains blank (there is no print at all).
i have tested the lcd (it's working all fine with other programs).
I am unable to figure out what is the exact problem..:-(
the code is to see whether the device is accessible or not. and the function used is:
unsigned char i2c_start(unsigned char address)Issues a start condition and sends address and transfer direction.
return 0 = device accessible, 1= failed to access device
then i am printing the value got on lcd
ex:
#define Dev24C02 0X68 //sensor address ret=i2c_start(Dev24C02); //sending device address lcd_showvalue(ret);
so ret should either print 0 or 1.
but lcd remains blank (there is no print at all).
i have tested the lcd (it's working all fine with other programs).
I am unable to figure out what is the exact problem..:-(
Comments
If so, maybe this would work.
I'm not sure if that's proper C lingo or not, but my intention is to change the numeric 0 or 1 to the character "0" or "1".
Yup. That would work fine.