Write a program that uses infrared remote and an infrared sensor to control a motion sensor and a piezo as follows: • If
-
answerhappygod
- Site Admin
- Posts: 899604
- Joined: Mon Aug 02, 2021 8:13 am
Write a program that uses infrared remote and an infrared sensor to control a motion sensor and a piezo as follows: • If
Write a program that uses infrared remote and an infrared sensor to control a motion sensor and a piezo as follows: • If the user presses the IR remote play/pause button (>1) for the first time then the motion sensor will start working to detect any motion. The program should display either ”motion detected” or “no motion” in the serial monitor. If there is motion the piezo should beep; otherwise it should be off. • If the user presses the IR remote play/pause button for the second time then the motion sensor should stop working. • Pressing the play/pause for the third time will make the motion sensor work again; pressing it for the fourth time will make it stop again, and so on.
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!