Artnet to DMX

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:
Thu May 05 21:06:56 2016 +0000
Revision:
29:4a11f841dae1
Parent:
28:4b327f1cb9cb
Child:
30:51a4370a88bf
Finalizing Beta;

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