
asdf
Dependencies: Motor Servo mbed
main.cpp
- Committer:
- TheDoctor822
- Date:
- 2016-04-18
- Revision:
- 0:38e54cab2a6e
File content as of revision 0:38e54cab2a6e:
/************************************************************************************ Lab 07 - Part 1 This program takes in an integer and three float values from the user. It uses the integer as a start trigger and increments the lights on the mbed to match the float values by increments of 0.01. MIDN 3/C Drew Moore 24 FEB 2016 ***********************************************************************************/ #include "mbed.h" #include "Motor.h" #include "Servo.h" Serial pc(USBTX, USBRX); // tx, rx Servo myservo( p21 ); int main() { myservo.calibrate( .0009, 90 ); while(1) { myservo = 0; for ( float i = 0; i < 1.0; i += 0.0555 ) { myservo = i; wait( .2 ); } } }