Aravind Narra / Mbed 2 deprecated Speech-to-Text

Dependencies:   mbed

main.cpp

Committer:
anarra
Date:
2018-12-14
Revision:
0:0a31383777e2

File content as of revision 0:0a31383777e2:

#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;
            } 
         }
    }

}