mbed project met ethernet communicatie (UDP) Master/slave

Dependencies:   EthernetInterface LM75B mbed-rtos mbed

Hey

LcdControl.cpp

Committer:
RobinMechele
Date:
2018-03-23
Revision:
8:556a5738c2fa
Parent:
5:665ba017d54e

File content as of revision 8:556a5738c2fa:

#include "lcdcontrol.h"
C12832A1Z scherm(p5, p7, p6, p8, p11);

LcdControl::LcdControl()
{
    //Constructor
}

void LcdControl::printMode()
{
    lcdReset();
    scherm.printf("Use Joystick to choose mode");
    scherm.locate(6,13);
    scherm.printf("Master <-   -> Slave");
    scherm.locate(0,23);
}

void LcdControl::printMasterSlave(int mode)
{
    if(mode == 0)
    {
        scherm.printf("Mode: Slave");
    }
    else
    {
        scherm.printf("Mode: Master");
    }
}

void LcdControl::printID(int ID)
{
    scherm.printf("ID = %d",ID);    
}

void LcdControl::lcdReset()
{
    scherm.cls();
    scherm.locate(0,0);
}

void LcdControl::lcdSlave(char* text)
{
    lcdReset();
    scherm.printf(text);    
}