Sample for TWE-Lite (used by Nucleo-STMF303K8)
Dependencies: mbed
Revision 0:fb274affd2e5, committed 2016-09-04
- Comitter:
- mikawataru
- Date:
- Sun Sep 04 14:29:24 2016 +0000
- Commit message:
- Nucleo&TWE-Lite
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 |
diff -r 000000000000 -r fb274affd2e5 main.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Sun Sep 04 14:29:24 2016 +0000 @@ -0,0 +1,33 @@ +/* +説明 +Nucleo-F303K8とTWE-Liteを使った無線送信のサンプル + +以下ピン配置 +Nucleo TWE-Lite +GND--------GND&M1--------------------------0V ++3V3-------VCC&AI1&AI2&AI3&AI4 +PA_9-------3 +PA_10------10 + +*/ + + +#include "mbed.h" + +Serial pc(USBTX, USBRX); +Serial TWE(PA_9, PA_10); +Timer timer; + +char data[]="Hello World!!\r\n"; + +int main() { + TWE.baud(115200); + timer.reset(); + timer.start(); + + while(1){ + double t = timer.read(); + TWE.printf("time:%f,%s\r\n",t,data); + wait(1); + } +}//main
diff -r 000000000000 -r fb274affd2e5 mbed.bld --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Sun Sep 04 14:29:24 2016 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/6c34061e7c34 \ No newline at end of file