Led_driver

Dependencies:   TLC5940 mbed

Fork of TLC5940ServoTest by Andrew Duda

Files at this revision

API Documentation at this revision

Comitter:
dudanian
Date:
Tue Oct 21 15:06:20 2014 +0000
Parent:
2:faa25eaa18dd
Child:
4:8fc1281b08fa
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);