This is a driver to control the SD20 20 Channel I2C to Servo Driver Chip from www.robot-electronics.co.uk (http://www.robot-electronics.co.uk/htm/sd20tech.htm). This driver will allow a servo channel to be started up, stopped and the duty cycle altered in standard mode. No attempt to include the extended mode is included.

Revision:
3:447af15af7c7
Parent:
2:b6789ad2af2b
Child:
5:eba9f639154c
--- a/SD20.cpp	Sun Feb 21 23:19:27 2016 +0000
+++ b/SD20.cpp	Thu Feb 25 20:04:35 2016 +0000
@@ -41,7 +41,7 @@
         }
         else
         {
-            printf("0x%02x sent to Reg: 0x%02x\r\n",*(newDutyCycle+1),*newDutyCycle);
+            printf("Reg: 0x%02x Data: 0x%02x\r\n",*newDutyCycle,*(newDutyCycle+1));
             return 0;
         }
 }
@@ -59,7 +59,7 @@
             }
             else
             {
-                printf("0x%02x sent to Reg: 0x%02x\r\n",*(newDutyCycle+1),*newDutyCycle);
+                printf("Reg: 0x%02x Data: 0x%02x\r\n",*newDutyCycle,*(newDutyCycle+1));
                 return 0;
             }
         }
@@ -75,7 +75,7 @@
             }
             else
             {
-                printf("0x%02x sent to Reg: 0x%02x\r\n",*(newDutyCycle+1),*newDutyCycle);
+                printf("Reg: 0x%02x Data: 0x%02x\r\n",*newDutyCycle,*(newDutyCycle+1));
                 return 0;
             }
         }