Hello world for the TLC5940Servo library.
Dependencies: TLC5940Servo mbed
main.cpp
- Committer:
- dudanian
- Date:
- 2014-10-21
- Revision:
- 2:faa25eaa18dd
- Parent:
- 1:aeb0ed70cbd0
- Child:
- 3:ad4dfe34cfcd
File content as of revision 2:faa25eaa18dd:
#include "mbed.h" #include "TLC5940Servo.h" TLC5940Servo tlc(p5, p7, p8, p9, p21); int main() { // Calibrate the 5th motor tlc.calibrate(5, 0.0006, 40.0); while (1) { for (float i = 0.0; i < 1.0; i += 0.05) { tlc[5] = i; // assigning printf("%f\n\r", tlc[5]); // reading wait (0.1); } wait(0.5); tlc[5] = 0.0; wait(0.5); } }