Takeuchi Issei
/
Serial_Writer-re
Serial_Writerの受信側
Diff: main.cpp
- Revision:
- 6:657302a3a908
- Parent:
- 5:029c4cea1114
--- a/main.cpp Fri May 07 09:38:59 2021 +0000 +++ b/main.cpp Fri May 14 10:33:36 2021 +0000 @@ -1,15 +1,12 @@ -#include "mbed.h" #include "Serial_Writer.h" Serial_Writer TWE(D5,D4,115200); - int main(void) { while(true) { - int bit_[3];//送信側と同じ型、同じ要素数の配列 + double bit_[3];//送信側と同じ型、同じ要素数の配列 int n=TWE.receive(bit_); if(n==0) { - for(int c:bit_)printf("%d ",c); - printf("\n\r"); + printf("%3.2f %3.2f %3.2f\n\r",bit_[0],bit_[1],bit_[2]); } } } \ No newline at end of file