Led matrix with HT1632C controller (5)

by luca
13 comments

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:

[youtube id=”tSLO40MrQw8″ width=”600″ height=”350″]

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

Related Posts

13 comments

Locomolo Wednesday November 28th, 2012 - 12:24 AM

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.?

Reply
luca Thursday November 29th, 2012 - 09:26 AM

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:
http://liudr.wordpress.com/2012/01/16/sprintf/

I’m going to write a tutorial about it!

Reply
Paolo Saturday December 1st, 2012 - 09:51 AM

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

Reply
luca Saturday December 1st, 2012 - 11:12 AM

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

Reply
Francesco Sunday January 27th, 2013 - 09:00 PM

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.
Esempio:
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

Reply
julian Wednesday December 11th, 2013 - 10:33 AM

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
#include

// 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
Serial.begin(57600);

Serial.println(“Bottleneck”);

// connection state
boolean notConnected = true;

// Start GSM shield
// If your SIM has PIN, pass it as a parameter of begin() in quotes
while(notConnected)
{
if(gsmAccess.begin(PINNUMBER)==GSM_READY)
notConnected = false;
else
{
Serial.println(“Not connected”);
delay(1000);
}
}

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
while(c=sms.read())
Serial.print(c);

Serial.println(“\n”);

// delete message from modem memory
sms.flush();
}

delay(1000);

}

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!
ahoi
jul

Reply
banu priya Saturday March 7th, 2015 - 07:14 AM

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

Reply
luca Sunday March 8th, 2015 - 01:31 PM

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

Reply
Kevin Wednesday November 11th, 2015 - 02:44 PM

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!

Reply
luca Wednesday November 11th, 2015 - 09:50 PM

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).

Reply
Kevin Wednesday November 11th, 2015 - 09:36 PM

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.

Reply
luca Wednesday November 11th, 2015 - 09:53 PM

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

Reply
Kevin Wednesday November 11th, 2015 - 10:35 PM

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: ");
Serial.println(display_string);
}

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.

Reply

Leave a Comment

16 + 3 =