Plymouth ELEC351 Group T
/
ELEC351_Group_T
FINAL PROJECT isn't it
Fork of ELEC351 by
Diff: SETUP.hpp
- Revision:
- 53:71f59e195f06
- Parent:
- 52:99915f5240b2
- Child:
- 54:a4c5949707ca
--- a/SETUP.hpp Tue Jan 09 22:27:49 2018 +0000 +++ b/SETUP.hpp Mon May 07 15:44:34 2018 +0000 @@ -8,18 +8,20 @@ //Libraries and header includes #include "rtos.h" #include "LED.hpp" -#include "DATA.hpp" #include "LCD.hpp" #include "SERIAL.hpp" #include "TIME.hpp" -#include "NETWORK.hpp" -#include "FIFO.hpp" -#include "SD_CARD.hpp" #include "SERIAL_COMMANDS.hpp" -#include "SAMPLE.hpp" +#include "sample_hardware.hpp" #include "THREADS.hpp" #include "LED_LOGGING.hpp" +#include "STEPPER_MOTOR.hpp" +#include "SPI.hpp" +#include "Algorithm.hpp" +#include <iostream> +#include <bitset> +using namespace std; //Time definitions #define TimerInterval 15 //This is in seconds #define SW1_SW2_Timeout_Time 15 //This is in seconds @@ -28,18 +30,34 @@ Timeout SW1TimeOut; //Used to prevent lockups Timeout SW2TimeOut; //Used to prevent lockups +LED Red_led(PE_15); +LED Green_led(PB_11); + //Forward Declarations of functions void Serial_Comms(); -void Sample_signal_set(); void Console_Output_ISR(); void Serial_Comms_Data_Get(); -void Sampling_ISR(); void Console_Output_ISR(); - +void Rotate_Steps(); void SW1TimeOutHandler(); void SW1FallingEdge(); void SW2TimeOutHandler(); void SW2FallingEdge(); +//Object creations +static STEPPER_MOTOR STEPPER_MOTOR_1(D0,D1);//step then direction +static STEPPER_MOTOR STEPPER_MOTOR_2(D2,D3);//step then direction +static STEPPER_MOTOR STEPPER_MOTOR_3(D4,D5);//step then direction +static STEPPER_MOTOR STEPPER_MOTOR_4(D6,D7);//step then direction +static STEPPER_MOTOR STEPPER_MOTOR_5(D8,D9);//step then direction +static STEPPER_MOTOR STEPPER_MOTOR_6(D10,D11);//step then direction + +//Sets up the sides of the cube +static SIDE SIDE1(); +static SIDE SIDE2(); +static SIDE SIDE3(); +static SIDE SIDE4(); +static SIDE SIDE5(); +static SIDE SIDE6(); #endif \ No newline at end of file