Quantcast
Channel: Forums - Recent Threads
Viewing all articles
Browse latest Browse all 262198

CCS/CC2640R2F: Trying to get accel value from mpu6050 with i2c example

$
0
0

Part Number:CC2640R2F

Tool/software: Code Composer Studio

Hi again.

I'm trying to use mpu6050 with cc2640 launchpad.

I started i2c with tidriver example i2ctmp007 and trying editing the example a little bit.

Here's a part of code

/* Turn on user LED */
GPIO_write(Board_GPIO_LED0, Board_GPIO_LED_ON);
printf("Starting the i2ctmp007 example\n");

/* Create I2C for usage */
I2C_Params_init(&i2cParams);
i2cParams.bitRate = I2C_400kHz;
i2c = I2C_open(Board_I2C_TMP, &i2cParams);
if (i2c == NULL) {
printf("Error Initializing I2C\n");
while (1);
}
else {
printf("I2C Initialized!\n");
printf("let's go!");
}

I'm using printf to check where error occurs, and there's strange thing happening.

Console print "I2C Initialized!" but not "let's go!".

I have no idea what the problem is.

Anybody knows..?

Thank you!


Viewing all articles
Browse latest Browse all 262198

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>