Led matrix with HT1632C controller (5)

luca 22/11/2012 13

This is the last post in this tutorial and it’s about an Arduino sketch that receives a text string from the serial port and displays it on your display with a scrolling effect.

Here’s a short video where you can see the sketch running; in the next pages I’m going to explain how it works:

You can download the full sketch from my Github’s repository.

Pages: 1 2 3 4 5


  1. Locomolo 28/11/2012 at 00:24 - Reply

    Hi again Luca!

    How can i get a variable store in buffer to be displayed trough led matrix. I am thinking in a parsed web xml text trough the ethernet shield.?

    • luca 29/11/2012 at 09:26 - Reply

      Hi Luis,

      you can use the function sprintf() to create the complete string (text + buffer) and then send it to the display using my sketch:

      I’m going to write a tutorial about it!

  2. Paolo 01/12/2012 at 09:51 - Reply

    Gentilissimo Luca,
    il tutorial mi è stato utilissimo per capire la componentistica del progetto su cui sto lavorando ma purtroppo mi trovo in notevole difficoltà con il lato software.
    Premesso che il primo progetto che sto realizzando è quello riportato qui: http://www.instructables.com/id/PS2You-Go-anywhere-LED-digital-message-board/?ALLSTEPS
    Ora l’evoluzione che intendo compiere è semplicemente quella di far apparire scritte prememorizzate (al massimo 10) sulla scheda arduino (senza quindi l’impiego ogni volta della tastiera) semplicemente premendo il relativo tasto (per esempio con l’impiego di un tastierino.
    Mi auguro possa aiutarmi sul lato software. Ringrazio anticipatamente.
    Saluti, Paolo

    • luca 01/12/2012 at 11:12 - Reply

      Ciao Paolo,

      nel mio esempio, la scritta da visualizzare viene inserita in questo buffer:
      char display_string[TEXT_BUFFER_SIZE];

      potresti salvarti nella memoria programma di Arduino le stringhe e, a seconda del tasto premuto, copiare quella che ti interessa in tale buffer.
      Un esempio di vettore di stringhe in PROGMEM si trova qui: http://arduino.cc/en/Reference/PROGMEM

  3. Francesco 27/01/2013 at 21:00 - Reply

    Gentile Luca.
    Ho trovato il pannello display “SURE ELECTRONICS HT 1632c” e la scheda Arduino UNO con possibiltà di collegamento, ma non so scrivere il programma con il computer.
    1° pulsante-> il nome anomalia 1 in scorrevole durante 20 secondi poi spento.
    2° pulsante-> il nome anomalia 2 come sopra
    3° pulsante-> il nome anomalia 3 come sopra

    In attesa la tua risposta. Grazie

  4. julian 11/12/2013 at 10:33 - Reply

    buongiorno luca!

    i cant seem to figure out how i can make the display scroll/show the text of an sms recieved with the arduino gsm shield.

    this is the code i use to print the sms text to the serial port:

    // libraries

    // PIN Number
    #define PINNUMBER “”

    // initialize the library instance
    GSM gsmAccess;
    GSM_SMS sms;

    char remoteNumber[20]; // Holds the emitting number

    void setup()
    // initialize serial communications


    // connection state
    boolean notConnected = true;

    // Start GSM shield
    // If your SIM has PIN, pass it as a parameter of begin() in quotes
    notConnected = false;
    Serial.println(“Not connected”);

    Serial.println(“GSM initialized”);
    Serial.println(“Waiting for messages”);

    void loop()
    char c;

    // If there are any SMSs available()
    if (sms.available())

    // Read message bytes and print them


    // delete message from modem memory



    is there any way to display that on the led matirx every time a new message is recieved?

    im still a beginner in programming and ive tried in many different ways but i just cant figure it out.

    thanks in advance!

  5. banu priya 07/03/2015 at 07:14 - Reply

    i too have the same problem to how i can make the display scroll/show the text of an sms recieved with the arduino gsm shield. i brought the sure electronics LED display.please help me

    • luca 08/03/2015 at 13:31 - Reply

      Hi! If you have the SMS text in a variable (I don’t own the GSM shield so I can’t help you with that) it’s straightforward to display it using my sketch

  6. Kevin 11/11/2015 at 14:44 - Reply

    Hi Luca, Thank you so much for writing this tutorial.

    I am now onto the scrolling part, In your code, where do you put the texts you want to display onto the LED? When I run your code, I got nothing coming out from LED and on my serial monitor it only showed “Scrolling demo”

    Once again, Thanks for the hard work!

    • luca 11/11/2015 at 21:50 - Reply

      Hi Kevin, send the text you want to display using the serial monitor. Just make sure to add the “new line” character at the end of the string (Arduino serial monitor has a specific option).

  7. Kevin 11/11/2015 at 21:36 - Reply

    Hi Luca,

    Sorry it’s me again, I saw your video a couple of time and i finally see how you are displaying the text on the LED. But is there a way to do it automatically instead of manual entering the texts? The reason why I want it to be automatic because i want to control the display using my distance sensor, so,

    when my sensor is picking up certain distance, i want the led to light up and other time i want the LED to remain shutdown.

    Thank you for reading.

    • luca 11/11/2015 at 21:53 - Reply

      Hi Kevin, please see my temperature example, it does exactly what you need (displays a text defined programmatically).

      • Kevin 11/11/2015 at 22:35 - Reply

        Thank you so much for responding!

        I looked into the example, and I am assuming that I need to change

        void prepareText();?

        Can i do like
        if (distance <= 10)
        sprintf(display_string, "Too Close", );
        Serial.print("Now displaying: ");

        Or can i not do it inside the void prepare Test but inside the void loop? because my distance sensor is running inside the void loop.

Leave A Response »

Click here to cancel reply.

This website uses cookies to ensure you get the best experience on our website maggiori informazioni

Questo sito utilizza i cookie per fonire la migliore esperienza di navigazione possibile. Continuando a utilizzare questo sito senza modificare le impostazioni dei cookie o clicchi su "Accetta" permetti al loro utilizzo.