Dependencies:   mbed

Fork of PC_communication by 智也 大野

Files at this revision

API Documentation at this revision

Comitter:
tomoya123
Date:
Fri Dec 09 05:01:33 2016 +0000
Commit message:
PC communication

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
mbed.bld Show annotated file Show diff for this revision Revisions of this file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Fri Dec 09 05:01:33 2016 +0000
@@ -0,0 +1,17 @@
+#include"mbed.h"
+Serial pc(USBTX,USBRX);
+int main(){
+    pc.baud(9600);
+    int i1=7;
+    float i2=7.5;
+    char i3='H';
+    pc.printf("Hello World!\r\n");
+    pc.printf("i1=%d\r\n",i1);
+    pc.printf("i2=%f\r\n",i2);
+    pc.printf("i3=%c\r\n",i3);
+    pc.putc(i3);
+    for(i1=0;i1<10;i1++){
+        printf("i1=%d\r\n",i1);
+        pc.putc(pc.getc());
+    }
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Fri Dec 09 05:01:33 2016 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/0ab6a29f35bf
\ No newline at end of file