2 years ago

#73753

test-img

Oluwatoni Bodunrin

can data from a sensor be read in a function

I am using the icm 20948 sensor, programming on MPLABx running harmonyV3.i2c is communication mode. Can I read and write in a function, does it have to be in a while loop?

For example would:

while(SERCOM1_I2C_IsBusy()) {}
SERCOM1_I2C_Write(ICM20948_ADDRESS,&FAccrangefactor, 1);

function properly in a function. Many thanks

sensors

i2c

pic32

mplab-x

0 Answers

Your Answer

Accepted video resources