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

Dependencies:   SBDBT arrc_mbed BNO055

Revision:
5:1a850f68a06c
Parent:
3:6fb5c3218608
Child:
9:569c0f55dd9b
--- a/library/function.hpp	Sat Jan 22 16:00:04 2022 +0000
+++ b/library/function.hpp	Sun Jan 23 13:31:36 2022 +0000
@@ -8,6 +8,8 @@
 int y_component;
 int l2_num;
 int r2_num;
+bool up;
+bool down;
 
 //スティックのx成分取得
 bool getLstick_x(int rx_data,int &tx_data){
@@ -38,10 +40,27 @@
 bool change_mode(int rx_data,int &tx_data){
     if(rx_data == 1){
         auto_mode =! auto_mode;
-        while(auto_mode == 0);
     }
     return true;
 }
 
+//上キー取得
+bool getUp(int rx_data,int &tx_data){
+     up = rx_data;
+     return true;
+}
 
+//下キー取得
+bool getDown(int rx_data,int &tx_data){
+     down = rx_data;
+     return true;
+}
+
+//四角キー取得
+
+//三角キー取得
+
+//丸キー取得
+
+//Xキー取得
 #endif
\ No newline at end of file