Using 2 sensor passive infra red

sorry i'm still learning i have a test case

  1. if the first PIR sensor detects motion it will display a car image
  2. if the second PIR sensor detects motion it will display a motor image
  3. If PIR sensors 1 and 2 simultaneously detect motion, it will display a computer image and save it to the database
  4. if there is no PIR 1 or PIR 2 movement it will appear "please move on PIR 1 or PIR 2 simultaneously"

I've searched the internet but haven't found any results, please help

Of course you won't find results to match your very specific requirements- it's very very unlikely that someone wrote code for exactly your test case and then published it in case
someone else wanted to do the exact same thing.

So why don't you post your work so far.... then someone may be able to help, unless of course you want someone to write a turnkey solution which is a different thing altogether.

maybe anyone can help me

Of course someone will be able to help, but you need to say what help you need and it will help folk help you if you show what you did already.

I thought @silvershovel just did?

If you want someone to do it for you I can move your post to the payed work section of the forum where someone might be willing to do it for you in exchange for money.

Have you, for example, got one PIR sensor hooked up to an Arduino and giving a message on the serial monitor when it detects movement? If not, I'd suggest trying to do that- you have to start somewhere!

And also since you need to display images, do you have the hardware that has a graphical display and have you got that working by itself just to display "something"?

I've copied the code from various sources but mostly use 1 PIR sensor

test case like this

  1. if the first PIR sensor detects motion then the GUI will show the car image
  2. if the second PIR sensor detects motion then the GUI will display a motor image
  3. If PIR sensors 1 and 2 simultaneously detect motion, the GUI will display a computer image and save it to the database
  4. if there is no movement of PIR 1 and PIR 2 then the GUI appears "please do the movement on PIR 1 and PIR 2 simultaneously

I'm having trouble programming it

I'll ask again....

yeah i have

Cool... and have you done that for two?

And have you got the graphic screen working at all?

And...

.... and explain what's working / not working?

I have tried to write code and compile it but only one sensor is working

And again....

because I haven't done any work yet

so can you help me ?

Sure.

But asking for help usually means the helpee presents some work first, and then helpers try to advise.

According to what you said earlier in response to my question about having one pir working successfully:

... why don't you as a start try to sort of "double up" the code you have, for another sensor. That would involve a little thought of course, to make sure you change the pin numbers and other variables for the second one.

But as I said earlier, if you want a turnkey solution that will be a different discussion.

This is my first project and I find it difficult to modify the coding, and I was given an assignment by a friend

I don't really understand Arduino

Then before diving into a specific project, you should work through the examples in the IDE.

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