2022_Ateam_MOTORprogramをscrp_slaveでメインマイコンからコントローラー状況を読み取れるように改良。 また、モータに0以外のpwmが送られている場合に基盤付属のledが点灯するようにした。
Dependencies: SBDBT arrc_mbed BNO055
Diff: library/odometry.hpp
- Revision:
- 6:e089fda81b74
- Parent:
- 4:867c2b5cf81a
- Child:
- 10:ad8fced7d6b6
diff -r 1a850f68a06c -r e089fda81b74 library/odometry.hpp --- a/library/odometry.hpp Sun Jan 23 13:31:36 2022 +0000 +++ b/library/odometry.hpp Mon Jan 24 09:21:43 2022 +0000 @@ -5,14 +5,14 @@ double x_position; double y_position; -double odometer_ensyu; +double odometer_ensyu = 50; double read_interval = 0.05; RotaryInc odometer[4] = { - RotaryInc(PC_2 ,PC_3 ,1,256,4), - RotaryInc(PA_12,PC_5 ,1,256,4), - RotaryInc(PC_0 ,PC_1 ,1,256,4), - RotaryInc(PC_4 ,PA_13,1,256,4) + RotaryInc(PC_10 ,PC_11 ,1,256,4),//前 + RotaryInc(PA_12,PC_5 ,1,256,4),//左 + RotaryInc(PA_8 ,PA_9 ,1,256,4),//後 + RotaryInc(PA_6 ,PA_7,1,256,4)//右 }; void get_position(double pltheta){