Yugo Osada / Mbed 2 deprecated CanTest_1_sender

Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
lrf
Date:
Sun Nov 07 02:04:40 2021 +0000
Commit message:
CanTest

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
mbed.bld Show annotated file Show diff for this revision Revisions of this file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Sun Nov 07 02:04:40 2021 +0000
@@ -0,0 +1,25 @@
+#include"mbed.h"
+
+CAN can(PB_8,PB_9);
+DigitalIn btn(USER_BUTTON);
+DigitalOut led1(LED1);
+char phaze = '0';
+
+void changeM()
+{
+    int nphaze = (int)phaze;
+    nphaze++;
+    nphaze = nphaze%3;
+    phaze = (char)nphaze;
+}
+
+int main()
+{
+    while(1)
+    {
+      CANMessage msg(0,&phaze,1);
+      can.write(msg);  
+      wait(0.1);
+    }
+    return 0;
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Sun Nov 07 02:04:40 2021 +0000
@@ -0,0 +1,1 @@
+https://os.mbed.com/users/mbed_official/code/mbed/builds/65be27845400
\ No newline at end of file