dror balbul
/
CANrecive
can reciving for noam
recive.cpp
- Committer:
- drorbalbul
- Date:
- 2019-12-27
- Revision:
- 0:d6eafce8e991
File content as of revision 0:d6eafce8e991:
#include "mbed.h" DigitalOut led1(LED1); CAN can1(PA_11, PA_12); int main() { printf("main()\n"); CANMessage msg; while(1) { if(can1.read(msg)) { printf("got it\n\r"); printf("Message received: %d,,\n\r", msg.data[0]); led1 = !led1; } wait(0.2); } }