LED Programming

image

This is based on the 4U2SEE Indoor LED Displays . You can try get it from ebay for ~ $150.

The following is the code to send command and messages to the display using C#:

Serial Port Basics:

public void Init()
{
sp = new SerialPort();
sp.BaudRate = 19200;
sp.DataBits = 8;
}

Protocol:

String BeginCommand = "01-5A-30-30-02-41-42-06-1B-33-62-1C-";
String ColorCommand = mColor;
//colors = 30-37
String SizeCommand = "1A-30"; //30 is size param
String DisplayModeCommand = "0A-49-31"; //0A-49 is text moving -XX is display mode
String TextCommand = mCommandString;
String EndCommand = "03";
String FullCommand = BeginCommand + ColorCommand +SizeCommand+ DisplayModeCommand+TextCommand + EndCommand;
//String FullCommand = TestBegin;
//4A is First Letter
//03 is the last command
//37 is color
//33 is display mode
//construct full command

Sending HEX to serial port:

(HexEncoding is a class written by neilck and the code can be found here)

ByteArray = HexEncoding.GetBytes(FullCommand, out discarded);
BytestoString = HexEncoding.ToString(ByteArray);
sp.Open();
sp.Write(ByteArray, 0, ByteArray.Length);
sp.Close();

Leave a Reply

You must be logged in to post a comment.