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 use_can_stm
Diff: main.cpp
- Revision:
- 0:2d1674c40691
diff -r 000000000000 -r 2d1674c40691 main.cpp
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp Mon Mar 21 08:40:13 2022 +0000
@@ -0,0 +1,21 @@
+#include "mbed.h"
+//#include "use_can_stm.h"
+//#include "use_can_stm.cpp"
+CAN can(p30,p29);
+TIcker controlCycle;
+float a;
+
+int main()
+{
+ can.frequency(500000);
+ controlCycle.attach(&mainLoop,0.01f);
+
+ while(1) {
+ motordriverTransmitMessage(&can,MD_0_MCU,md_can_flame::SEND_CONTROL_DUTY,0.8f);
+ Ticker controlCycle;
+ }
+
+ void mainLoop() {
+ motordriverTransmitMessage(&can,MD_0_MCU,md_can_flame::SEND_CONTROL_DUTY,0.8f);
+ }
+}