Serial_Writerの受信側

main.cpp

Committer:
e2011220
Date:
2021-05-07
Revision:
4:7e5c1416d641
Parent:
3:f0c85f2558c4
Child:
5:029c4cea1114

File content as of revision 4:7e5c1416d641:

#include "mbed.h"
#include "Serial_Writer.h"
Serial_Writer TWE(D5,D4,115200);

int main(void){
    while(true){
        int bit_[3];//送信側と同じ型、同じ要素数の配列
        int n=TWE.receive(bit_);
        if(n==0){
            for(int c:bit_)printf("%d ",c);
            printf("\n\r");
        }
    }
}