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:
Wed Mar 09 01:24:39 2016 +0000
Revision:
19:e8b826ab28a8
Child:
20:bcaba3ecc235
Optimized Screen.h (OOP Class)

Who changed what in which revision?

UserRevisionLine numberNew contents of line
Ayrton_L 19:e8b826ab28a8 1 #include "string.h"
Ayrton_L 19:e8b826ab28a8 2 #include "stdint.h"
Ayrton_L 19:e8b826ab28a8 3 #include "TextLCD.h"
Ayrton_L 19:e8b826ab28a8 4
Ayrton_L 19:e8b826ab28a8 5 TextLCD lcd(p10, p12, p15, p16, p29, p30); // rs, e, d4-d7
Ayrton_L 19:e8b826ab28a8 6 class Screen
Ayrton_L 19:e8b826ab28a8 7 {
Ayrton_L 19:e8b826ab28a8 8 public:
Ayrton_L 19:e8b826ab28a8 9 Screen();
Ayrton_L 19:e8b826ab28a8 10 ~Screen();
Ayrton_L 19:e8b826ab28a8 11
Ayrton_L 19:e8b826ab28a8 12 void V_Printit() const;
Ayrton_L 19:e8b826ab28a8 13
Ayrton_L 19:e8b826ab28a8 14 void V_SetRij(uint32_t I32_Rij);
Ayrton_L 19:e8b826ab28a8 15 void V_SetKolom(uint32_t I32_Kolom);
Ayrton_L 19:e8b826ab28a8 16 void V_SetTekst(char * C_Tekst);
Ayrton_L 19:e8b826ab28a8 17
Ayrton_L 19:e8b826ab28a8 18 private:
Ayrton_L 19:e8b826ab28a8 19 uint32_t I32_m_Rij;
Ayrton_L 19:e8b826ab28a8 20 uint32_t I32_m_Kolom;
Ayrton_L 19:e8b826ab28a8 21 char *C_m_Tekst[];
Ayrton_L 19:e8b826ab28a8 22
Ayrton_L 19:e8b826ab28a8 23 };
Ayrton_L 19:e8b826ab28a8 24
Ayrton_L 19:e8b826ab28a8 25 Screen::Screen()
Ayrton_L 19:e8b826ab28a8 26 {
Ayrton_L 19:e8b826ab28a8 27 this->I32_m_Rij = 0;
Ayrton_L 19:e8b826ab28a8 28 this->I32_m_Kolom = 0;
Ayrton_L 19:e8b826ab28a8 29 *this->C_m_Tekst = "";
Ayrton_L 19:e8b826ab28a8 30 return;
Ayrton_L 19:e8b826ab28a8 31 }
Ayrton_L 19:e8b826ab28a8 32
Ayrton_L 19:e8b826ab28a8 33 Screen::~Screen()
Ayrton_L 19:e8b826ab28a8 34 {
Ayrton_L 19:e8b826ab28a8 35 delete &I32_m_Rij;
Ayrton_L 19:e8b826ab28a8 36 delete &I32_m_Kolom;
Ayrton_L 19:e8b826ab28a8 37 delete C_m_Tekst;
Ayrton_L 19:e8b826ab28a8 38 return;
Ayrton_L 19:e8b826ab28a8 39 }
Ayrton_L 19:e8b826ab28a8 40
Ayrton_L 19:e8b826ab28a8 41 void Screen::V_SetRij(uint32_t I32_Rij)
Ayrton_L 19:e8b826ab28a8 42 {
Ayrton_L 19:e8b826ab28a8 43 I32_m_Rij = (I32_Rij % 4) -1;
Ayrton_L 19:e8b826ab28a8 44 }
Ayrton_L 19:e8b826ab28a8 45
Ayrton_L 19:e8b826ab28a8 46 void Screen::V_SetKolom(uint32_t I32_Kolom)
Ayrton_L 19:e8b826ab28a8 47 {
Ayrton_L 19:e8b826ab28a8 48 I32_m_Kolom = (I32_Kolom % 20) -1;
Ayrton_L 19:e8b826ab28a8 49 }
Ayrton_L 19:e8b826ab28a8 50
Ayrton_L 19:e8b826ab28a8 51 void Screen::V_SetTekst(char C_Tekst[])
Ayrton_L 19:e8b826ab28a8 52 {
Ayrton_L 19:e8b826ab28a8 53 *C_m_Tekst = C_Tekst;
Ayrton_L 19:e8b826ab28a8 54 }
Ayrton_L 19:e8b826ab28a8 55
Ayrton_L 19:e8b826ab28a8 56 void Screen::V_Printit() const
Ayrton_L 19:e8b826ab28a8 57 {
Ayrton_L 19:e8b826ab28a8 58 lcd.locate(I32_m_Kolom, I32_m_Rij);
Ayrton_L 19:e8b826ab28a8 59 lcd.printf(*C_m_Tekst);
Ayrton_L 19:e8b826ab28a8 60 }
Ayrton_L 19:e8b826ab28a8 61
Ayrton_L 19:e8b826ab28a8 62 /*
Ayrton_L 19:e8b826ab28a8 63 void V_PutPointer()
Ayrton_L 19:e8b826ab28a8 64 {
Ayrton_L 19:e8b826ab28a8 65 lcd.locate(0,0);
Ayrton_L 19:e8b826ab28a8 66 lcd.printf("%d", &I8_ScreenPointer[1]);
Ayrton_L 19:e8b826ab28a8 67 lcd.locate(1,0);
Ayrton_L 19:e8b826ab28a8 68 lcd.printf("%d", &I8_ScreenPointer[2]);
Ayrton_L 19:e8b826ab28a8 69 lcd.locate(2,0);
Ayrton_L 19:e8b826ab28a8 70 lcd.printf("%d", &I8_ScreenPointer[3]);
Ayrton_L 19:e8b826ab28a8 71 lcd.locate(3,0);
Ayrton_L 19:e8b826ab28a8 72 lcd.printf("%d", &I8_ScreenPointer[4]);
Ayrton_L 19:e8b826ab28a8 73 }
Ayrton_L 19:e8b826ab28a8 74
Ayrton_L 19:e8b826ab28a8 75 void V_Up()
Ayrton_L 19:e8b826ab28a8 76 {
Ayrton_L 19:e8b826ab28a8 77 uint8_t help;
Ayrton_L 19:e8b826ab28a8 78 help = I8_ScreenPointer[0];
Ayrton_L 19:e8b826ab28a8 79 I8_ScreenPointer[0] = I8_ScreenPointer[1];
Ayrton_L 19:e8b826ab28a8 80 I8_ScreenPointer[1] = I8_ScreenPointer[2];
Ayrton_L 19:e8b826ab28a8 81 I8_ScreenPointer[2] = I8_ScreenPointer[3];
Ayrton_L 19:e8b826ab28a8 82 I8_ScreenPointer[3] = help;
Ayrton_L 19:e8b826ab28a8 83 V_PutPointer();
Ayrton_L 19:e8b826ab28a8 84 }
Ayrton_L 19:e8b826ab28a8 85
Ayrton_L 19:e8b826ab28a8 86 void V_Down()
Ayrton_L 19:e8b826ab28a8 87 {
Ayrton_L 19:e8b826ab28a8 88 uint8_t help;
Ayrton_L 19:e8b826ab28a8 89 help = I8_ScreenPointer[3];
Ayrton_L 19:e8b826ab28a8 90 I8_ScreenPointer[3] = I8_ScreenPointer[2];
Ayrton_L 19:e8b826ab28a8 91 I8_ScreenPointer[2] = I8_ScreenPointer[1];
Ayrton_L 19:e8b826ab28a8 92 I8_ScreenPointer[1] = I8_ScreenPointer[0];
Ayrton_L 19:e8b826ab28a8 93 I8_ScreenPointer[0] = help;
Ayrton_L 19:e8b826ab28a8 94 V_PutPointer();
Ayrton_L 19:e8b826ab28a8 95 }
Ayrton_L 19:e8b826ab28a8 96
Ayrton_L 19:e8b826ab28a8 97 void V_Powerup()
Ayrton_L 19:e8b826ab28a8 98 {
Ayrton_L 19:e8b826ab28a8 99 lcd.locate(3, 1);
Ayrton_L 19:e8b826ab28a8 100 lcd.printf("Art-Net to DMX/n");
Ayrton_L 19:e8b826ab28a8 101 lcd.locate(6, 3);
Ayrton_L 19:e8b826ab28a8 102 lcd.printf("B-00-01");
Ayrton_L 19:e8b826ab28a8 103 wait(1);
Ayrton_L 19:e8b826ab28a8 104 lcd.cls();
Ayrton_L 19:e8b826ab28a8 105 }
Ayrton_L 19:e8b826ab28a8 106
Ayrton_L 19:e8b826ab28a8 107 void V_ShowSTDMenuScreen()
Ayrton_L 19:e8b826ab28a8 108 {
Ayrton_L 19:e8b826ab28a8 109 lcd.cls();
Ayrton_L 19:e8b826ab28a8 110
Ayrton_L 19:e8b826ab28a8 111 lcd.locate(19,1);
Ayrton_L 19:e8b826ab28a8 112 lcd.printf("^");
Ayrton_L 19:e8b826ab28a8 113 lcd.locate(19,3);
Ayrton_L 19:e8b826ab28a8 114 lcd.printf("v");
Ayrton_L 19:e8b826ab28a8 115
Ayrton_L 19:e8b826ab28a8 116 lcd.locate(1,1);
Ayrton_L 19:e8b826ab28a8 117 lcd.printf("Contrast");
Ayrton_L 19:e8b826ab28a8 118 lcd.locate(2,1);
Ayrton_L 19:e8b826ab28a8 119 lcd.printf("Netwerk");
Ayrton_L 19:e8b826ab28a8 120 lcd.locate(3,1);
Ayrton_L 19:e8b826ab28a8 121 lcd.printf("ArtNet");
Ayrton_L 19:e8b826ab28a8 122 lcd.locate(4,1);
Ayrton_L 19:e8b826ab28a8 123 lcd.printf("Info");
Ayrton_L 19:e8b826ab28a8 124 }*/