a
I want the PIR motion sensor to start sending data from the flow sensor and temperature sensor to the Pi when motion is detected (and reseting the timer).
What do you suppose the odds are that the PIR motion sensor can actually get data from the flow sensor and the temperature sensor? What do you suppose the odds are that the PIR motion sensor can actually send data to the Pi?
Somewhere between "not a snowball's chance in hell" and none would be my guess.
When there is no "No motion",the Arduino will starts a timer and in the mean time, the PIR will stay active.
No, the PIR will stay HIGH if there is motion and will go LOW when there is no motion. It is up to the Arduino to detect when the transition from LOW to HIGH or HIGH to LOW happens, and to do something a fixed amount of time after the last appropriate transition.
What did you need help with? Your post looks like a progress report to your teacher.
I haven't looked at your code in detail but it seems awfully complicated for something simple
if PIR detected
read sensors
send to PI
Have you looked at this Thread about program planning.
...R
itstudent:
a
It was very unsociable to delete your post and the title. Even if you got no value from it others might.
...R
a
If you do that again you will be banned from the forum, so that will be the last piece of help you ever get. It is rude.