test 03/05/2019

Dependencies:   mbed QEI StepperTB TEST001

Files at this revision

API Documentation at this revision

Comitter:
csggreen
Date:
Tue Mar 05 12:53:08 2019 +0000
Child:
1:d7aa1591fbc2
Commit message:
TEAT LOW

Changed in this revision

AX12.lib Show annotated file Show diff for this revision Revisions of this file
Get_Control.h Show annotated file Show diff for this revision Revisions of this file
QEI.lib Show annotated file Show diff for this revision Revisions of this file
StepperTB.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
mbed.bld Show annotated file Show diff for this revision Revisions of this file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/AX12.lib	Tue Mar 05 12:53:08 2019 +0000
@@ -0,0 +1,1 @@
+https://os.mbed.com/users/chris/code/AX12/#e30defb9581f
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Get_Control.h	Tue Mar 05 12:53:08 2019 +0000
@@ -0,0 +1,80 @@
+#include "mbed.h"
+#include "AX12.h"
+#include "StepperTB.h"
+#include "QEI.h"
+
+Serial pc(PA_9, PB_6);
+AX12 myax12 (PA_11, PA_12, 1);
+
+//motor set 1
+DigitalOut ENA_1(PC_8);
+PwmOut DIR_1(PC_6);
+DigitalOut PUL_1(PC_5);
+
+//motor set 2
+DigitalOut ENA_2(PB_2);
+PwmOut DIR_2(PB_1);
+DigitalOut PUL_2(PB_15);
+
+//motor set 3
+DigitalOut ENA_3(PC_14);
+PwmOut DIR_3(PC_13);
+DigitalOut PUL_3(PC_4);
+
+//Buzzer
+DigitalOut Buzzer(PB_12);
+
+//Vacum
+DigitalOut VACUM(PA_3);
+
+//Limit Switch
+DigitalOut LSwitch_1(PA_2);
+DigitalOut LSwitch_2(PA_10);
+DigitalOut LSwitch_3(PB_3);
+DigitalOut LSwitch_4(PB_4);
+DigitalOut LSwitch_5(PB_5);
+DigitalOut LSwitch_6(PB_10);
+
+
+//Encoder interrupt
+QEI EncoderCH_1 (PC_0, PC_1, NC, 624);
+QEI EncoderCH_2 (PB_0, PA_4, NC, 624);
+QEI EncoderCH_3 (PA_1, PA_0, NC, 624);
+
+////////////////////////////////////////////////////////
+////////////        parameter_drive       /////////////
+////////////////////////////////////////////////////////
+long time_corexy = 0;
+long long time_z=0;
+long counter1=0;      /// counter of encoder in each motor
+long counter2=0;
+long counter3=0;
+long CS1 =0; 
+long CS2 =0;  
+
+char direct_motor1=0; /// direct_motor=0 ---> count ++ ,direct_motor=1 ---> count --
+char direct_motor2=0;
+char direct_motor3=0;
+    
+int drive_axis = 0 ; /// drive_axis = 0 --> drive motor1 joint 1
+                     /// drive_axis = 1 --> drive motor2 joint 2
+                     /// drive_axis = 2 --> drive motor3 joint 3
+
+
+float u_j1,u_j2,u_j3 ;
+/////////////////                   /////////////////
+/////////////////    set_ZERO       /////////////////
+/////////////////                   /////////////////
+void setzero_posi(){
+    }
+    
+/////////////////                  /////////////////
+/////////////////    drive_motor   /////////////////
+/////////////////                  /////////////////
+void drive_motor_1(long u_j1){
+    }
+void drive_motor_2(long u_j2){
+    }
+void drive_motor_3(long u_j3){
+    }
+    
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/QEI.lib	Tue Mar 05 12:53:08 2019 +0000
@@ -0,0 +1,1 @@
+https://os.mbed.com/users/aberk/code/QEI/#5c2ad81551aa
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/StepperTB.lib	Tue Mar 05 12:53:08 2019 +0000
@@ -0,0 +1,1 @@
+https://os.mbed.com/teams/Dagozilla-to-RoboCup/code/StepperTB/#787cee5a8dad
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Tue Mar 05 12:53:08 2019 +0000
@@ -0,0 +1,8 @@
+#include "mbed.h"
+#include "Get_Control.h"
+
+int main() {
+    while(1) {
+        drive_motor_1(200);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Tue Mar 05 12:53:08 2019 +0000
@@ -0,0 +1,1 @@
+https://os.mbed.com/users/mbed_official/code/mbed/builds/3a7713b1edbc
\ No newline at end of file