![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
.
Dependencies: RTC-DS1307 Servo mbed
Fork of Progetto_Tandem_Finale by
Revision 3:7634bf23197f, committed 2016-04-19
- Comitter:
- Karrots3
- Date:
- Tue Apr 19 10:40:34 2016 +0000
- Parent:
- 2:e67f3b884a1c
- Commit message:
- .
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
diff -r e67f3b884a1c -r 7634bf23197f main.cpp --- a/main.cpp Mon Apr 18 21:52:45 2016 +0000 +++ b/main.cpp Tue Apr 19 10:40:34 2016 +0000 @@ -37,7 +37,7 @@ flag=0; ledG=1; suono(NOTE_B4,8); - wait_ms(1); + wait(0.1); do { flag=0; wait_ms(1); @@ -50,9 +50,9 @@ } else if(bottone) flag=2; } while(flag==0); ledR=0; - if(flag==3) { + if(flag==2) { movimento_servi(); - } + }else if(flag==1){seriale(time);} } @@ -125,11 +125,13 @@ void seriale(Rtc_Ds1307::Time_rtc time) { int s; + do{ pc.printf("**********************************\n"); - pc.printf("* Menu : *\n"); + pc.printf("* Menu : *\n"); pc.printf("* 1 - imposta ora orologio *\n"); - pc.printf("* 2 - imposta ora pastiglia *\n"); - pc.printf("* 3 - mostra settaggi *\n"); + pc.printf("* 2 - imposta ora pastiglia *\n"); + pc.printf("* 3 - mostra settaggi *\n"); + pc.printf("* 4 - esci *\n"); pc.scanf("%d", &s); switch(s) { case 1: @@ -153,5 +155,7 @@ case 3: pc.printf("Ora sono le : %02d:%02d:%02d del %02d/%02d/%04d \n", time.hour, time.min, time.sec, time.mon, time.date, time.year); break; + case 4: pc.printf("Uscita");break; } + }while(s!=4); }