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.

Settings.h

Committer:
Ayrton_L
Date:
2016-05-05
Revision:
29:4a11f841dae1
Parent:
28:4b327f1cb9cb
Child:
30:51a4370a88bf

File content as of revision 29:4a11f841dae1:

#ifndef SETTINGS_H
#define SETTINGs_H
#include "mbed.h"
class Settings
{
    public:
        Settings();
        ~Settings();
        
        void V_SetInterrupt(bool B_Interrupt);
        void V_SetUniverse(uint32_t I32_Universe[]);
        void V_SetLeft(bool B_Left);
        void V_SetRight(bool B_Right);
        void V_SetDirection(uint32_t I32_Direction);
        void V_SetLine(uint32_t I32_Line);
        void V_SetInMenu(bool B_Menu);
        void V_SetOK(bool B_OK);
        
        bool B_GetInterrupt();
        bool B_GetLeft();
        bool B_GetRight();
        bool B_GetMenu();
        bool B_GetOK();
        
        uint32_t I32_GetLine();        
        uint32_t I32_GetDirection();
        uint32_t I32_GetUniverse(uint32_t I32_UniKeuze);
        
    private:
        uint32_t I32_m_Universe[3];
        uint32_t I32_m_Direction;
        uint32_t I32_m_Line;
        bool B_m_Interrupt;
        bool B_m_Left;
        bool B_m_Right;
        bool B_m_Menu;
        bool B_m_OK;
};
#endif

Settings::Settings()
{
    B_m_Interrupt = false;
    B_m_Left = false;
    B_m_Right = false;
    B_m_Menu = false;
    B_m_OK = false;
    I32_m_Universe[0] = 0;
    I32_m_Universe[1] = 0;
    I32_m_Universe[2] = 0;
    I32_m_Direction = 0;
    I32_m_Line = 0;
}

Settings::~Settings()
{
    delete &B_m_Interrupt;
    delete &B_m_Right;
    delete &B_m_Left;
    delete &B_m_OK;
    delete &B_m_Menu; 
    delete &I32_m_Universe[3];
    delete &I32_m_Direction;
    delete &I32_m_Line;
}

void Settings::V_SetOK(bool B_OK)
{
    B_m_OK = B_OK;
}

void Settings::V_SetInMenu(bool B_Menu)
{
    B_m_Menu = B_Menu;
}

void Settings::V_SetLine(uint32_t I32_Line)
{
    I32_m_Line = I32_Line;
}

void Settings::V_SetInterrupt(bool B_Interrupt)
{
    this->B_m_Interrupt = B_Interrupt;
}

void Settings::V_SetLeft(bool B_Left)
{
    B_m_Left = B_Left;   
}

void Settings::V_SetRight(bool B_Right)
{
    B_m_Right = B_Right;
}

void Settings::V_SetDirection(uint32_t I32_Direction)
{
    I32_m_Direction = I32_Direction;
}

bool Settings::B_GetOK()
{
    return B_m_OK;
}

bool Settings::B_GetMenu()
{
    return B_m_Menu;
}

bool Settings::B_GetLeft()
{
    return B_m_Left;
}

bool Settings::B_GetRight()
{
    return B_m_Right;
}

bool Settings::B_GetInterrupt()
{
    return B_m_Interrupt;
}

uint32_t Settings::I32_GetDirection()
{
    return I32_m_Direction;
}

uint32_t Settings::I32_GetLine()
{
    return I32_m_Line;
}

void Settings::V_SetUniverse(uint32_t I32_Universe[])
{
    
}

uint32_t Settings::I32_GetUniverse(uint32_t I32_UniKeuze)
{
    switch (I32_UniKeuze)
    {
        case 1:
            return I32_m_Universe[0];
        case 2:
            return I32_m_Universe[1];
        case 3:
            return I32_m_Universe[2];
        default:
            return 0;
    }
}