Lab2 Part 6
Dependencies: mbed
Fork of 4180Lab2_part6 by
Revision 3:e724b47c0c04, committed 2015-10-06
- Comitter:
- ldeng31
- Date:
- Tue Oct 06 19:36:39 2015 +0000
- Parent:
- 2:7481c04acf7f
- Commit message:
- Lab2_part6;
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
diff -r 7481c04acf7f -r e724b47c0c04 main.cpp --- a/main.cpp Sat Sep 05 19:40:05 2015 +0000 +++ b/main.cpp Tue Oct 06 19:36:39 2015 +0000 @@ -1,12 +1,15 @@ #include "mbed.h" -PwmOut control(p26); +DigitalOut control(p26); int main() { while(1) { - for(float p = 0.0f; p < 1.0f; p += 0.1f) { + //for(float p = 0.0f; p < 1.0f; p += 0.1f) { + float p = 1.0f; control.write(p); - wait(5.0); + wait(1.0); + float q = 0.0f; + control.write(q); + wait(1.0); } } -} \ No newline at end of file