Motion in mpu6050

hello , i want to ask about mpu6050 motion code ,if there is any motion i want to make the light off ........and if there is no motion i want the mpu 6050 to read 5 time after it to make sure that there is no motion and after that turn on the light ,,,,

and if there are any motion during this 5 read to back from begin or to the motion part

i use the code of the mpu6050 example

@ahmadasfan
The installation and troubleshooting section is not for your project it is getting the overall system working. As this is clearly about a project you want to do I have moved the post here. Please be more careful where you post in future.

So post it. You need a much better description of what your code does at the moment.

Normally a pir detector is used for movement.

Yes but only of people. So it will trigger when the sensor sees moving people (or other source of IR), or the sensor is moved in front of moving or still people.

Pir will detect heat source changes.
Trees etc in range can trigger pir sensors, also motor vehicles, anything that changes a heat source across the zones of the pir lens.

I did say

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.