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 mbed-STM32F103C8T6
main.cpp
- Committer:
- RuslanUrya
- Date:
- 2018-07-22
- Revision:
- 0:4ef048c63bdc
- Child:
- 1:fc19811d6c3e
File content as of revision 0:4ef048c63bdc:
#include "mbed.h"
#include "stm32f103c8t6.h"
#define id 3
CAN can (PA_11, PA_12);
Ticker ticker;
char i = 1;
void transmit(){
if (i++ > 100) i = 0;
can.write(CANMessage(id, &i, 1, CANData, CANStandard));
}
int main() {
confSysClock();
ticker.attach(&transmit, 0.5);
while(1) {
}
}