Demo Day SSL using 3 microphones and KL25z

Dependencies:   Multi_WS2811_Mic FastAnalogIn USBDevice mbed

Committer:
antoniorohit
Date:
Sat Nov 22 18:55:28 2014 +0000
Revision:
0:5cb897285e00
Child:
1:56a68eaa1129
First Rev of Demo Day Code

Who changed what in which revision?

UserRevisionLine numberNew contents of line
antoniorohit 0:5cb897285e00 1 #include "mbed.h"
antoniorohit 0:5cb897285e00 2 #include "FastAnalogIn.h"
antoniorohit 0:5cb897285e00 3 #include "USBSerial.h"
antoniorohit 0:5cb897285e00 4
antoniorohit 0:5cb897285e00 5 FastAnalogIn mic0(A2, 0);
antoniorohit 0:5cb897285e00 6 FastAnalogIn mic1(A3, 0);
antoniorohit 0:5cb897285e00 7 Serial pc(USBTX, USBRX);
antoniorohit 0:5cb897285e00 8
antoniorohit 0:5cb897285e00 9 int main(void) {
antoniorohit 0:5cb897285e00 10 uint16_t i = 0;
antoniorohit 0:5cb897285e00 11 float buff0[1000];
antoniorohit 0:5cb897285e00 12 float buff1[1000];
antoniorohit 0:5cb897285e00 13 pc.baud(115200);
antoniorohit 0:5cb897285e00 14
antoniorohit 0:5cb897285e00 15 while (true){
antoniorohit 0:5cb897285e00 16 for(i = 0; i < 500; i++){
antoniorohit 0:5cb897285e00 17 // buff0[i] = (mic0.read());
antoniorohit 0:5cb897285e00 18 // buff1[i] = (mic1.read());
antoniorohit 0:5cb897285e00 19 pc.printf("%0.3f,%0.3f\n", (mic0.read()), (mic1.read()));
antoniorohit 0:5cb897285e00 20
antoniorohit 0:5cb897285e00 21 }
antoniorohit 0:5cb897285e00 22 // for(i = 0; i < 500; i++){
antoniorohit 0:5cb897285e00 23 // pc.printf("%.3f,%.3f\n", (buff0[i]), (buff1[i]));
antoniorohit 0:5cb897285e00 24 // }
antoniorohit 0:5cb897285e00 25
antoniorohit 0:5cb897285e00 26 }
antoniorohit 0:5cb897285e00 27 }