![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
CAN a enviar_TLMoto
Fork of CANnucleo_Hello by
Diff: main.cpp
- Revision:
- 14:ff9c77b97bad
- Parent:
- 13:77261ea62081
- Child:
- 15:b1d0bf2626ed
diff -r 77261ea62081 -r ff9c77b97bad main.cpp --- a/main.cpp Sun Jun 26 14:14:01 2016 +0000 +++ b/main.cpp Sun Jun 26 15:11:08 2016 +0000 @@ -12,10 +12,13 @@ CANMessage rxMsg; int counter = 0; +Serial pc(SERIAL_TX, SERIAL_RX); + int main() { can1.frequency(100000); // set bit rate to 1Mbps can2.frequency(100000); // set bit rate to 1Mbps led = 1; // turn LED on + pc.printf("pcprintf check"); while(1) { wait(10); @@ -36,7 +39,8 @@ // led = 0; // turn LED off if(can2.read(rxMsg)) { - //printf("Message received: %d\n", msg.data[0]); + // pc.printf("Message received: %d\n", rxMsg.data[0]); + pc.printf("Message received: %d\n"); led = !led; }