Testing 1 blue pill
Dependencies: mbed mbed-rtos TextLCD
Diff: Interface/Interface.hpp
- Revision:
- 25:9751619fa030
- Parent:
- 23:07a368f2cdb1
- Child:
- 26:83550fc299aa
--- a/Interface/Interface.hpp Mon Feb 18 12:02:34 2019 +0000 +++ b/Interface/Interface.hpp Mon Feb 18 22:04:54 2019 +0000 @@ -3,6 +3,19 @@ #include "mbed.h" #include "STEPPER_MOTOR.hpp" //Include this to use the stepper motor + +#define Type_of_Rig 3 //Place 2 for coiling place 3 for twisting +#define Default_Coiling_Turns 20 +#define Default_Twisting_Turns 70 + +//Interrupt In for the button control to the interface +static InterruptIn button_up(D8); //D8//Increment Button +static InterruptIn button_down(A1); //A1//Decrement Button +static InterruptIn button_start(D9); //D9//START / STOP BUTTON +static InterruptIn button_funct(A3); //A3//Function Button +static InterruptIn button_select(A4);//A4//Select Button + + //Led Outputs //check the pin outs static DigitalOut Led_Select_Left(D2); static DigitalOut Led_Select_Right(D3); @@ -17,7 +30,7 @@ //Public member variables //Public Member Functions - INTERFACE(int Default_Turns); //Constructor + INTERFACE(); //Constructor ~INTERFACE();//Destructor void Interface_Init();//Set all values to 0 @@ -37,11 +50,12 @@ void Set_Twist_Stop(bool Twist_Stop); void Set_Anneal_Stop(bool Anneal_Stop); void Set_Test_Stop(bool Test_Stop); - void Set_Select(bool Select); + void Set_Select(int Select); void Set_Turns_Done(int Turns_Done); void Set_Turns_To_Do(int Turns_To_Do); void Set_Loop(int Loop); - void Set_Wait_Time(int Wait_Time); + void Set_On_Time(int On_Time); + void Set_Off_Time(int Off_Time); void Set_Duty_Cycle(int Duty_Cycle); void Set_Power_Time(float Power_Time); @@ -54,11 +68,12 @@ bool Get_Twist_Stop(); bool Get_Anneal_Stop(); bool Get_Test_Stop(); - bool Get_Select(); + int Get_Select(); int Get_Turns_Done(); int Get_Turns_To_Do(); int Get_Loop(); - int Get_Wait_Time(); + int Get_On_Time(); + int Get_Off_Time(); int Get_Duty_Cycle(); int Get_Power_Time(); @@ -78,11 +93,12 @@ bool _Anneal_Stop; bool _Test_Stop; - bool _Select; + int _Select; int _Turns_Done; int _Turns_Todo; int _Loop; - int _Wait_Time;//IN SECONDS + int _On_Time; + int _Off_Time;//IN SECONDS int _Duty_Cycle; int _Power_Time; @@ -101,7 +117,8 @@ Mutex _Turns_Done_mutex; Mutex _Turns_Todo_mutex; Mutex _Loop_mutex; - Mutex _Wait_Time_mutex;//IN SECONDS + Mutex _On_Time_mutex;//IN SECONDS + Mutex _Off_Time_mutex; Mutex _Duty_Cycle_mutex; Mutex _Power_Time_mutex; Mutex _Tendon_mutex;