Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: RemoteIR mbed AQM0802A
Revision 6:017ddc3a1de6, committed 2018-09-05
- Comitter:
- Shimada_Takumi
- Date:
- Wed Sep 05 03:53:20 2018 +0000
- Parent:
- 5:5280840c776f
- Commit message:
- ???????????
Changed in this revision
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
diff -r 5280840c776f -r 017ddc3a1de6 main.cpp
--- a/main.cpp Thu Aug 23 09:21:12 2018 +0000
+++ b/main.cpp Wed Sep 05 03:53:20 2018 +0000
@@ -1,3 +1,6 @@
+//展開刃用プログラム
+//
+
#include "mbed.h"
#include "ReceiverIR.h"
#include "AQM0802A.h"
@@ -42,29 +45,36 @@
#define start_plus 500 //-90
#define end_plus 2400 //+90
+
//スイッチ ---------------------------------------------------------------------
DigitalIn select(PA_9); //選択ボタン
DigitalIn decide(PA_10);//決定ボタン
+
//ブザー ---------------------------------------------------------------------
PwmOut buzer(PB_5);
+
//センサー ---------------------------------------------------------------------
DigitalIn ls[4]={PB_9,PB_8,PC_7,PB_10}; //左前、右前、右後、左後
AnalogIn es[4]={PB_15,PB_14,PB_12,PB_13}; //左前、右前、右後、左後
+
//モーター ---------------------------------------------------------------------
DigitalOut MR[2]={PA_7,PA_6}; //右モーター回転方向指定ピン
DigitalOut ML[2]={PA_5,PA_3}; //左モーター回転方向指定ピン
PwmOut Rduty(PB_7); //右モーターPWM
PwmOut Lduty(PA_0); //左モーターPWM
+
//サーボモータ
PwmOut servo(PB_10); //SG90
+
//LCD---------------------------------------------------------------------------
AQM0802A lcd(PC_12, PA_8); //sda,scl
+
//リモコン受信モジュール --------------------------------------------------------
ReceiverIR ir_rx(PC_0);