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.
Diff: SD20.cpp
- Revision:
- 5:eba9f639154c
- Parent:
- 3:447af15af7c7
- Child:
- 6:973d6a66dbf7
diff -r 447af15af7c7 -r eba9f639154c SD20.cpp --- a/SD20.cpp Thu Feb 25 20:04:35 2016 +0000 +++ b/SD20.cpp Thu Feb 25 20:26:24 2016 +0000 @@ -41,7 +41,7 @@ } else { - printf("Reg: 0x%02x Data: 0x%02x\r\n",*newDutyCycle,*(newDutyCycle+1)); +// printf("Reg: 0x%02x Data: 0x%02x\r\n",*newDutyCycle,*(newDutyCycle+1)); return 0; } } @@ -59,7 +59,7 @@ } else { - printf("Reg: 0x%02x Data: 0x%02x\r\n",*newDutyCycle,*(newDutyCycle+1)); +// printf("Reg: 0x%02x Data: 0x%02x\r\n",*newDutyCycle,*(newDutyCycle+1)); return 0; } } @@ -75,7 +75,7 @@ } else { - printf("Reg: 0x%02x Data: 0x%02x\r\n",*newDutyCycle,*(newDutyCycle+1)); +// printf("Reg: 0x%02x Data: 0x%02x\r\n",*newDutyCycle,*(newDutyCycle+1)); return 0; } } @@ -91,7 +91,7 @@ } else { - printf("0x%02x sent to Reg: 0x%02x\r\n",*(outputBuf+1),*outputBuf); +// printf("0x%02x sent to Reg: 0x%02x\r\n",*(outputBuf+1),*outputBuf); return 0; } }