Thomas Morris
/
PROJ324_Final
Proj 324 Final
Fork of ELEC351_Group_T by
SETUP.hpp@56:bc5345bc6650, 2018-07-16 (annotated)
- Committer:
- thomasmorris
- Date:
- Mon Jul 16 10:51:47 2018 +0000
- Revision:
- 56:bc5345bc6650
- Parent:
- 55:e0e684531825
- Child:
- 57:aba1296e51b1
Moves added to serial;
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
thomasmorris | 52:99915f5240b2 | 1 | /* |
thomasmorris | 52:99915f5240b2 | 2 | Setup file for the main |
thomasmorris | 52:99915f5240b2 | 3 | */ |
thomasmorris | 52:99915f5240b2 | 4 | |
thomasmorris | 52:99915f5240b2 | 5 | #ifndef SETUP_HPP//Header Guards Prevents Multiple includes |
thomasmorris | 52:99915f5240b2 | 6 | #define SETUP_HPP |
thomasmorris | 52:99915f5240b2 | 7 | |
thomasmorris | 52:99915f5240b2 | 8 | //Libraries and header includes |
thomasmorris | 25:36699ed589ab | 9 | #include "rtos.h" |
thomasmorris | 25:36699ed589ab | 10 | #include "LED.hpp" |
thomasmorris | 25:36699ed589ab | 11 | #include "SERIAL.hpp" |
thomasmorris | 30:4cde05cc7c4f | 12 | #include "TIME.hpp" |
thomasmorris | 52:99915f5240b2 | 13 | #include "SERIAL_COMMANDS.hpp" |
thomasmorris | 52:99915f5240b2 | 14 | #include "THREADS.hpp" |
thomasmorris | 52:99915f5240b2 | 15 | #include "LED_LOGGING.hpp" |
thomasmorris | 53:71f59e195f06 | 16 | #include "STEPPER_MOTOR.hpp" |
thomasmorris | 53:71f59e195f06 | 17 | #include "SPI.hpp" |
thomasmorris | 56:bc5345bc6650 | 18 | #include "ALGORITHM.hpp" |
thomasmorris | 53:71f59e195f06 | 19 | #include <iostream> |
thomasmorris | 53:71f59e195f06 | 20 | #include <bitset> |
thomasmorris | 38:8d86e0d8a816 | 21 | |
thomasmorris | 53:71f59e195f06 | 22 | using namespace std; |
thomasmorris | 41:859b5e1e3d9a | 23 | //Time definitions |
thomasmorris | 41:859b5e1e3d9a | 24 | |
thomasmorris | 41:859b5e1e3d9a | 25 | |
thomasmorris | 53:71f59e195f06 | 26 | LED Red_led(PE_15); |
thomasmorris | 53:71f59e195f06 | 27 | LED Green_led(PB_11); |
thomasmorris | 53:71f59e195f06 | 28 | |
thomasmorris | 41:859b5e1e3d9a | 29 | //Forward Declarations of functions |
thomasmorris | 25:36699ed589ab | 30 | |
thomasmorris | 25:36699ed589ab | 31 | void Serial_Comms(); |
chills | 26:78f5e454e59f | 32 | void Console_Output_ISR(); |
thomasmorris | 41:859b5e1e3d9a | 33 | void Serial_Comms_Data_Get(); |
thomasmorris | 41:859b5e1e3d9a | 34 | void Console_Output_ISR(); |
thomasmorris | 53:71f59e195f06 | 35 | void Rotate_Steps(); |
thomasmorris | 56:bc5345bc6650 | 36 | |
thomasmorris | 53:71f59e195f06 | 37 | //Object creations |
thomasmorris | 53:71f59e195f06 | 38 | static STEPPER_MOTOR STEPPER_MOTOR_1(D0,D1);//step then direction |
thomasmorris | 53:71f59e195f06 | 39 | static STEPPER_MOTOR STEPPER_MOTOR_2(D2,D3);//step then direction |
thomasmorris | 53:71f59e195f06 | 40 | static STEPPER_MOTOR STEPPER_MOTOR_3(D4,D5);//step then direction |
thomasmorris | 53:71f59e195f06 | 41 | static STEPPER_MOTOR STEPPER_MOTOR_4(D6,D7);//step then direction |
thomasmorris | 53:71f59e195f06 | 42 | static STEPPER_MOTOR STEPPER_MOTOR_5(D8,D9);//step then direction |
thomasmorris | 53:71f59e195f06 | 43 | static STEPPER_MOTOR STEPPER_MOTOR_6(D10,D11);//step then direction |
thomasmorris | 53:71f59e195f06 | 44 | |
thomasmorris | 53:71f59e195f06 | 45 | //Sets up the sides of the cube |
thomasmorris | 53:71f59e195f06 | 46 | static SIDE SIDE1(); |
thomasmorris | 53:71f59e195f06 | 47 | static SIDE SIDE2(); |
thomasmorris | 53:71f59e195f06 | 48 | static SIDE SIDE3(); |
thomasmorris | 53:71f59e195f06 | 49 | static SIDE SIDE4(); |
thomasmorris | 53:71f59e195f06 | 50 | static SIDE SIDE5(); |
thomasmorris | 53:71f59e195f06 | 51 | static SIDE SIDE6(); |
thomasmorris | 41:859b5e1e3d9a | 52 | |
thomasmorris | 55:e0e684531825 | 53 | |
thomasmorris | 54:a4c5949707ca | 54 | /* |
thomasmorris | 55:e0e684531825 | 55 | 0 White |
thomasmorris | 55:e0e684531825 | 56 | 1 Orange |
thomasmorris | 55:e0e684531825 | 57 | 2 Blue |
thomasmorris | 55:e0e684531825 | 58 | 3 Red |
thomasmorris | 55:e0e684531825 | 59 | 4 Green |
thomasmorris | 55:e0e684531825 | 60 | 5 Yellow |
thomasmorris | 54:a4c5949707ca | 61 | These are the faces of the cube then there are the 3x3 cubelets within each face |
thomasmorris | 54:a4c5949707ca | 62 | */ |
thomasmorris | 54:a4c5949707ca | 63 | |
thomasmorris | 25:36699ed589ab | 64 | #endif |