Go Down

Topic: Scrolling LED matrix display - Parola for Arduino (Read 167993 times) previous topic - next topic

CodfishCatfish

Hi Marco,
             I have the DHT22 and the RTC module however are a bit clueless on how to connect them to the Arduino UNO to make a calendar clock from your Sketch Zone Time. What pinouts are there.

Many thanks kind regards Spence.

marco_c

#871
Sep 11, 2016, 01:33 am Last Edit: Sep 11, 2016, 01:36 am by marco_c
At the top of the sketch (as in most sketches) you will find the hardware definitions:
Code: [Select]
#if USE_DHT11
#include <dht11.h>

#define DHT11_PIN 2

dht11 DHT11;
#endif

The DS1307 is an I2C device, so you need to connect the I2C pins (from memory these are A4 and A5, but check).

and you enable the functionality using these defines
Code: [Select]
// Use the DHT11 temp and humidity sensor
#define USE_DHT11 0

// Use the DS1307 clock module
#define USE_DS1307 1
Arduino Libraries http://arduinocode.codeplex.com
Parola for Arduino http://parola.codeplex.com
Arduino++ blog https://arduinoplusplus.wordpress.com

natecastillo

Hello. Is there a way for me to use the MD_MAX72xx lib to create a scrolling led matrix display from scratch where the text can either come from Serial monitor or a blutooth module. Thank You

marco_c

Sure. There are examples for both MD_MAX72xx and MD_Parola libraries taking messages from the serial port and displaying them.
Arduino Libraries http://arduinocode.codeplex.com
Parola for Arduino http://parola.codeplex.com
Arduino++ blog https://arduinoplusplus.wordpress.com

natecastillo

Hello. Is there a way for me to use the MD_MAX72xx lib to create a scrolling led matrix display from scratch where the text can either come from Serial monitor or a blutooth module. Thank You
Sure. There are examples for both MD_MAX72xx and MD_Parola libraries taking messages from the serial port and displaying them.
Thanks for the fast response. Can the example be modified so that when I enter a specific command the text can either speed up, slow down, brighten, or dimmed. Is there also a way to make the text come from the right side of the matrix?

marco_c

Yes to all that. You will need to create some sort of message with commands that you can interpret to do what you want.
Arduino Libraries http://arduinocode.codeplex.com
Parola for Arduino http://parola.codeplex.com
Arduino++ blog https://arduinoplusplus.wordpress.com

natecastillo

Yes to all that. You will need to create some sort of message with commands that you can interpret to do what you want.
Will you please guide me?

marco_c

#877
Sep 13, 2016, 11:40 pm Last Edit: Sep 14, 2016, 04:29 am by marco_c
The methods for changing speed, direction, etc are all explained in the library documentation and used in many of the library examples - where a switch is pressed and the software changes something like the speed - so this should be clear.

In order to replace a physical interface (like a switch) with a software command through the serial interface you need to define what you need to send in order to make the software do what you want. This could be as simple or as complex as you want it to be. Again, there are many examples on how others have done this, especially if you search for Bluetooth interfaces.

A serial connection and a Bluetooth connection are essentially the same, as both look like a serial port from the Arduino code. Focus on using the Serial Monitor to develop and debug the code, which reduces the complexity, and then add the Bluetooth serial interface later.

EDIT: This may give you some clues: http://www.martyncurrey.com/turning-a-led-on-and-off-with-an-arduino-bluetooth-and-android-part-ii-2-way-control/
Arduino Libraries http://arduinocode.codeplex.com
Parola for Arduino http://parola.codeplex.com
Arduino++ blog https://arduinoplusplus.wordpress.com

funkervoigt

Actually, you can already do the reversed text using the library  :)
  
Very cool, havenĀ“t seen that option ! Thank you very much !

nash68

Hi Marco and thank you for this wonderfull librairy.

I was wondering if it possible to have a moving animated alien (as a character ie) in a scroll text ?

I've tried with custom caracters, but it seems not possible to have an animated char this way...


