2022_gorobo_Ateam
/
beenbag_shoot
program to shoot beenbags
arrcmbedをインクルードしてください。
Diff: main.cpp
- Revision:
- 15:7c26b01dcefd
- Parent:
- 14:81f09ab5ed23
- Child:
- 16:04f42eeb9561
diff -r 81f09ab5ed23 -r 7c26b01dcefd main.cpp --- a/main.cpp Sat Jan 22 15:05:22 2022 +0000 +++ b/main.cpp Tue Jan 25 23:56:51 2022 +0000 @@ -57,7 +57,7 @@ printf("backing\n"); } - wait(0.1); + wait(0.01); } } } @@ -89,6 +89,9 @@ motor_shoot.output(load_pwm); printf("loading\n"); wait(0.1); + if(limit_2.read() == 1){ + break; + } } motor_shoot.output(0); shoot_phase = 2; @@ -110,6 +113,9 @@ count ++; wait(5); servo.pulsewidth_us(theta_0); + motor_shoot.output(load_pwm); + wait(0.1); + motor_shoot.output(0); shoot_phase = 0; printf("finished init\n"); break;