Josh Davy / Mbed 2 deprecated Flip

Dependencies:   mbed el17jd

Revision:
4:afbf3dd71403
Child:
5:b9cf407bcc63
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Music/Music.cpp	Sat Apr 06 11:47:18 2019 +0000
@@ -0,0 +1,26 @@
+Music::Music()
+{
+
+}
+Music::~Music()
+{
+    
+    
+
+}
+Music::init(int * data)
+{
+    _data = data;
+    speaker.period(0.000016); // Has to >> then 1/sample rate
+    speaker.write(0); // until music played stay silent
+    _index = 0
+}
+
+Music::play_next()
+{
+    if (_index < NUM_ELEMENTS) {
+        speaker.write(*(_data+index));
+        }
+        
+        
+}
\ No newline at end of file