Testing 1 blue pill
Dependencies: mbed mbed-rtos TextLCD
Diff: Interface/Interface.hpp
- Revision:
- 16:9f98ec0ededb
- Child:
- 17:68b3fdabe4c5
diff -r 7cf5595ed1b1 -r 9f98ec0ededb Interface/Interface.hpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Interface/Interface.hpp Mon Feb 11 22:03:47 2019 +0000 @@ -0,0 +1,72 @@ +#ifndef INTERFACE_HPP//Header Guards Prevents Multiple includes +#define INTERFACE_HPP + +#include "mbed.h" +#include "STEPPER_MOTOR.hpp" + +static STEPPER_MOTOR STEPPER_MOTOR_1(D15,D14,D13,D12); + +class INTERFACE //This creates a class called Led +{ +public: + //Public member variables + + //Public Member Functions + INTERFACE(); //Constructor + ~INTERFACE(); //Destructor + + void Interface_Init(); + void Up(); + void Down(); + void Start_Stop(); + void Function(); + void Select(); + void Interface_main(); + + //Setters + + void Set_No_Of_Rotations(int Rotations); + void Set_Function(int Function); + void Set_Twist_Go(bool Twist_Go); + void Set_Anneal_Go(bool Anneal_Go); + void Set_Test_Go(bool Test_Go); + void Set_Select(bool 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_Duty_Cycle(int Duty_Cycle); + void Set_Power_Time(float Power_Time); + + //Getters + int Get_No_Of_Rotations(); + int Get_Function(); + bool Get_Twist_Go(); + bool Get_Anneal_Go(); + bool Get_Test_Go(); + bool Get_Select(); + int Get_Turns_Done(); + int Get_Turns_To_Do(); + int Get_Loop(); + int Get_Wait_Time(); + int Get_Duty_Cycle(); + int Get_Power_Time(); + +private: + //Private member variables to prevent them being accessed externally + + int _No_Of_Rotations; + int _Function; + bool _Twist_Go; + bool _Anneal_Go; + bool _Test_Go; + bool _Select; + int _Turns_Done; + int _Turns_Todo; + int _Loop; + int _Wait_Time;//IN SECONDS + int _Duty_Cycle; + int _Power_Time; + +}; +#endif//INTERFACE_HPP \ No newline at end of file