Mr. Ndugu is using a HC-SR505 PIR motion sensor module in a lab project. Please suggest...

70.2K

Verified Solution

Question

Electrical Engineering

Mr. Ndugu is using a HC-SR505 PIR motion sensor module in a labproject. Please suggest Mr. Ndugu a proper way to connect thissensor to the Open1768 development board (i.e. to which pins, etc…) and to configure the selected pins! (4 points) Write a c codeand let us assume that Mr. Ndugu wants to detect a rising edge of asignal generated by the sensor over the pin P2.7 (Pin 7 of Port2)(6points). later change the c code lines in such a way tat the LED0&LED1 on the Open 1768 development board are switched ON whileLED1 and LED2 are switched OFF if a rising edge is detected on pinP2.7(5points)

Answer & Explanation Solved by verified expert
3.6 Ratings (469 Votes)
aThis is the code to detect a rising edge of a signal generated by the sensor over the Pin27 define pirPin 2 define ledPin 13 Create variables int val 0 bool motionState    See Answer
Get Answers to Unlimited Questions

Join us to gain access to millions of questions and expert answers. Enjoy exclusive benefits tailored just for you!

Membership Benefits:
  • Unlimited Question Access with detailed Answers
  • Zin AI - 3 Million Words
  • 10 Dall-E 3 Images
  • 20 Plot Generations
  • Conversation with Dialogue Memory
  • No Ads, Ever!
  • Access to Our Best AI Platform: Flex AI - Your personal assistant for all your inquiries!
Become a Member

Other questions asked by students