Synthesizer / Mbed 2 deprecated DBSMUSICPROJ2

Dependencies:   mbed

Revision:
0:951442bd3f7f
Child:
1:5b491fa83cb7
diff -r 000000000000 -r 951442bd3f7f main.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Thu Jul 11 09:36:30 2019 +0000
@@ -0,0 +1,28 @@
+#include "mbed.h"
+#include "main.hpp"
+
+int main() {
+    float meas; 
+  while(1) {    
+    cs = 1;
+    dac.format(32,1);
+    dac.frequency(50000000);
+wait(0.5);
+    cs = 0;
+    dac.write(0x30FFFF);
+    wait(0.5);
+    allledon();
+   updateled();
+    multiplexa = 0;
+    meas = analog_valuea.read(); // Converts and read the analog input value (value from 0.0 to 1.0)
+    meas = meas * 3300; // Change the value to be in the 0 to 3300 range
+    printf("measure = %.0f mV\n", meas);
+    if (meas > 2000) { // If the value is greater than 2V then switch the LED on
+        led = 1;
+        }
+        else {
+          led = 0;
+//        }
+    }
+}
+    }