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: HCSR04 SRF05 mbed
Diff: main.cpp
- Revision:
- 0:4ca3e247b86a
- Child:
- 1:60c79e942c98
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp Fri Jun 08 12:29:16 2018 +0000
@@ -0,0 +1,39 @@
+#include "mbed.h"
+#include "gyro.h"
+#include "Distance.h"
+Ticker tim;
+void data(int i)
+{
+ change(i);
+ //driveit();
+ }
+void ddd()
+{
+
+ if(started == true)
+ {
+ tim.detach();
+ gotime.start();
+ driveit(7.5);
+ turnL();
+ //M1=0.3;M2=0.3;
+ //wait(6.75);
+ //直走识别色块
+
+
+
+ //得到返回值 转角(定好三个函数)
+ // change(测量)+ driveit()
+ // 到达的判断 + change + driveit() 超声波
+
+ //driveit();
+
+ }
+ }
+
+int main()
+{
+ init_gyro();
+ tim.attach(&ddd,0.1);
+
+}
\ No newline at end of file