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: mbed
Fork of CAN_SENDER by
main.cpp
- Committer:
- aasheesh
- Date:
- 2015-02-21
- Revision:
- 2:44a3c2680cbf
- Parent:
- 1:1e64adaf93da
File content as of revision 2:44a3c2680cbf:
#include "mbed.h" Ticker ticker; DigitalOut led1(LED1); DigitalOut led2(LED2); CAN can1(p9, p10); char counter = 'U'; void send() { can1.write(CANMessage(1337, &counter, 1)); printf("Message sent: %d\n", counter); led1 = !led1; } int main() { printf("main()\n"); can1.frequency(500000); CANMessage msg; while(1) { send(); } }