speech to text converter

Dependencies:   mbed

Committer:
bhshruthi92
Date:
Mon Apr 03 23:21:56 2017 +0000
Revision:
0:4836cf3f07cd
Speech to Text conversion using FRDM K64F with the help of Bluetooth Module HC 06 and an Android phone.

Who changed what in which revision?

UserRevisionLine numberNew contents of line
bhshruthi92 0:4836cf3f07cd 1 #include "mbed.h"
bhshruthi92 0:4836cf3f07cd 2 #include <stdio.h>
bhshruthi92 0:4836cf3f07cd 3 #include <string.h>
bhshruthi92 0:4836cf3f07cd 4
bhshruthi92 0:4836cf3f07cd 5 Serial pc(USBTX, USBRX);
bhshruthi92 0:4836cf3f07cd 6 Serial device(PTC15, PTC14);
bhshruthi92 0:4836cf3f07cd 7
bhshruthi92 0:4836cf3f07cd 8 unsigned char recivedchar[255];
bhshruthi92 0:4836cf3f07cd 9 int i;
bhshruthi92 0:4836cf3f07cd 10
bhshruthi92 0:4836cf3f07cd 11 int main()
bhshruthi92 0:4836cf3f07cd 12 {
bhshruthi92 0:4836cf3f07cd 13 printf("\n **********READY********** \n");
bhshruthi92 0:4836cf3f07cd 14 unsigned char rx;
bhshruthi92 0:4836cf3f07cd 15 device.baud(9600);
bhshruthi92 0:4836cf3f07cd 16 while(1)
bhshruthi92 0:4836cf3f07cd 17 {
bhshruthi92 0:4836cf3f07cd 18 if(device.readable())
bhshruthi92 0:4836cf3f07cd 19 {
bhshruthi92 0:4836cf3f07cd 20 for(i =0;i<255;i++)
bhshruthi92 0:4836cf3f07cd 21 {
bhshruthi92 0:4836cf3f07cd 22 rx = device.getc();
bhshruthi92 0:4836cf3f07cd 23 recivedchar[i] =rx;
bhshruthi92 0:4836cf3f07cd 24 pc.printf("%c",recivedchar[i]);
bhshruthi92 0:4836cf3f07cd 25 break;
bhshruthi92 0:4836cf3f07cd 26 }
bhshruthi92 0:4836cf3f07cd 27 }
bhshruthi92 0:4836cf3f07cd 28 }
bhshruthi92 0:4836cf3f07cd 29 }