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.
Diff: main.cpp
- Revision:
- 0:1b294da0842e
- Child:
- 1:293b11fbc576
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp Sat Oct 26 15:03:17 2019 +0000
@@ -0,0 +1,74 @@
+#include "mbed.h"
+#include "moterdriver.h"
+
+Moter moter1(p24,p29,p30,1); //pwma,AIN1,AIN2,can brake//
+Moter moter2(p23,p28,p27,1); //pwmb,BIN1,BIN2,can brake//
+
+int main() {
+ moter1.speed(1); //移動最初1000㎜直進
+ moter2.speed(1);
+ wait(600);
+ moter1.speed(0);
+ moter2.speed(0);
+ //nichrome2();
+ //drill_spinner();
+ //seed_spinner();
+ //splash();
+ moter1.speed(1); //200mm直進する
+ moter2.speed(1);
+ wait(120);
+ moter1.speed(0);
+ moter2.speed(0); //耕し終了
+ //nichrome3();
+ moter1.speed(1); //100mm直進する
+ moter2.speed(1);
+ wait(60);
+ moter1.speed(1); //90°左旋回
+ moter2.speed(-1);
+ wait(20);
+ moter1.speed(1); //200mm直進する
+ moter2.speed(1);
+ wait(120);
+ moter1.speed(1); //90°左旋回
+ moter2.speed(-1);
+ wait(20);
+ moter1.speed(1); //300mm直進する
+ moter2.speed(1);
+ wait(180);
+ moter1.speed(1); //90°左旋回
+ moter2.speed(-1);
+ //camera on
+
+
+
+}
+//気球試験の流れ
+
+
+準備5分+打ち上げ5分+落下1分=11分
+(準備時間とは電源を入れてから気球に搭載するまでにかかる時間のこと)
+着地判定 13分後(余裕をもって)
+パラシュート切り離し
+移動最初1000㎜直進
+開始地点のコーンを切り離す
+耕し、種をまき、土をかぶせ、水をまき200㎜進む
+ ドリルモータ ON
+ 種まき・水まきサーボモータ ON
+終了地点のコーンを切り離す
+100㎜直進
+90°左旋回
+200㎜直進
+90°左旋回
+300㎜直進
+90°旋回
+カメラON→画像通信開始
+カメラの映像送信→人間がPCで確認しコーンが見えなければ10㎝後退
+ボタン操作などで後退させるようにする
+(見えるまで繰り返す)
+確認出来たら終了
+
+
+
+手動用プログラムはシステムが動かなかったと起用の補助システムとして搭載したい//
+
+