Artnet to DMX
Dependencies: mbed DMX TextLCD mbed-rtos
Art-NET to DMX converter.
Read Art-NET and process the data so it can be send by 3 XLR3 outputs for DMX. With a 4x20 display you can choose some options. For example what universe you would like on what output.
This is a project we make as our final project of our 2nd year of university. We study Electronics-ICT / Embedded ICT.
We chose for this amazing platform (MBED LPC1768) because it has al the interfaces and pins we need.
Settings.h@30:51a4370a88bf, 2016-05-08 (annotated)
- Committer:
- Ayrton_L
- Date:
- Sun May 08 20:11:07 2016 +0000
- Revision:
- 30:51a4370a88bf
- Parent:
- 29:4a11f841dae1
- Child:
- 31:f7f44632c3cd
Last State
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
Ayrton_L | 28:4b327f1cb9cb | 1 | #ifndef SETTINGS_H |
Ayrton_L | 28:4b327f1cb9cb | 2 | #define SETTINGs_H |
Ayrton_L | 28:4b327f1cb9cb | 3 | #include "mbed.h" |
Ayrton_L | 28:4b327f1cb9cb | 4 | class Settings |
Ayrton_L | 28:4b327f1cb9cb | 5 | { |
Ayrton_L | 28:4b327f1cb9cb | 6 | public: |
Ayrton_L | 28:4b327f1cb9cb | 7 | Settings(); |
Ayrton_L | 28:4b327f1cb9cb | 8 | ~Settings(); |
Ayrton_L | 28:4b327f1cb9cb | 9 | |
Ayrton_L | 29:4a11f841dae1 | 10 | void V_SetInterrupt(bool B_Interrupt); |
Ayrton_L | 29:4a11f841dae1 | 11 | void V_SetLeft(bool B_Left); |
Ayrton_L | 29:4a11f841dae1 | 12 | void V_SetRight(bool B_Right); |
Ayrton_L | 29:4a11f841dae1 | 13 | void V_SetDirection(uint32_t I32_Direction); |
Ayrton_L | 29:4a11f841dae1 | 14 | void V_SetLine(uint32_t I32_Line); |
Ayrton_L | 29:4a11f841dae1 | 15 | void V_SetInMenu(bool B_Menu); |
Ayrton_L | 29:4a11f841dae1 | 16 | void V_SetOK(bool B_OK); |
Ayrton_L | 30:51a4370a88bf | 17 | void V_SetCounter(uint32_t I32_LineCounter); |
Ayrton_L | 30:51a4370a88bf | 18 | void V_SetOutput1(uint32_t I32_Universe); |
Ayrton_L | 30:51a4370a88bf | 19 | void V_SetOutput2(uint32_t I32_Universe); |
Ayrton_L | 30:51a4370a88bf | 20 | void V_SetOutput3(uint32_t I32_Universe); |
Ayrton_L | 29:4a11f841dae1 | 21 | |
Ayrton_L | 29:4a11f841dae1 | 22 | bool B_GetInterrupt(); |
Ayrton_L | 29:4a11f841dae1 | 23 | bool B_GetLeft(); |
Ayrton_L | 29:4a11f841dae1 | 24 | bool B_GetRight(); |
Ayrton_L | 29:4a11f841dae1 | 25 | bool B_GetMenu(); |
Ayrton_L | 29:4a11f841dae1 | 26 | bool B_GetOK(); |
Ayrton_L | 30:51a4370a88bf | 27 | |
Ayrton_L | 29:4a11f841dae1 | 28 | uint32_t I32_GetDirection(); |
Ayrton_L | 30:51a4370a88bf | 29 | uint32_t I32_GetLine(); |
Ayrton_L | 30:51a4370a88bf | 30 | uint32_t I32_GetOutput1(); |
Ayrton_L | 30:51a4370a88bf | 31 | uint32_t I32_GetOutput2(); |
Ayrton_L | 30:51a4370a88bf | 32 | uint32_t I32_GetOutput3(); |
Ayrton_L | 28:4b327f1cb9cb | 33 | |
Ayrton_L | 28:4b327f1cb9cb | 34 | private: |
Ayrton_L | 30:51a4370a88bf | 35 | uint32_t I32_m_Output1; |
Ayrton_L | 30:51a4370a88bf | 36 | uint32_t I32_m_Output2; |
Ayrton_L | 30:51a4370a88bf | 37 | uint32_t I32_m_Output3; |
Ayrton_L | 29:4a11f841dae1 | 38 | uint32_t I32_m_Direction; |
Ayrton_L | 29:4a11f841dae1 | 39 | uint32_t I32_m_Line; |
Ayrton_L | 29:4a11f841dae1 | 40 | bool B_m_Interrupt; |
Ayrton_L | 29:4a11f841dae1 | 41 | bool B_m_Left; |
Ayrton_L | 29:4a11f841dae1 | 42 | bool B_m_Right; |
Ayrton_L | 29:4a11f841dae1 | 43 | bool B_m_Menu; |
Ayrton_L | 29:4a11f841dae1 | 44 | bool B_m_OK; |
Ayrton_L | 28:4b327f1cb9cb | 45 | }; |
Ayrton_L | 28:4b327f1cb9cb | 46 | #endif |
Ayrton_L | 29:4a11f841dae1 | 47 | |
Ayrton_L | 28:4b327f1cb9cb | 48 | Settings::Settings() |
Ayrton_L | 28:4b327f1cb9cb | 49 | { |
Ayrton_L | 29:4a11f841dae1 | 50 | B_m_Interrupt = false; |
Ayrton_L | 29:4a11f841dae1 | 51 | B_m_Left = false; |
Ayrton_L | 29:4a11f841dae1 | 52 | B_m_Right = false; |
Ayrton_L | 29:4a11f841dae1 | 53 | B_m_Menu = false; |
Ayrton_L | 29:4a11f841dae1 | 54 | B_m_OK = false; |
Ayrton_L | 29:4a11f841dae1 | 55 | I32_m_Direction = 0; |
Ayrton_L | 29:4a11f841dae1 | 56 | I32_m_Line = 0; |
Ayrton_L | 30:51a4370a88bf | 57 | I32_m_Output1 = 0; |
Ayrton_L | 30:51a4370a88bf | 58 | I32_m_Output2 = 0; |
Ayrton_L | 30:51a4370a88bf | 59 | I32_m_Output3 = 0; |
Ayrton_L | 28:4b327f1cb9cb | 60 | } |
Ayrton_L | 29:4a11f841dae1 | 61 | |
Ayrton_L | 28:4b327f1cb9cb | 62 | Settings::~Settings() |
Ayrton_L | 28:4b327f1cb9cb | 63 | { |
Ayrton_L | 29:4a11f841dae1 | 64 | delete &B_m_Interrupt; |
Ayrton_L | 29:4a11f841dae1 | 65 | delete &B_m_Right; |
Ayrton_L | 29:4a11f841dae1 | 66 | delete &B_m_Left; |
Ayrton_L | 29:4a11f841dae1 | 67 | delete &B_m_OK; |
Ayrton_L | 29:4a11f841dae1 | 68 | delete &B_m_Menu; |
Ayrton_L | 29:4a11f841dae1 | 69 | delete &I32_m_Direction; |
Ayrton_L | 29:4a11f841dae1 | 70 | delete &I32_m_Line; |
Ayrton_L | 30:51a4370a88bf | 71 | delete &I32_m_Output1; |
Ayrton_L | 30:51a4370a88bf | 72 | delete &I32_m_Output2; |
Ayrton_L | 30:51a4370a88bf | 73 | delete &I32_m_Output3; |
Ayrton_L | 30:51a4370a88bf | 74 | } |
Ayrton_L | 30:51a4370a88bf | 75 | |
Ayrton_L | 30:51a4370a88bf | 76 | void Settings::V_SetOutput1(uint32_t I32_Universe) |
Ayrton_L | 30:51a4370a88bf | 77 | { |
Ayrton_L | 30:51a4370a88bf | 78 | I32_m_Output1 = I32_Universe; |
Ayrton_L | 30:51a4370a88bf | 79 | } |
Ayrton_L | 30:51a4370a88bf | 80 | |
Ayrton_L | 30:51a4370a88bf | 81 | void Settings::V_SetOutput2(uint32_t I32_Universe) |
Ayrton_L | 30:51a4370a88bf | 82 | { |
Ayrton_L | 30:51a4370a88bf | 83 | I32_m_Output2 = I32_Universe; |
Ayrton_L | 30:51a4370a88bf | 84 | } |
Ayrton_L | 30:51a4370a88bf | 85 | |
Ayrton_L | 30:51a4370a88bf | 86 | void Settings::V_SetOutput3(uint32_t I32_Universe) |
Ayrton_L | 30:51a4370a88bf | 87 | { |
Ayrton_L | 30:51a4370a88bf | 88 | I32_m_Output3 = I32_Universe; |
Ayrton_L | 29:4a11f841dae1 | 89 | } |
Ayrton_L | 29:4a11f841dae1 | 90 | |
Ayrton_L | 29:4a11f841dae1 | 91 | void Settings::V_SetOK(bool B_OK) |
Ayrton_L | 29:4a11f841dae1 | 92 | { |
Ayrton_L | 29:4a11f841dae1 | 93 | B_m_OK = B_OK; |
Ayrton_L | 29:4a11f841dae1 | 94 | } |
Ayrton_L | 29:4a11f841dae1 | 95 | |
Ayrton_L | 29:4a11f841dae1 | 96 | void Settings::V_SetInMenu(bool B_Menu) |
Ayrton_L | 29:4a11f841dae1 | 97 | { |
Ayrton_L | 29:4a11f841dae1 | 98 | B_m_Menu = B_Menu; |
Ayrton_L | 29:4a11f841dae1 | 99 | } |
Ayrton_L | 29:4a11f841dae1 | 100 | |
Ayrton_L | 30:51a4370a88bf | 101 | void Settings::V_SetCounter(uint32_t I32_LineCounter) |
Ayrton_L | 29:4a11f841dae1 | 102 | { |
Ayrton_L | 30:51a4370a88bf | 103 | I32_m_Line = I32_LineCounter; |
Ayrton_L | 29:4a11f841dae1 | 104 | } |
Ayrton_L | 29:4a11f841dae1 | 105 | |
Ayrton_L | 29:4a11f841dae1 | 106 | void Settings::V_SetInterrupt(bool B_Interrupt) |
Ayrton_L | 29:4a11f841dae1 | 107 | { |
Ayrton_L | 29:4a11f841dae1 | 108 | this->B_m_Interrupt = B_Interrupt; |
Ayrton_L | 29:4a11f841dae1 | 109 | } |
Ayrton_L | 29:4a11f841dae1 | 110 | |
Ayrton_L | 29:4a11f841dae1 | 111 | void Settings::V_SetLeft(bool B_Left) |
Ayrton_L | 29:4a11f841dae1 | 112 | { |
Ayrton_L | 29:4a11f841dae1 | 113 | B_m_Left = B_Left; |
Ayrton_L | 29:4a11f841dae1 | 114 | } |
Ayrton_L | 29:4a11f841dae1 | 115 | |
Ayrton_L | 29:4a11f841dae1 | 116 | void Settings::V_SetRight(bool B_Right) |
Ayrton_L | 29:4a11f841dae1 | 117 | { |
Ayrton_L | 29:4a11f841dae1 | 118 | B_m_Right = B_Right; |
Ayrton_L | 29:4a11f841dae1 | 119 | } |
Ayrton_L | 29:4a11f841dae1 | 120 | |
Ayrton_L | 29:4a11f841dae1 | 121 | void Settings::V_SetDirection(uint32_t I32_Direction) |
Ayrton_L | 29:4a11f841dae1 | 122 | { |
Ayrton_L | 29:4a11f841dae1 | 123 | I32_m_Direction = I32_Direction; |
Ayrton_L | 29:4a11f841dae1 | 124 | } |
Ayrton_L | 29:4a11f841dae1 | 125 | |
Ayrton_L | 29:4a11f841dae1 | 126 | bool Settings::B_GetOK() |
Ayrton_L | 29:4a11f841dae1 | 127 | { |
Ayrton_L | 29:4a11f841dae1 | 128 | return B_m_OK; |
Ayrton_L | 29:4a11f841dae1 | 129 | } |
Ayrton_L | 29:4a11f841dae1 | 130 | |
Ayrton_L | 29:4a11f841dae1 | 131 | bool Settings::B_GetMenu() |
Ayrton_L | 29:4a11f841dae1 | 132 | { |
Ayrton_L | 29:4a11f841dae1 | 133 | return B_m_Menu; |
Ayrton_L | 29:4a11f841dae1 | 134 | } |
Ayrton_L | 29:4a11f841dae1 | 135 | |
Ayrton_L | 29:4a11f841dae1 | 136 | bool Settings::B_GetLeft() |
Ayrton_L | 29:4a11f841dae1 | 137 | { |
Ayrton_L | 29:4a11f841dae1 | 138 | return B_m_Left; |
Ayrton_L | 29:4a11f841dae1 | 139 | } |
Ayrton_L | 29:4a11f841dae1 | 140 | |
Ayrton_L | 29:4a11f841dae1 | 141 | bool Settings::B_GetRight() |
Ayrton_L | 29:4a11f841dae1 | 142 | { |
Ayrton_L | 29:4a11f841dae1 | 143 | return B_m_Right; |
Ayrton_L | 29:4a11f841dae1 | 144 | } |
Ayrton_L | 29:4a11f841dae1 | 145 | |
Ayrton_L | 29:4a11f841dae1 | 146 | bool Settings::B_GetInterrupt() |
Ayrton_L | 29:4a11f841dae1 | 147 | { |
Ayrton_L | 29:4a11f841dae1 | 148 | return B_m_Interrupt; |
Ayrton_L | 29:4a11f841dae1 | 149 | } |
Ayrton_L | 29:4a11f841dae1 | 150 | |
Ayrton_L | 29:4a11f841dae1 | 151 | uint32_t Settings::I32_GetDirection() |
Ayrton_L | 29:4a11f841dae1 | 152 | { |
Ayrton_L | 29:4a11f841dae1 | 153 | return I32_m_Direction; |
Ayrton_L | 29:4a11f841dae1 | 154 | } |
Ayrton_L | 29:4a11f841dae1 | 155 | |
Ayrton_L | 29:4a11f841dae1 | 156 | uint32_t Settings::I32_GetLine() |
Ayrton_L | 29:4a11f841dae1 | 157 | { |
Ayrton_L | 29:4a11f841dae1 | 158 | return I32_m_Line; |
Ayrton_L | 29:4a11f841dae1 | 159 | } |
Ayrton_L | 29:4a11f841dae1 | 160 | |
Ayrton_L | 30:51a4370a88bf | 161 | uint32_t Settings::I32_GetOutput1() |
Ayrton_L | 29:4a11f841dae1 | 162 | { |
Ayrton_L | 30:51a4370a88bf | 163 | return I32_m_Output1; |
Ayrton_L | 28:4b327f1cb9cb | 164 | } |
Ayrton_L | 28:4b327f1cb9cb | 165 | |
Ayrton_L | 30:51a4370a88bf | 166 | uint32_t Settings::I32_GetOutput2() |
Ayrton_L | 28:4b327f1cb9cb | 167 | { |
Ayrton_L | 30:51a4370a88bf | 168 | return I32_m_Output2; |
Ayrton_L | 30:51a4370a88bf | 169 | } |
Ayrton_L | 30:51a4370a88bf | 170 | |
Ayrton_L | 30:51a4370a88bf | 171 | uint32_t Settings::I32_GetOutput3() |
Ayrton_L | 30:51a4370a88bf | 172 | { |
Ayrton_L | 30:51a4370a88bf | 173 | return I32_m_Output3; |
Ayrton_L | 28:4b327f1cb9cb | 174 | } |