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.
Dependencies: 4DGL-uLCD-SE EthernetInterface NTPClient TextLCD mbed PinDetect SDFileSystem wave_player mbed-rtos
Fork of Internet_LCD_Clock by
Revision 6:e08b5dbdfbcf, committed 2016-04-22
- Comitter:
- ashea6
- Date:
- Fri Apr 22 16:02:12 2016 +0000
- Parent:
- 5:818735a07b88
- Commit message:
- dkdkdkd
Changed in this revision
--- 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);
--- a/Speaker.h	Wed Apr 20 20:28:20 2016 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,19 +0,0 @@
-#include "mbed.h"
-// new class to play a note on Speaker based on PwmOut class
-class Speaker
-{
-public:
-    Speaker(PinName pin) : _pin(pin) {
-// _pin(pin) means pass pin to the Speaker Constructor
-    }
-// class method to play a note based on PwmOut class
-    void PlayNote(float frequency, float duration, float volume) {
-        _pin.period(1.0/frequency);
-        _pin = volume/2.0;
-        wait(duration);
-        _pin = 0.0;
-    }
-
-private:
-    PwmOut _pin;
-};
\ No newline at end of file
--- a/wave_player.lib Wed Apr 20 20:28:20 2016 +0000 +++ b/wave_player.lib Fri Apr 22 16:02:12 2016 +0000 @@ -1,1 +1,1 @@ -https://developer.mbed.org/teams/4180/code/wave_player/#ab8c3f888b64 +http://mbed.org/users/sravet/code/wave_player/#acc3e18e77ad
