Serial_Writerの受信側

Committer:
e2011220
Date:
Fri May 07 09:35:03 2021 +0000
Revision:
3:f0c85f2558c4
Parent:
0:7babc610f171
Child:
4:7e5c1416d641
sc

Who changed what in which revision?

UserRevisionLine numberNew contents of line
e2011220 0:7babc610f171 1 #include "mbed.h"
e2011220 0:7babc610f171 2 #include "Serial_Writer.h"
e2011220 0:7babc610f171 3 Serial_Writer TWE(D5,D4,115200);
e2011220 0:7babc610f171 4
e2011220 0:7babc610f171 5 int main(void){
e2011220 0:7babc610f171 6 while(true){
e2011220 0:7babc610f171 7 int bit_[3];
e2011220 0:7babc610f171 8 int n=TWE.receive(bit_);
e2011220 0:7babc610f171 9 if(n==0){
e2011220 3:f0c85f2558c4 10 for(int c:bit_)printf("%d ",c);
e2011220 3:f0c85f2558c4 11 printf("\n\r");
e2011220 0:7babc610f171 12 }
e2011220 0:7babc610f171 13 }
e2011220 0:7babc610f171 14 }