shoot

Dependencies:   mbed SBDBT arrc_mbed Servo air

Revision:
2:0428390d7c90
Parent:
1:cae30876c429
--- a/main.cpp	Mon Jan 24 08:11:10 2022 +0000
+++ b/main.cpp	Thu Feb 24 01:50:43 2022 +0000
@@ -1,9 +1,11 @@
 #include "mbed.h"
 #include "air.hpp"
 #include "sbdbt.hpp"
+#include "Servo.h"
 sbdbt ds3(A0, A1);
 DigitalIn limitA(PA_9,PullUp);
 Air hassya(PA_0);
+Servo myservo(PB_0);
 Timer timer;
 //↓モータ用
 void driveMotorS(double pwm){
@@ -24,8 +26,12 @@
 }
 // ↓サーボ用(未実装)
 void Servo(bool data){
-    
+    if(data==0){
+    myservo = 0;    
+    }else{
+    myservo = 0.2;
     }
+}
 //↓発射用
 void Hassya(bool data,int tim){
     if(data==1 || timer.read_ms()-tim<3000){