Takahashi Shu / Mbed 2 deprecated 1-CAN-th2mot-mbed2-01_02

Dependencies:   mbed

Revision:
4:1b193f02cfb1
Parent:
3:43a6f6157fcf
--- a/main.cpp	Thu Sep 17 07:09:17 2020 +0000
+++ b/main.cpp	Thu Jan 14 07:48:02 2021 +0000
@@ -27,7 +27,8 @@
 
 char c_sent=0, c_read=0;   // counters of sent and read
 char dseg[8]={0xFF, 0x01, 0x00, 0x64, 0x00, 0x80, 0x00, 0x00};  //data_segment
-
+char dseg[9]={0xff, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};  //data segment_2
+ 
 //  byte manipu using the union Hoge, char MUST be unsigned.
 union Hoge{ unsigned char c[2]; uint16_t ii; };
 
@@ -62,6 +63,8 @@
        pc.scanf("%lf", &th);
 
        th2mot(th, id);
+       
+       
        wait(0.2);             // dummy wait 0.2[s]
        if(can1.read(msg)) {   // org=can2
           c_read++; led2 = !led2;