Luca Mottola / Mbed 2 deprecated IOTAtelier1819-STDinSTDout

Dependencies:   mbed

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers main.cpp Source File

main.cpp

00001 #include "mbed.h"
00002 
00003 Serial pc(USBTX, USBRX);
00004 
00005 int main() {
00006     char buffer[128];
00007 
00008     pc.printf("Starting..\n");
00009 
00010     while (1) {
00011         pc.gets(buffer, 4);
00012         pc.printf("I got '%s'\n", buffer);
00013     }
00014 }