STM3 ESC dual brushless motor controller. 10-60v, motor power rating tiny to kW. Ganged or independent motor control As used in 'The Brute' locomotive - www.jons-workshop.com

Dependencies:   mbed BufferedSerial Servo FastPWM

Revision:
3:ecb00e0e8d68
Parent:
1:0fabe6fdb55b
Child:
12:d1d21a2941ef
--- a/24LC64_eeprom.cpp	Sat Mar 10 10:11:07 2018 +0000
+++ b/24LC64_eeprom.cpp	Sun Mar 18 08:17:56 2018 +0000
@@ -3,7 +3,7 @@
 #include "BufferedSerial.h"
 extern  BufferedSerial pc;
 extern  I2C i2c;
-    //  Code for 24LC64 eeprom
+    //  Code for 24LC64 8k x 8 bit eeprom
     //  Code based on earlier work using memory FM24W256, also at i2c address 0xa0;
  
 const int addr_rd = 0xa1;  //  set bit 0 for read, clear bit 0 for write
@@ -20,7 +20,7 @@
             i2cfree = true;
         else
 //            Thread::wait(1);   //   1ms
-            wait   (1);
+            wait_ms   (1);
     }
 //    pc.printf   ("ack_poll, count = %d, i2cfree = %s\r\n", poll_count, i2cfree ? "true" : "false");
     return  i2cfree;
@@ -50,6 +50,7 @@
         pc.printf   ("Length out of range %d in wr_24LC64\r\n", length);
         return  false;
     }
+    ack_poll    ();
     if  (!set_24LC64_internal_address   (start_addr))   {
         pc.printf   ("In wr_24LC64, Believe Device present, failed in writing 2 mem addr bytes %d\r\n", err);
         return  false;