Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: SoftPWM MotorSMLAP
Fork of CANnucleo_Hello by
main.cpp
- Committer:
- tknara
- Date:
- 2017-08-11
- Revision:
- 31:ae28a608fb48
- Parent:
- 29:9ae558ec888c
- Child:
- 32:c64104c77531
File content as of revision 31:ae28a608fb48:
#include "mbed.h"
CAN can2(PA_11,PA_12);
Serial pc(PA_9,PA_10,115200);
BusOut led(PB_12,PB_13,PB_14,PB_15);
int main() {
pc.printf("main()\n");
led = 15;
CANMessage msg;
while(1) {
if(can2.read(msg)) {
pc.printf("Message received: ID:%d,data0:%d,data1:%d\n",msg.id,msg.data[0],msg.data[1]);
}
}
}
