Reading I2C from timer interupts

gr82morozr
Posts: 1
Joined: Sun Aug 12, 2018 1:33 am

Reading I2C from timer interupts

Postby gr82morozr » Sun Aug 12, 2018 1:47 am

Hi All, I am new to ESP32 world, and now working on my first project.

I am trying to read MPU6050 inside a timer interrupt, but always get 0 values. But without using timer interupts, it works fine.

Can anyone please adise what do I miss here ? Much appreciated.
test_i2c_timer.txt
(1.7 KiB) Downloaded 885 times

pipi61
Posts: 60
Joined: Fri Dec 23, 2016 10:58 pm

Re: Reading I2C from timer interupts

Postby pipi61 » Mon Aug 13, 2018 10:58 am

in interrupt set the flag variable, and main loop check this flag and read i2c and clear the flag

Who is online

Users browsing this forum: No registered users and 58 guests