Question: 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
To display a message on the LCD screen when the alarm is triggered by a falling edge you need to incorporate the LCD display functionalities inside th... View full answer
Get step-by-step solutions from verified subject matter experts
