![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
Fengrui Zuo, Benjamin Leverett, Rahil Ajani, Kombundit Chitranuwatkul
Dependencies: mbed mbed-rtos 4DGL-uLCD-SE SDFileSystem ATParser
Diff: main.cpp
- Revision:
- 5:1fe352831712
- Parent:
- 4:57e7983c861c
- Child:
- 6:8a29a9680023
--- a/main.cpp Mon Apr 27 21:04:46 2020 +0000 +++ b/main.cpp Wed Apr 29 03:09:00 2020 +0000 @@ -99,25 +99,30 @@ { while(1) { if(risk_level == 2 && datalogged) { - speaker_on = 1; - for (int i=0; i<10; i=i+2) { + for (int i=0; i<5; i=i+2) { speaker.period(1.0/969.0); speaker = float(i)/50.0; wait(.8); speaker.period(1.0/800.0); wait(.8); } + speaker = 0; } else if(risk_level == 3 && datalogged) { - speaker_on = 1; - for (int i=0; i<26; i=i+2) { + for (int i=0; i<5; i=i+2) { speaker.period(1.0/969.0); speaker = float(i)/50.0; wait(.25); speaker.period(1.0/800.0); wait(.25); } - } else { - speaker_on = 0; + speaker = 0; + } else if(risk_level <= 1 && datalogged){ + for (int i=0; i<5; i=i+2) { + speaker.period(0); + speaker = 0; + } + } else{ + speaker = 0; } } }