Arduino Ethernet Shield hooked up to LED message display

This hack allows you to display messages to a standard Amplus LED Message Display from Clas Ohlsson. The display is controlled by a remote control and via a RJ14 cable plugged into the screen. Serial data is transmitted from cable to the screen. The LED Message display expects the message you pass to it to be encrypted with a check sum. With the help of Rasmus blog post I could generate this checksum in Arduino. I turned his Perl code into Arduino code that you can see below.

  1. int stringToInt(String thisString) {
  2.   String letters = " !’#$%&’()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[/]^_`abcdefghijklmnopqrstuvwxyz{|}~";
  4.   int newstr = 32 + letters.indexOf(thisString);
  6.   return newstr;
  7. }
  9. String generateMessage(String inputString) {
  11.   byte checksum = 0×74;
  12.   int i;
  14.   for(i = 0;i < inputString.length();i++) {
  15.       String currentChar    = inputString.substring(i,i+1);
  16.       int asciiChar         = stringToInt(currentChar);
  17.       checksum = checksum ^ asciiChar;
  18.   }
  20.    String hexStr =  String(checksum, HEX);
  21.    hexStr.toUpperCase();
  23.    String message = "<ID00><L1><PA><FE><MA><WC><FE>" + inputString + hexStr + "<E>";
  24.    return message;
  26. }
  28. String myString = "My led display message here";
  29.  String mess = generateMessage(myString);
  30.   Serial.print(mess);

Download my Arduino library on Github to try this out.

8 thoughts on “Arduino Ethernet Shield hooked up to LED message display

  1. can i define where the message i sent it will appear in the led display & can i show two different message in the same time

  2. Hi Mostafa!

    You can send a long message containing both messages or send one to page a and one message to page b and then switch between them. The code library I supplied does not support switching between pages but you could look at the protocol and see what does.

    Hope it helps! :-)

  3. Why is the 5V connected to the message display? It should work with only transmit and ground connected, or am I wrong?

  4. Thanks for your answer :D
    i like this project very much ;) & please i have another questions :
    1- if this library help me to use led screen like LCD arduino libirary ( first set cursor then print message and clear it when i need )
    2- can i print or show variable value in this libirary
    messageBoard.displayMessage(PAGE_A,”My message!”);
    i need to print variable x can i do this
    messageBoard.displayMessage(PAGE_A, x);

    • @Mostafa

      You can print your variable message with the following code:

      String pageValue = connectAndRead(); //connect to the server and read the output
      String myMessage = “My personal message”;
      messageBoard.displayMessage(PAGE_A, myMessage);

  5. Hi Ellen,

    I am working on this same project but using a different board ( LPD8008 The intent is to have a program that displays different messages at different times.
    But I am finding a few problems, primarily because I am very new to the entire Arduino and electronics world.

    First I cannot figure out how to connect the LED matrix to the Atmega328. Second, I have past the code you gave above here but I keep on getting this error:

    sketch_may06b:13: error: stray ‘\’ in program
    sketch_may06b:11: error: expected unqualified-id before ‘{‘ token

    at this point of the sketch:

    String generateMessage(String inputString); {

    byte checksum = 0×74;
    int i;

    Again, I am at the very start, so it is a bit difficult for me to find errors in a code.
    Is there any chance you would be so kind to help?

    Many thanks

Leave a Reply to Mostafa Hamdy Cancel reply

Your email address will not be published. Required fields are marked *


You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>