Concludiamo questa serie di tutorial con uno sketch che riceve una stringa di caratteri via seriale e la visualizza sul display eseguendo lo scrolling.
Inizio l’articolo con un breve filmato che mostra lo sketch in azione; nelle prossime pagine vi spiegherò in dettaglio il suo funzionamento:
Trovate lo sketch completo nel repository Github.
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.?
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!
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
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
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
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
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
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
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!
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).
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.
Hi Kevin, please see my temperature example, it does exactly what you need (displays a text defined programmatically).
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.