fort test av mbed cli

Fork of Alarmsystem_rev_innlevering by Programmeringsgruppe 1

Committer:
andreped
Date:
Thu Jan 25 08:59:55 2018 +0000
Revision:
0:33bf28fd1ac6
Child:
1:6917ec4f5e6d
000

Who changed what in which revision?

UserRevisionLine numberNew contents of line
andreped 0:33bf28fd1ac6 1 #include "mbed.h"
andreped 0:33bf28fd1ac6 2
andreped 0:33bf28fd1ac6 3 #define ON 1
andreped 0:33bf28fd1ac6 4 #define OFF 0
andreped 0:33bf28fd1ac6 5 #define AlarmSone1 1
andreped 0:33bf28fd1ac6 6 #define AlarmSone2 2
andreped 0:33bf28fd1ac6 7 #define AlarmSone3 4
andreped 0:33bf28fd1ac6 8 #define AlarmSone4 8
andreped 0:33bf28fd1ac6 9
andreped 0:33bf28fd1ac6 10 DigitalOut Driftslys(LED1);
andreped 0:33bf28fd1ac6 11 BusOut Alarm(p21, p22, p23, p24);
andreped 0:33bf28fd1ac6 12 DigitalIn Servicebryter(p20);
andreped 0:33bf28fd1ac6 13 DigitalIn Sone1(p15);
andreped 0:33bf28fd1ac6 14 DigitalIn Sone2(p16);
andreped 0:33bf28fd1ac6 15 DigitalIn Sone3(p17);
andreped 0:33bf28fd1ac6 16 DigitalIn Sone4(p19);
andreped 0:33bf28fd1ac6 17
andreped 0:33bf28fd1ac6 18 Ticker AlarmBlink;
andreped 0:33bf28fd1ac6 19
andreped 0:33bf28fd1ac6 20
andreped 0:33bf28fd1ac6 21 int main() {
andreped 0:33bf28fd1ac6 22 while(1) {
andreped 0:33bf28fd1ac6 23 Driftslys = 1;
andreped 0:33bf28fd1ac6 24
andreped 0:33bf28fd1ac6 25 wait(0.2);
andreped 0:33bf28fd1ac6 26 myled = 0;
andreped 0:33bf28fd1ac6 27 wait(0.2);
andreped 0:33bf28fd1ac6 28 }
andreped 0:33bf28fd1ac6 29 }