Hi, I am looking for any library on this digital sensor and trying to write a code for it. I am simply trying to illuminate an LED (there will be multiple) when the sensor detects movement.
I do not wish to use pin #13. I am using Arduino MEGA 2560.
Any help on this is greatly appreciated!
That sensor can only see up to 2inches away.
What do you mean by library? From the spec sheet is “Output type: digital signal (low when detecting an object, high otherwise)”
So looks like you just need a digitalRead(whatever pin) to tell if it is triggered.
Thanks Slumpert. I thought the library had to be more specific in what sensor you are using. Thanks for the help!