動くといいな

Dependencies:   Motor_NIT_Nagaoka_College PID Servo QEI SoftPWM mbed HBridge

Files at this revision

API Documentation at this revision

Comitter:
WAT34
Date:
Fri Oct 09 07:25:39 2015 +0000
Parent:
16:6b8766c77d29
Commit message:
new library

Changed in this revision

HBridge.lib Show annotated file Show diff for this revision Revisions of this file
Servo.lib Show annotated file Show diff for this revision Revisions of this file
main.cpp Show annotated file Show diff for this revision Revisions of this file
diff -r 6b8766c77d29 -r 7703c9baf008 HBridge.lib
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/HBridge.lib	Fri Oct 09 07:25:39 2015 +0000
@@ -0,0 +1,1 @@
+https://developer.mbed.org/users/WAT34/code/HBridge/#ef9cf0926575
diff -r 6b8766c77d29 -r 7703c9baf008 Servo.lib
--- a/Servo.lib	Mon Oct 05 12:02:38 2015 +0000
+++ b/Servo.lib	Fri Oct 09 07:25:39 2015 +0000
@@ -1,1 +1,1 @@
-http://mbed.org/users/simon/code/Servo/#b19775b9aa95
+https://developer.mbed.org/users/WAT34/code/Servo/#b19775b9aa95
diff -r 6b8766c77d29 -r 7703c9baf008 main.cpp
--- a/main.cpp	Mon Oct 05 12:02:38 2015 +0000
+++ b/main.cpp	Fri Oct 09 07:25:39 2015 +0000
@@ -4,6 +4,7 @@
 #include "PID.h"
 #include "QEI.h"
 #include "Servo.h"
+#include "HBridge.h"
 #define RATE 0.05
 #define shoottime 0.5
 BusOut air(p5,p6);
@@ -18,14 +19,15 @@
 BusOut led(p8,p13,p14,p24);
 Motor ot(p23,p19,p20);
 QEI sensort(p29,p30,NC,624);
-Motor sup1(p21,p15,p16);
-Motor sup2(p22,p17,p18);
+HBridge sup1(p21,p15,p16);
+HBridge sup2(p22,p17,p18);
 DigitalIn limit1(p11,PullUp);
 DigitalIn limit2(p12,PullUp);
 Timeout ai;
 char read;
 int Rs = 0,Ls = 0,d=0,su1 = 0,su2 = 0;
 int i = 0;
+
 void supply()
 {
     if(d%2){