Dependencies:   mbed DMX TextLCD mbed-rtos

/media/uploads/Ayrton_L/dmx.png

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.

Committer:
Ayrton_L
Date:
Mon May 23 17:39:39 2016 +0000
Revision:
36:dba7a0094213
Parent:
31:f7f44632c3cd
Menu fixed

Who changed what in which revision?

UserRevisionLine numberNew 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_SetLeft(bool B_Left);
Ayrton_L 29:4a11f841dae1 11 void V_SetRight(bool B_Right);
Ayrton_L 29:4a11f841dae1 12 void V_SetLine(uint32_t I32_Line);
Ayrton_L 36:dba7a0094213 13 void V_SetOldLine(uint32_t I32_OldLine);
Ayrton_L 29:4a11f841dae1 14 void V_SetOK(bool B_OK);
Ayrton_L 36:dba7a0094213 15 //void V_SetCounter(uint32_t I32_LineCounter);
Ayrton_L 30:51a4370a88bf 16 void V_SetOutput1(uint32_t I32_Universe);
Ayrton_L 30:51a4370a88bf 17 void V_SetOutput2(uint32_t I32_Universe);
Ayrton_L 30:51a4370a88bf 18 void V_SetOutput3(uint32_t I32_Universe);
Ayrton_L 36:dba7a0094213 19 void V_SetMenu(bool B_Menu);
Ayrton_L 29:4a11f841dae1 20
Ayrton_L 29:4a11f841dae1 21 bool B_GetLeft();
Ayrton_L 29:4a11f841dae1 22 bool B_GetRight();
Ayrton_L 36:dba7a0094213 23 bool B_GetOK();
Ayrton_L 29:4a11f841dae1 24 bool B_GetMenu();
Ayrton_L 30:51a4370a88bf 25
Ayrton_L 30:51a4370a88bf 26 uint32_t I32_GetLine();
Ayrton_L 30:51a4370a88bf 27 uint32_t I32_GetOutput1();
Ayrton_L 30:51a4370a88bf 28 uint32_t I32_GetOutput2();
Ayrton_L 30:51a4370a88bf 29 uint32_t I32_GetOutput3();
Ayrton_L 36:dba7a0094213 30 uint32_t I32_GetOldLine();
Ayrton_L 28:4b327f1cb9cb 31
Ayrton_L 28:4b327f1cb9cb 32 private:
Ayrton_L 30:51a4370a88bf 33 uint32_t I32_m_Output1;
Ayrton_L 30:51a4370a88bf 34 uint32_t I32_m_Output2;
Ayrton_L 30:51a4370a88bf 35 uint32_t I32_m_Output3;
Ayrton_L 29:4a11f841dae1 36 uint32_t I32_m_Line;
Ayrton_L 36:dba7a0094213 37 uint32_t I32_m_OldLine;
Ayrton_L 29:4a11f841dae1 38 bool B_m_Left;
Ayrton_L 29:4a11f841dae1 39 bool B_m_Right;
Ayrton_L 36:dba7a0094213 40 bool B_m_OK;
Ayrton_L 29:4a11f841dae1 41 bool B_m_Menu;
Ayrton_L 28:4b327f1cb9cb 42 };
Ayrton_L 28:4b327f1cb9cb 43 #endif
Ayrton_L 29:4a11f841dae1 44
Ayrton_L 28:4b327f1cb9cb 45 Settings::Settings()
Ayrton_L 28:4b327f1cb9cb 46 {
Ayrton_L 29:4a11f841dae1 47 B_m_Left = false;
Ayrton_L 29:4a11f841dae1 48 B_m_Right = false;
Ayrton_L 36:dba7a0094213 49 B_m_OK = false;
Ayrton_L 29:4a11f841dae1 50 B_m_Menu = false;
Ayrton_L 29:4a11f841dae1 51 I32_m_Line = 0;
Ayrton_L 36:dba7a0094213 52 I32_m_OldLine = 0;
Ayrton_L 30:51a4370a88bf 53 I32_m_Output1 = 0;
Ayrton_L 30:51a4370a88bf 54 I32_m_Output2 = 0;
Ayrton_L 30:51a4370a88bf 55 I32_m_Output3 = 0;
Ayrton_L 28:4b327f1cb9cb 56 }
Ayrton_L 29:4a11f841dae1 57
Ayrton_L 28:4b327f1cb9cb 58 Settings::~Settings()
Ayrton_L 28:4b327f1cb9cb 59 {
Ayrton_L 29:4a11f841dae1 60 delete &B_m_Right;
Ayrton_L 29:4a11f841dae1 61 delete &B_m_Left;
Ayrton_L 29:4a11f841dae1 62 delete &B_m_OK;
Ayrton_L 36:dba7a0094213 63 delete &B_m_Menu;
Ayrton_L 29:4a11f841dae1 64 delete &I32_m_Line;
Ayrton_L 30:51a4370a88bf 65 delete &I32_m_Output1;
Ayrton_L 30:51a4370a88bf 66 delete &I32_m_Output2;
Ayrton_L 30:51a4370a88bf 67 delete &I32_m_Output3;
Ayrton_L 36:dba7a0094213 68 delete &I32_m_OldLine;
Ayrton_L 36:dba7a0094213 69 }
Ayrton_L 36:dba7a0094213 70
Ayrton_L 36:dba7a0094213 71 void Settings::V_SetLine(uint32_t I32_Line)
Ayrton_L 36:dba7a0094213 72 {
Ayrton_L 36:dba7a0094213 73 I32_m_Line = I32_Line;
Ayrton_L 36:dba7a0094213 74 }
Ayrton_L 36:dba7a0094213 75
Ayrton_L 36:dba7a0094213 76 void Settings::V_SetMenu(bool B_Menu)
Ayrton_L 36:dba7a0094213 77 {
Ayrton_L 36:dba7a0094213 78 B_m_Menu = B_Menu;
Ayrton_L 30:51a4370a88bf 79 }
Ayrton_L 30:51a4370a88bf 80
Ayrton_L 30:51a4370a88bf 81 void Settings::V_SetOutput1(uint32_t I32_Universe)
Ayrton_L 30:51a4370a88bf 82 {
Ayrton_L 30:51a4370a88bf 83 I32_m_Output1 = I32_Universe;
Ayrton_L 30:51a4370a88bf 84 }
Ayrton_L 30:51a4370a88bf 85
Ayrton_L 30:51a4370a88bf 86 void Settings::V_SetOutput2(uint32_t I32_Universe)
Ayrton_L 30:51a4370a88bf 87 {
Ayrton_L 30:51a4370a88bf 88 I32_m_Output2 = I32_Universe;
Ayrton_L 30:51a4370a88bf 89 }
Ayrton_L 30:51a4370a88bf 90
Ayrton_L 36:dba7a0094213 91 void Settings::V_SetOldLine(uint32_t I32_OldLine)
Ayrton_L 36:dba7a0094213 92 {
Ayrton_L 36:dba7a0094213 93 I32_m_OldLine = I32_OldLine;
Ayrton_L 36:dba7a0094213 94 }
Ayrton_L 36:dba7a0094213 95
Ayrton_L 30:51a4370a88bf 96 void Settings::V_SetOutput3(uint32_t I32_Universe)
Ayrton_L 30:51a4370a88bf 97 {
Ayrton_L 30:51a4370a88bf 98 I32_m_Output3 = I32_Universe;
Ayrton_L 29:4a11f841dae1 99 }
Ayrton_L 29:4a11f841dae1 100
Ayrton_L 29:4a11f841dae1 101 void Settings::V_SetOK(bool B_OK)
Ayrton_L 29:4a11f841dae1 102 {
Ayrton_L 29:4a11f841dae1 103 B_m_OK = B_OK;
Ayrton_L 29:4a11f841dae1 104 }
Ayrton_L 29:4a11f841dae1 105
Ayrton_L 29:4a11f841dae1 106 void Settings::V_SetLeft(bool B_Left)
Ayrton_L 29:4a11f841dae1 107 {
Ayrton_L 29:4a11f841dae1 108 B_m_Left = B_Left;
Ayrton_L 29:4a11f841dae1 109 }
Ayrton_L 29:4a11f841dae1 110
Ayrton_L 29:4a11f841dae1 111 void Settings::V_SetRight(bool B_Right)
Ayrton_L 29:4a11f841dae1 112 {
Ayrton_L 29:4a11f841dae1 113 B_m_Right = B_Right;
Ayrton_L 29:4a11f841dae1 114 }
Ayrton_L 29:4a11f841dae1 115
Ayrton_L 29:4a11f841dae1 116 bool Settings::B_GetOK()
Ayrton_L 29:4a11f841dae1 117 {
Ayrton_L 29:4a11f841dae1 118 return B_m_OK;
Ayrton_L 29:4a11f841dae1 119 }
Ayrton_L 29:4a11f841dae1 120
Ayrton_L 36:dba7a0094213 121 bool Settings::B_GetLeft()
Ayrton_L 36:dba7a0094213 122 {
Ayrton_L 36:dba7a0094213 123 return B_m_Left;
Ayrton_L 36:dba7a0094213 124 }
Ayrton_L 36:dba7a0094213 125
Ayrton_L 29:4a11f841dae1 126 bool Settings::B_GetMenu()
Ayrton_L 29:4a11f841dae1 127 {
Ayrton_L 29:4a11f841dae1 128 return B_m_Menu;
Ayrton_L 29:4a11f841dae1 129 }
Ayrton_L 29:4a11f841dae1 130
Ayrton_L 29:4a11f841dae1 131 bool Settings::B_GetRight()
Ayrton_L 29:4a11f841dae1 132 {
Ayrton_L 29:4a11f841dae1 133 return B_m_Right;
Ayrton_L 29:4a11f841dae1 134 }
Ayrton_L 29:4a11f841dae1 135
Ayrton_L 29:4a11f841dae1 136 uint32_t Settings::I32_GetLine()
Ayrton_L 29:4a11f841dae1 137 {
Ayrton_L 29:4a11f841dae1 138 return I32_m_Line;
Ayrton_L 29:4a11f841dae1 139 }
Ayrton_L 29:4a11f841dae1 140
Ayrton_L 30:51a4370a88bf 141 uint32_t Settings::I32_GetOutput1()
Ayrton_L 29:4a11f841dae1 142 {
Ayrton_L 30:51a4370a88bf 143 return I32_m_Output1;
Ayrton_L 28:4b327f1cb9cb 144 }
Ayrton_L 28:4b327f1cb9cb 145
Ayrton_L 30:51a4370a88bf 146 uint32_t Settings::I32_GetOutput2()
Ayrton_L 28:4b327f1cb9cb 147 {
Ayrton_L 30:51a4370a88bf 148 return I32_m_Output2;
Ayrton_L 30:51a4370a88bf 149 }
Ayrton_L 30:51a4370a88bf 150
Ayrton_L 30:51a4370a88bf 151 uint32_t Settings::I32_GetOutput3()
Ayrton_L 30:51a4370a88bf 152 {
Ayrton_L 30:51a4370a88bf 153 return I32_m_Output3;
Ayrton_L 36:dba7a0094213 154 }
Ayrton_L 36:dba7a0094213 155
Ayrton_L 36:dba7a0094213 156 uint32_t Settings::I32_GetOldLine()
Ayrton_L 36:dba7a0094213 157 {
Ayrton_L 36:dba7a0094213 158 return I32_m_OldLine;
Ayrton_L 28:4b327f1cb9cb 159 }