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

Public Finance

Authors: Harvey S. Rosen

5th Edition

025617329X, 978-0256173291

Students also viewed these Databases questions