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
- Committer:
- galthop
- Date:
- 2019-07-30
- Revision:
- 0:bcd95253c3d1
File content as of revision 0:bcd95253c3d1:
#include "mbed.h" CAN can1(PB_8, PB_9, 500000); const char msg1_data[] = {0x38, 0x30, 0xAD, 0x29, 0x90, 0x1E, 0x6A, 0x00}; CANMessage msg1(0x40, (const char *)&msg1_data, 8, CANData, CANStandard); Ticker ticker; void send() { can1.write(msg1); } int main() { // Send a message every second ticker.attach(&send, 1); // Wait forever while(1) { wait(1); } }