The final project of Embedde class.
Dependencies: C12832 LM75B ESP-call MMA7660
BELL.cpp
00001 #include "BELL.h" 00002 00003 Timer alarmDuration; 00004 00005 void bellSingleAlert(int duration) 00006 { 00007 alarmDuration.reset(); 00008 alarmDuration.start(); 00009 while(alarmDuration.read_ms() <= duration) { 00010 buzzerRinging(4, 50, NOTE_C6); 00011 thread_sleep_for(1000); 00012 } 00013 alarmDuration.stop(); 00014 } 00015 void bellSingleAlert2(int duration) 00016 { 00017 alarmDuration.reset(); 00018 alarmDuration.start(); 00019 while(alarmDuration.read() <= duration) { 00020 buzzerRinging(1, 500, NOTE_C6); 00021 } 00022 alarmDuration.stop(); 00023 }
Generated on Fri Jul 15 2022 05:56:23 by 1.7.2