CVtoOSC Converter for Nucleo F303K8

Dependencies:   DebouncedInterrupt MIDI mbed osc-cnmat BufferedSerial

OSC to CV Converter

http://gtbts.tumblr.com/post/142840140501/cvtoosc-converter-for-modular-synthesizer

Files at this revision

API Documentation at this revision

Comitter:
casiotone401
Date:
Sun Feb 14 09:03:47 2016 +0000
Parent:
0:577ad245b1f5
Child:
2:7997fb939580
Commit message:
improved performance

Changed in this revision

BufferedSerial.lib Show annotated file Show diff for this revision Revisions of this file
main.cpp Show annotated file Show diff for this revision Revisions of this file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/BufferedSerial.lib	Sun Feb 14 09:03:47 2016 +0000
@@ -0,0 +1,1 @@
+http://developer.mbed.org/users/sam_grove/code/BufferedSerial/#779304f9c5d2
--- a/main.cpp	Sun Feb 14 03:32:40 2016 +0000
+++ b/main.cpp	Sun Feb 14 09:03:47 2016 +0000
@@ -12,6 +12,7 @@
 #include <string>
 
 #include "mbed.h"
+#include "BufferedSerial.h"
 #include "DebouncedInterrupt.h"
 #include "MIDI.h"
 #include "OSCBundle.h"
@@ -306,19 +307,19 @@
 #define REMOTE_ADDRESS   "192.168.1.2"
 #define REMOTE_PORT      "8000"
 
-//#define STATIC_IP // if you use DHCP comment out this line 
+#define STATIC_IP // if you use DHCP comment out this line 
 
 #define LOCAL_ADDRESS    "192.168.1.8"
 #define LOCAL_PORT       "9000"
 
 // Serial for esp8266 (tx, rx)
-Serial esp8266Serial(D1, D0);
+BufferedSerial esp8266Serial(D1, D0);
 
 // Serial for debug (tx, rx)
 Serial pc(USBTX, USBRX);
 
 // MIDI (tx, rx)
-MIDI midi(A7, A2);
+MIDI midi(A7, NC);
 
 // declare the OSC bundle
 OSCBundle bndl;
@@ -538,9 +539,9 @@
     float pot[2] = {0};
     static float _pot[2] = {potPin1.read(), potPin2.read()};
     
-    // Init SPI (2MHz clock)
+    // Init SPI (4MHz clock)
     spi.format(8, 0);
-    spi.frequency(2000000);
+    spi.frequency(4000000);
     csPin = 1;
     
     // setup esp8266 wi-fi