Clock
Dependencies: 4DGL-uLCD-SE EthernetInterface NTPClient TextLCD mbed PinDetect SDFileSystem wave_player mbed-rtos
Fork of Internet_LCD_Clock by
Diff: Internet_LCD_Clock.cpp
- Revision:
- 6:e08b5dbdfbcf
- Parent:
- 5:818735a07b88
--- a/Internet_LCD_Clock.cpp Wed Apr 20 20:28:20 2016 +0000 +++ b/Internet_LCD_Clock.cpp Fri Apr 22 16:02:12 2016 +0000 @@ -3,7 +3,7 @@ #include "NTPClient.h" #include "EthernetInterface.h" #include "uLCD_4DGL.h" -#include "Speaker.h" +//#include "Speaker.h" #include "SDFileSystem.h" #include "wave_player.h" #include "PinDetect.h" @@ -42,7 +42,7 @@ bool playing = false; bool sd_insert = false; static int veclen = 5; -FILE *wave_file; +//FILE *wave_file; //variables for alarm //system time structure time_t ctTime; //ctTime = current time @@ -117,15 +117,10 @@ //Play file from SD card void play_file() { - bool* play_point = &playing; - //string file_name("/sd/"); - //file_name += filenames[current]; - // wave_file = fopen(file_name.c_str(),"r"); + FILE *wave_file; + printf("\n\n\nHello, wave world!\n"); wave_file=fopen("/sd/bob.wav","r"); - while(playing) { - waver.play(wave_file, play_point); - // mySpeaker.PlaySong(note,duration); - } + waver.play(wave_file); fclose(wave_file); } @@ -169,7 +164,7 @@ int main() { - + play_file(); snooze.mode(PullUp); off.mode(PullUp); wait(0.01);