My second idea was to try to re use the part of the DAFTPUNL sample from MD_MAX72XX library...
But nothing appears on the screen.
I guess that the trouble occurs in the initailisation of the matrix...
I removed MD_MAX72XX mx = MD_MAX72XX(CS_PIN, MAX_DEVICES);  and  keep MD_Parola P = MD_Parola(CS_PIN, MAX_DEVICES);

And instead of mx references, i put P references :
  mx.begin(); -->P.begin();

  mx.control(MD_MAX72XX::UPDATE, MD_MAX72XX::OFF); -->P.control...
  mx.clear(); --> P.clear();
 for (uint8_t i=0; i<dataSize; i++)
  {
    mx.setColumn(idx-dataSize+i, iType ? invader1 : invader2);  --> P.setColumn...
    mx.setColumn(idx+dataSize-i-1, iType ? invader1 : invader2);  --> P.setColumn...
  }

But it seems that it is not that simple...
Any help would be appreciate.
Yours.


marco_c

#880
Sep 25, 2016, 11:49 pm Last Edit: Sep 28, 2016, 10:33 am by marco_c
Quote
But it seems that it is not that simple...
You are right.

MD_Parola is designed to handle text animation. It therefore takes control of the animation and makes it easy for the user by doing all the work. This also means that it has to prevent the user form interfering as it needs to know exactly where everything is at any time. It deals in text and characters and there no concept of rows or columns. So here you can define a space invader as a custom character and it will be moved across the screen for you.

MD_MAX72xx is designed to run the hardware and rows/columns is what it deals in. Even the fonts are just treated like columns of data. This allows total flexibility for the user but the library does nothing for you - you are in total control of the hardware.

Moving animations need to have different bitmaps for each frame of the animation. So, if you want to animate a space invader (like the Daft Punk example), then MD_MAX72xx library is where it needs to be done as you have control. MD_Parola is the wrong place for it.

Other forum contributors have told me that they have mixed graphics and text by using different zones (in which case the animation zone is not touched by Parola), but that needs some careful planning and I am not sure how the interactions could interfere with each other (ie, no guarantees or support from me, so you need to troubleshoot this yourself).

Arduino Libraries http://arduinocode.codeplex.com
Parola for Arduino http://parola.codeplex.com
Arduino++ blog https://arduinoplusplus.wordpress.com

passman

Hi Marco,

I'm progressing with my steep learning curve as a complete newbie and would appreciate a little help. I have successfully completed a project to use bluetooth to input text to the matrix using the example Parola_Scrolling as a basis. In addition I can send commands to invert text, change speed, direction etc.

What I am trying to do now is to look at animating text in line with the example Parola_Test through a bluetooth connection. Initially I would look to use the Serial Monitor as the input method. I understand the input needs to be in this format char *pc[] = {"Parola for","Arduino","LED Matrix","Display"}; format with each of the "xxxxx" statements no greater than the maximum size of the display matrix (in my case eight).

My problem is I have no idea how to achieve this. Do you have any examples or pointers that may help me?

Many thanks for your time, help and awesome work.

Cheers

Peter

marco_c

Code: [Select]
char *pc[] = {"Parola for","Arduino","LED Matrix","Display"};
This declares an array of pointers to strings, auto sized by the compiler. As the data never changes (effectively a constant) this works fine and the compiler will just allocate some space and initialise the data to the strings I have specified.

However, if you want to change the data, then you need to declare an array of arrays of characters (ie, a two dimensional array)
Code: [Select]
#define MAX_STRING 30
char pc[4][MAX_STRING+1];

This allocates the space for the char arrays to be a known size (MAX_STRING). I add 1 to the definition so that the '\0' terminator can also fit in and I actually get the number of characters I need.

To access the first string use pc[0], then pc[1], etc, just like in the previous declaration.
Arduino Libraries http://arduinocode.codeplex.com
Parola for Arduino http://parola.codeplex.com
Arduino++ blog https://arduinoplusplus.wordpress.com

passman

Thanks for the information. I'll go away and try to implement it.

nash68

Thanks for your answer Marco. I understand the logic.

Maybe in a next version you include a text animation that allowed to flip two words in the scrolling (NEW  -- HOT  ie).

... then with the custom chars I'll have my invader moving lol !

Go Up
 


Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

Arduino
via Egeo 16
Torino, 10131
Italy