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.
Diff: Screen.h
- Revision:
- 19:e8b826ab28a8
- Child:
- 20:bcaba3ecc235
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Screen.h Wed Mar 09 01:24:39 2016 +0000 @@ -0,0 +1,124 @@ +#include "string.h" +#include "stdint.h" +#include "TextLCD.h" + +TextLCD lcd(p10, p12, p15, p16, p29, p30); // rs, e, d4-d7 +class Screen +{ + public: + Screen(); + ~Screen(); + + void V_Printit() const; + + void V_SetRij(uint32_t I32_Rij); + void V_SetKolom(uint32_t I32_Kolom); + void V_SetTekst(char * C_Tekst); + + private: + uint32_t I32_m_Rij; + uint32_t I32_m_Kolom; + char *C_m_Tekst[]; + +}; + +Screen::Screen() +{ + this->I32_m_Rij = 0; + this->I32_m_Kolom = 0; + *this->C_m_Tekst = ""; + return; +} + +Screen::~Screen() +{ + delete &I32_m_Rij; + delete &I32_m_Kolom; + delete C_m_Tekst; + return; +} + +void Screen::V_SetRij(uint32_t I32_Rij) +{ + I32_m_Rij = (I32_Rij % 4) -1; +} + +void Screen::V_SetKolom(uint32_t I32_Kolom) +{ + I32_m_Kolom = (I32_Kolom % 20) -1; +} + +void Screen::V_SetTekst(char C_Tekst[]) +{ + *C_m_Tekst = C_Tekst; +} + +void Screen::V_Printit() const +{ + lcd.locate(I32_m_Kolom, I32_m_Rij); + lcd.printf(*C_m_Tekst); +} + +/* +void V_PutPointer() +{ + lcd.locate(0,0); + lcd.printf("%d", &I8_ScreenPointer[1]); + lcd.locate(1,0); + lcd.printf("%d", &I8_ScreenPointer[2]); + lcd.locate(2,0); + lcd.printf("%d", &I8_ScreenPointer[3]); + lcd.locate(3,0); + lcd.printf("%d", &I8_ScreenPointer[4]); +} + +void V_Up() +{ + uint8_t help; + help = I8_ScreenPointer[0]; + I8_ScreenPointer[0] = I8_ScreenPointer[1]; + I8_ScreenPointer[1] = I8_ScreenPointer[2]; + I8_ScreenPointer[2] = I8_ScreenPointer[3]; + I8_ScreenPointer[3] = help; + V_PutPointer(); +} + +void V_Down() +{ + uint8_t help; + help = I8_ScreenPointer[3]; + I8_ScreenPointer[3] = I8_ScreenPointer[2]; + I8_ScreenPointer[2] = I8_ScreenPointer[1]; + I8_ScreenPointer[1] = I8_ScreenPointer[0]; + I8_ScreenPointer[0] = help; + V_PutPointer(); +} + +void V_Powerup() +{ + lcd.locate(3, 1); + lcd.printf("Art-Net to DMX/n"); + lcd.locate(6, 3); + lcd.printf("B-00-01"); + wait(1); + lcd.cls(); +} + +void V_ShowSTDMenuScreen() +{ + lcd.cls(); + + lcd.locate(19,1); + lcd.printf("^"); + lcd.locate(19,3); + lcd.printf("v"); + + lcd.locate(1,1); + lcd.printf("Contrast"); + lcd.locate(2,1); + lcd.printf("Netwerk"); + lcd.locate(3,1); + lcd.printf("ArtNet"); + lcd.locate(4,1); + lcd.printf("Info"); +}*/ \ No newline at end of file