2015_robocon_bteam / Mbed 2 deprecated 2015robot_main

Dependencies:   PID QEI mbed

Fork of 2015robot_main by Naoto Deguchi

Files at this revision

API Documentation at this revision

Comitter:
unicore32
Date:
Mon Sep 07 04:58:33 2015 +0000
Parent:
4:51d87d2b698c
Child:
6:a350810d2071
Commit message:
RS485;

Changed in this revision

communicate.h 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
--- a/communicate.h	Sat Sep 05 04:27:19 2015 +0000
+++ b/communicate.h	Mon Sep 07 04:58:33 2015 +0000
@@ -3,9 +3,13 @@
 Serial RS485(RS485_TX, RS485_RX);
 inline void sendData(int address, int data5) {
     unsigned int data;
-    if (data5 <= 31) {
+    if (data5 <= 31 && address <= 7) {
         data = ((address << 5) | data5);
+        //EN = 1;
+        wait_ms(50);
         RS485.putc(data);
+        wait_ms(50);
+        //EN = 0;
     }
 }
 
--- a/mbed.bld	Sat Sep 05 04:27:19 2015 +0000
+++ b/mbed.bld	Mon Sep 07 04:58:33 2015 +0000
@@ -1,1 +1,1 @@
-http://mbed.org/users/mbed_official/code/mbed/builds/8ed44a420e5c
\ No newline at end of file
+http://mbed.org/users/mbed_official/code/mbed/builds/ba1f97679dad
\ No newline at end of file