Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed
Diff: main.cpp
- Revision:
- 0:549a6a40f7d8
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp Wed Jan 28 08:33:20 2015 +0000
@@ -0,0 +1,67 @@
+#include "mbed.h"
+
+BusOut ALARM14(LED1,LED2,LED3,LED4);
+BusOut ALARM58(p21, p22, p23, p24);
+DigitalOut NORMAL(p25);
+AnalogIn SONE12(p17), SONE34(p18), SONE56(p19), SONE78(p20);
+DigitalOut BRYTER(p15); //=Innelåst servicebryter.
+
+void alarmTest (void)
+{
+
+ if(v == 4.19)
+ {
+ ALARM14 = 1;
+ ALARM58 = 1; //Spenning A+B
+ }
+ if(v == 6.765)
+ {
+ ALARM14 = 1;
+ ALARM58 = 0;
+ }
+ if(v == 5.478)
+ {
+ ALARM14 = 0;
+ ALARM58 = 1;
+ }
+ else
+
+ ALARM14 = 0;
+ ALARM58 = 0;
+}
+
+
+int main()
+{
+ float v;
+
+ while(1)
+ {
+ alarmTest
+
+ if(SONE12 >= 3.63 && SONE12 <= 6.93)
+ {
+ if (ALARRM14 & 1 == 0)
+ ALARM14 += 1;
+ }
+ if(SONE34 >= 3.63 && SONE34 <= 6.93)
+ {
+ if (ALARM14 & 2 == 0)
+ ALARM14 += 1;
+ }
+ if(SONE56 >= 3.63 && SONE56 <= 6.93)
+ {
+ if(ALARM58 & ? == 0)
+ ALARM58 += 1;
+ }
+ if(SONE58 >= 3.63 && SONE58 <= 6.93)
+ {
+ if(ALARM58 & ? == 0
+ ALARM58 += 1;
+ }
+ }
+}
+
+
+
+
\ No newline at end of file