speech to text converter

Dependencies:   mbed

main.cpp

Committer:
bhshruthi92
Date:
2017-04-03
Revision:
0:4836cf3f07cd

File content as of revision 0:4836cf3f07cd:

#include "mbed.h"
#include <stdio.h>
#include <string.h>

Serial pc(USBTX, USBRX);
Serial device(PTC15, PTC14);
 
unsigned char recivedchar[255];
int i; 

int main()
{
    printf("\n **********READY********** \n");
    unsigned char rx;
    device.baud(9600);
    while(1) 
    {  
         if(device.readable()) 
        {
            for(i =0;i<255;i++)
            {
            rx = device.getc();
            recivedchar[i] =rx;
            pc.printf("%c",recivedchar[i]);
            break;
            } 
         }
    }
}