2022_Ateam_MOTORprogramをscrp_slaveでメインマイコンからコントローラー状況を読み取れるように改良。 また、モータに0以外のpwmが送られている場合に基盤付属のledが点灯するようにした。

Dependencies:   SBDBT arrc_mbed BNO055

Revision:
0:a1238c4cd105
Child:
1:ea880e226e5a
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/TARGETco.hpp	Wed Jan 19 12:43:26 2022 +0000
@@ -0,0 +1,29 @@
+#ifndef TARGET_CO_H
+#define TARGET_CO_H
+#include "mbed.h"
+#include "math.h"
+
+class TARGETco{
+    
+    public:
+        void pass_val(double XPOWER,double YPOWER,double THETA);
+        void pass_target(double TARGET);
+        double obt_target1();
+        double obt_target2();
+        double obt_target3();
+        double obt_target4();
+        
+    private:
+        void cal_angular();
+        
+        double theta;
+        double Xpower,Ypower;
+        double Xvelocity,Yvelocity;
+        double target[4];
+        
+};
+
+#endif
+        
+        
+    
\ No newline at end of file