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
Diff: main.cpp
- Revision:
- 1:fc19811d6c3e
- Parent:
- 0:4ef048c63bdc
- Child:
- 2:b59bb999cffd
--- a/main.cpp Sun Jul 22 15:37:35 2018 +0000
+++ b/main.cpp Sun Jul 22 16:24:44 2018 +0000
@@ -5,9 +5,9 @@
CAN can (PA_11, PA_12);
Ticker ticker;
-char i = 1;
+char i = 0;
void transmit(){
- if (i++ > 100) i = 0;
+ if (i++ > 10) i = 0;
can.write(CANMessage(id, &i, 1, CANData, CANStandard));
}
@@ -16,6 +16,7 @@
ticker.attach(&transmit, 0.5);
while(1) {
-
+ can.write(CANMessage(1, &i, 1, CANData, CANStandard));
+ wait(0.3);
}
}