Microcontroller › AVR › imu sensor mpu 6050 help › ok i will do thatbut if you
ok i will do that
but if you see in the pleury library that is what i am using i will post their function here:
*************************************************************************
Issues a start condition and sends address and transfer direction.
return 0 = device accessible, 1= failed to access device
*************************************************************************/
unsigned char i2c_start(unsigned char address)
{
////
////code
}/******************************************//////////////////////////////
as you can see i have written:
ret=i2c_start(mpu); // then ret should return 1 or 0 (unsigned char value)
And the lcd function i am using :
in header file it is given like this:
void lcd_showvalue(unsigned char num)
{
//code
}
that means “”num”” here is ret must be a unsigned char value. So there is no mistake in the code what i have written earlier right?
but, i will try what you have said & let u know soon the results.