Hardware Braille Simulator / Mbed 2 deprecated CAN_SENDER

Dependencies:   mbed

Fork of CAN_SENDER by Aasheesh Francis

Committer:
rrbeauch
Date:
Thu Feb 19 15:36:28 2015 +0000
Revision:
1:1e64adaf93da
Parent:
0:b638c214ca06
Child:
2:44a3c2680cbf
1

Who changed what in which revision?

UserRevisionLine numberNew contents of line
rrbeauch 0:b638c214ca06 1 #include "mbed.h"
rrbeauch 0:b638c214ca06 2 //--------------------------------------------------------------
rrbeauch 0:b638c214ca06 3 //CAN monitoring program for watching NXP LCP11C24 CAN messages
rrbeauch 0:b638c214ca06 4 //Outputs to serial interface (Putty)
rrbeauch 0:b638c214ca06 5 //02/19/2015
rrbeauch 0:b638c214ca06 6 //--------------------------------------------------------------
rrbeauch 0:b638c214ca06 7 CAN can(p9, p10);
rrbeauch 0:b638c214ca06 8
rrbeauch 0:b638c214ca06 9 int main() {
rrbeauch 0:b638c214ca06 10 int messagecount = 0;
rrbeauch 0:b638c214ca06 11 printf("CAN Listener\n");
rrbeauch 0:b638c214ca06 12 CANMessage msg;
rrbeauch 0:b638c214ca06 13 while(1) {
rrbeauch 0:b638c214ca06 14 if(can.read(msg)) {
rrbeauch 0:b638c214ca06 15 printf("%d ----- Message received: %d\n", messagecount, msg.data[0]);
rrbeauch 0:b638c214ca06 16 messagecount++;
rrbeauch 1:1e64adaf93da 17 }
rrbeauch 0:b638c214ca06 18 }
rrbeauch 0:b638c214ca06 19 }