Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Mr. Ndugu is using a HC-SR505 PIR motion sensor module in a lab project. ) Please suggest Mr. Ndugu a proper way to connect this

Mr. Ndugu is using a HC-SR505 PIR motion sensor module in a lab project. ) Please suggest Mr. Ndugu a proper way to connect this sensor to the Open1768 development board (i.e. to which pins, etc) and to configure the selected pins! (4 points). Let us assume that Mr. Ndugu wants to detect a rising edge of a signal generated by the sensor over the pin P2.7 (Pin 7 of Port2). For this purpose, he has written the following C code lines: //waiting for the falling edge

while (((LPC_GPIO2->FIOPIN) & 0*0080) ==1);

//all 4 LED ON if falling edge detected

LPC_GPIO2->FIOCLR=0*0F; //LED ON

Unfortunately, these code lines do not deliver the expected behavior. Please help Mr Ndugu to find and correct the error(s)! (6 points)Please change the C Code lines given above in such a way that LED0 and LED3 on the Open1768 development board are switched ON while LED1 and LED2 are switched OFF if a rising edge has been detected on pin P2.7. (5 points)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Not For Profit Entities Audit And Accounting Guide

Authors: AICPA

1st Edition

1937351971, 978-1937351977

More Books

Students also viewed these Accounting questions