In this post i would like to share my one of the experience in automating the content creation for LCD Panel.
Recently one of my neighbour requested is there a way to automate his LED display with daily thoughts as he is manually creating the daily thoughts through the LED Panel Controller software called HD provided by a Chinese company called Huidu. I am pretty sure that the tool may store the manually created items somewhere in the persistent path and with just few tweaks we can able to automate this. I agreed and started analyzing the way it works.
He is expecting a solution to import the daily thoughts which he is already created in an excel file to the LED Software through some utility as it currently doesn’t supports.
Workflow of LED Panels :
LED Panels uses a matrix format to render the required content (no constrain with the language). The LED Controller Software HD2014 provides a interface through which we can add the content to be displayed and can be synced with the date and time. This including repeating intervals as well. Once the content is created, the software allows one to export and save them to a USB stick. This USB stick can be connected to the LED Panel device which has the necessary information for the Panel to render the content at the appropriate time. The latest software can be downloaded from this Url http://download.huidu.cn/download/Update/HD2016_V6.0.1.rar
Proposed Solution :
– Identify the path where the content is stored by the software and explore the data structure
– Write a simple program (C# Windows Application) to import a excel file and generate manually a .hd3 file with the same structural standards
– Import the generated .hd3 file to the native LED HD application and export them to USB stick
– Ensure LED Panel still able to recognize the content.
Where the Content is Stored by HD ?
The HD2014 provides the interface for basic editing and creation of content. Currently it doesn’t support for editing or importing a batch of items. The content are stored in this folder with an extension of .hd3. C:\Users\<username>\AppData\Roaming\HD2014\ProjFile\Screen-1.hd3. This .hd3 file is a plain XML which contains the detailed information of the created content. Along with the content information it also contains additional information which is very specific to the hardware settings.
This XML stores the created content (english or tamil) in a different format (ASCII) instead of plain text in 2 separate nodes. One node has the content title and date information and the other node contains the actual ASCII values of the content
Here a sample partial content of the XML file
<!–?xml version=”1.0″ encoding=”UTF-8″?–>
<Node Level=”2″ Type=”1″>
<Node Level=”3″ Type=”1″>
<Attribute Name=”name”>Single-line text-1</Attribute>
Implementation & Program Code in C# :
The following logic is used to convert the given text to a decimal content and the result is replaced in the corresponding node “Content” in the XML. I have not gone into detail of the code to import the excel file,reading the file and creating the XML from a sample template etc. Please contact me if you are looking for a detailed source code of this application.
Make Your Mind Your Best Friend
ASCII Equivalent :
public static string GetFormattedContent(string text)
StringBuilder output = new StringBuilder();
var charvalues = text.ToCharArray().ToList();
foreach (var value in charvalues)
decimal decValue = value;
var decString = decValue.ToString();
decString = decString.PadLeft(4, ‘0’);
decString = decString.PadRight(6, ‘0’);
The application takes the excel file and Month as input and generates the .hd3 XML file. The Month & Year is needed for my requirement as each line item in the excel needs to have a separate node for that given date in the .hd3 file. This way the application is successfully deployed in my neighbours place and he is happily using this utility to automate the daily thoughts on the LED Panel.