Reading I2C from timer interupts

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.
(1.7 KiB) Downloaded 161 times

Posts: 6
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

Return to “ESP32 Arduino”

Who is online

Users browsing this forum: No registered users and 4 guests