Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

PIR motion sensor on the ARM MBED this is the code now. with an interrupt in and fall edge. I'm not sure how to implement

PIR motion sensor on the ARM MBED

this is the code now. with an interrupt in and fall edge. I'm not sure how to implement the Lcd screen as when I put it into it it doesn't seem to work? how do I get it so where the alarm is triggered and its a falling edge, a message will appear on the screen?

thanks George

#include "mbed.h" #include "C12832.h" //example using InterruptIn with the input from the PIR motion sensors InterruptIn alarm(p11); DigitalOut led(LED1); DigitalOut flash(LED4); C12832 lcd(p5, p7, p6, p8, p11); void flip() { led = !led; } int main() { alarm.mode(PullUp); wait(2); alarm.fall(&flip); // attach the address of the flip function to the falling edge while(1) { // wait around, interrupts will interrupt flash = !flash; wait(0.25); } }

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

Step: 3

blur-text-image

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

Concepts of Database Management

Authors: Philip J. Pratt, Joseph J. Adamski

7th edition

978-1111825911, 1111825912, 978-1133684374, 1133684378, 978-111182591

More Books

Students also viewed these Databases questions

Question

What did it want Mark Lewis to say?

Answered: 1 week ago