пеас

Dependencies:   mbed

main.cpp

Committer:
Sergeev
Date:
2014-12-09
Revision:
0:beb25340afe3

File content as of revision 0:beb25340afe3:

#include "mbed.h"

Serial pc(USBTX, USBRX);  // USBTX - Tranmit on USB  USBRX - receive on USB

int main()
{
    char read[10];
   
    while(1)
    {  
        wait(1);
        printf("Heartbeat \r");
              
        if ( pc.readable() )
        {     
            printf("  There's something to read\r");
            pc.scanf("%s", &read);
            printf("  Reading %s \r", read);
        }        
    }
}