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.
main.cpp
00001 #include "mbed.h" 00002 00003 Ticker ticker; 00004 DigitalOut led1(LED1); 00005 CAN can1(PA_11,PA_12); 00006 char counter = 0; 00007 00008 void send() { 00009 printf("send()\n"); 00010 if(can1.write(CANMessage(1337, &counter, 1))) { 00011 printf("wloop()\n"); 00012 counter++; 00013 printf("Message sent: %d\n", counter); 00014 } 00015 led1 = !led1; 00016 } 00017 int main() { 00018 printf("main()\n"); 00019 ticker.attach(&send, 0.5); 00020 CANMessage msg; 00021 while(1) { 00022 printf("loop()\n"); 00023 wait(0.2); 00024 } 00025 }
Generated on Sat Jul 23 2022 10:54:46 by
1.7.2