Fa2018-es200-3321-proj2-WHACK_A_MOLE
/
Guntrigger
Gun Trigger Code
Diff: main.cpp
- Revision:
- 1:45d7c2476250
- Parent:
- 0:e65fc2ec46d6
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 } } }