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.
Fork of prosjektoppgave_alarm by
Diff: main.cpp
- Revision:
- 15:549d573fcad7
- Parent:
- 14:4020d8bdb6a6
- Child:
- 16:1002c358d299
--- a/main.cpp Wed Jan 25 12:17:20 2017 +0000
+++ b/main.cpp Tue Jan 31 08:46:30 2017 +0000
@@ -169,3 +169,32 @@
pc.printf(" | Alarm Status: %d\r\n",status);
}
}
+
+int terminal()
+{
+ int i = 0;
+ char x[20];
+ for(i; i <= 3; i++)
+ {
+ int j = 3;
+ pc.printf("skriv inn passord\n");
+ x = pc.gets();
+ if(x == passord){
+ break;
+ }
+ else{
+ j -= i;
+ pc.printf("feil passord, %i forsok igjen\n", j);
+ if(j > 0){
+ continue;
+ }
+ else{
+ pc.printf("For mange forsok\n");
+ wait(20);
+ i = 0;
+ }
+ }
+ return 1;
+
+ }
+
\ No newline at end of file
