FORARKADI

Dependencies:   mbed mypidror1 Motor Map

Revision:
0:d6eafce8e991
Child:
1:f0e37d1d1452
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/recive.cpp	Fri Dec 27 17:50:14 2019 +0000
@@ -0,0 +1,17 @@
+#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);
+    }
+}
\ No newline at end of file