Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: TLC5940Servo mbed
Revision 3:ad4dfe34cfcd, committed 2014-10-21
- Comitter:
- dudanian
- Date:
- Tue Oct 21 15:06:20 2014 +0000
- Parent:
- 2:faa25eaa18dd
- Commit message:
- Removed indexed calibrate to make usage more like indexing an array of mbed official Servos
Changed in this revision
| TLC5940Servo.lib | Show annotated file Show diff for this revision Revisions of this file |
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/TLC5940Servo.lib Tue Oct 21 06:10:08 2014 +0000 +++ b/TLC5940Servo.lib Tue Oct 21 15:06:20 2014 +0000 @@ -1,1 +1,1 @@ -http://developer.mbed.org/users/dudanian/code/TLC5940Servo/#3b04a122e508 +http://developer.mbed.org/users/dudanian/code/TLC5940Servo/#b001282e967b
--- a/main.cpp Tue Oct 21 06:10:08 2014 +0000
+++ b/main.cpp Tue Oct 21 15:06:20 2014 +0000
@@ -6,11 +6,11 @@
int main()
{
// Calibrate the 5th motor
- tlc.calibrate(5, 0.0006, 40.0);
+ tlc[5].calibrate(0.0006, 40.0);
while (1) {
- for (float i = 0.0; i < 1.0; i += 0.05) {
+ for (float i = 0.0; i <= 1.01; i += 0.05) {
tlc[5] = i; // assigning
- printf("%f\n\r", tlc[5]); // reading
+ printf("%f\n\r", (float)tlc[5]); // reading
wait (0.1);
}
wait(0.5);
TLC5940 16 Servo Controller