Takeuchi Issei
/
Serial_Writer-re
Serial_Writerの受信側
main.cpp@6:657302a3a908, 2021-05-14 (annotated)
- Committer:
- e2011220
- Date:
- Fri May 14 10:33:36 2021 +0000
- Revision:
- 6:657302a3a908
- Parent:
- 5:029c4cea1114
double and float
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
e2011220 | 0:7babc610f171 | 1 | #include "Serial_Writer.h" |
e2011220 | 0:7babc610f171 | 2 | Serial_Writer TWE(D5,D4,115200); |
e2011220 | 5:029c4cea1114 | 3 | int main(void) |
e2011220 | 5:029c4cea1114 | 4 | { |
e2011220 | 5:029c4cea1114 | 5 | while(true) { |
e2011220 | 6:657302a3a908 | 6 | double bit_[3];//送信側と同じ型、同じ要素数の配列 |
e2011220 | 0:7babc610f171 | 7 | int n=TWE.receive(bit_); |
e2011220 | 5:029c4cea1114 | 8 | if(n==0) { |
e2011220 | 6:657302a3a908 | 9 | printf("%3.2f %3.2f %3.2f\n\r",bit_[0],bit_[1],bit_[2]); |
e2011220 | 0:7babc610f171 | 10 | } |
e2011220 | 0:7babc610f171 | 11 | } |
e2011220 | 5:029c4cea1114 | 12 | } |