10 years, 6 months ago.  This question has been closed. Reason: answered

alarmsystem

Hi! I have a school project on an alarmsystem. Programming is not my strongest subject to say the least especially when it comes to mbed. Need help with codes for a led to light when an alarm is activated. The alarm is activated when the electric current changes in the specific area. Also it should be able to detect and activate several alarms (up to four, for the four zones). Also the alarm should be able to reset by a switch. The led should light under normal circumstances and blink with 10Hz when breached (alarm goes off). I apologize for a vage description. I appreciate all help and can give more details and information if needed.

  1. include "mbed."

Serial pc(USBTX, USBRX); tx, rx LocalFileSystem local ("local");

AnalogIn zone1,zone2,zone3,zone4(p17,p18,p19,p20); DigitalIn reset (p16); DigitalOut (p21,p22,p23,p24,p25,p26,p27,p28);

timer t1;

void alarm1(); void alarm2(); void alarm3(); void alarm4(); void reset();

void keyboard() To contol the system from a keyboard

void alarm1(); {

if (zone1 ==...........