ECE 111 At Oregon State University / Mbed 2 deprecated Lab3_Basic

Dependencies:   mbed

Revision:
0:dcdfee042939
Child:
1:d16782f51626
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Mon Sep 19 17:19:59 2016 +0000
@@ -0,0 +1,28 @@
+#include "mbed.h"
+#include "Music.h"
+#include "AnalogIn.h"
+ 
+/*! Main class.
+ *  Creates an instance of the Music class, and then connects it to an output, which should
+ *  be connected to a small speaker.
+ * \author  Alex Hale
+ *
+ * \date    August 14th, 2016
+ */
+ 
+//#define  STARTING_NOTE      80
+ 
+AnalogIn readVoltage(A0);
+//DigitalOut mySpeaker(D0);
+ 
+int main()
+{
+    Music myMusic(D0);
+ 
+    while (true) {
+        //myMusic.playNote(int(readValue.read()));
+        myMusic.playNote(readVoltage.read()*80.f);
+    }//end of while
+}//end of main
+           
+           
\ No newline at end of file