Hi! Anyone have any idea of how to program an arduino uno board with a MP motion sensor connected to it, so that it will display something on the LCD display when motion is detected.
Thank you very much.
Not sure what motion sensor you have, guessing it works on 5V. When motion is detected, output of the sensor goes high. Connect the output of the sensor to a digital pin and start from there. Refer examples Button & Hello World!
Thank you! But can you tell me more about the examples at buttons and hello word? Sorry it's kind of urgent. Glad that you can help. ![]()
Anyw im using a MP slight motion sensor, a small one. ya and it work with 5v.
Ok. Go through this link http://arduino.cc/en/Tutorial/Button.
Replace switch with your motion sensor in the above example. i.e., connect arudino +5V to your sensor +5V and arduino GND to your sensor GND. Connect you output of your sensor to digital pin 2. Upload the same code. When motion is detected by your sensor, LED on the on your arduino(on pin 13) goes high. (Also refer the datasheet of the sensor, if there is a need for pull-up/down resistor)
Once you achieve this, second step is add LCD and add the hello world code.. You need to do some modifications to the code as per your requirement. Also you need to move the output of your motion sensor to some other unused pin and modify the code accordingly.