
Gun Trigger Code
Revision 1:45d7c2476250, committed 2018-10-15
- Comitter:
- vinnypotente
- Date:
- Mon Oct 15 13:58:15 2018 +0000
- Parent:
- 0:e65fc2ec46d6
- Commit message:
- added comments
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
diff -r e65fc2ec46d6 -r 45d7c2476250 main.cpp --- a/main.cpp Wed Oct 10 14:40:32 2018 +0000 +++ b/main.cpp Mon Oct 15 13:58:15 2018 +0000 @@ -10,7 +10,7 @@ myservo=0.0; wait(1); while (1) { - c = getchar (); + c = getchar ();//prompts the arm to pull the trigger for (pos =0.0; pos<=10.0; pos=pos+10.0) { myservo=(pos/10.0); wait (0.07); @@ -19,7 +19,7 @@ for (pos =10.0; pos>=0.0; pos=pos-10.0) { myservo=(pos/10.0); wait (0.07); - printf("%f\n",pos); + printf("%f\n",pos); // pulls the trigger } } }