ライブラリのUSBシリアル通信接続のサンプルプログラム
Dependencies: mbed
Revision 0:b478eff2c9f1, committed 2019-07-29
- Comitter:
- GGU
- Date:
- Mon Jul 29 02:48:10 2019 +0000
- Commit message:
- test;
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 Mon Jul 29 02:48:10 2019 +0000 @@ -0,0 +1,12 @@ +//受信したシリアルデータをそのまま送信(エコー)します +#include "mbed.h" + +Serial pc(USBTX, USBRX); // tx, rx + +int main() { + pc.printf("Hello World!"); + while(1) { + pc.putc(pc.getc()+1); //+1はascllコードに+1がされている + } +} + \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Mon Jul 29 02:48:10 2019 +0000 @@ -0,0 +1,1 @@ +https://os.mbed.com/users/mbed_official/code/mbed/builds/65be27845400 \ No newline at end of file