Arduino Forum

Community => Exhibition / Gallery => Topic started by: marco_c on Jun 09, 2013, 06:39 am

Title: LED matrix display - MD_Parola, MD_MAX72xx and MD_MAXPanel
Post by: marco_c on Jun 09, 2013, 06:39 am
My latest project is a scrolling text display.

Parola is a modular scrolling text display using MAX7219/21 LED matrix display controllers. The display is made up of any number of identical modules that are plugged together to create a wider/longer display.

The aim was to create a 'lego-like' approach to LED matrix display, using standard 8x8 LED matrices. The software supports this flexibility through a scalable approach that only requires the definition of the number of modules to adapt existing software to a new configuration.

The library implements functions to simplify the implementation of text special effects on the LED matrix.
  * Text left, right or center justification in the display
  * Text scrolling, appearance and disappearance effects
  * Control display parameters and animation speed
  * Support for hardware SPI interface

Hardware and software are available at https://github.com/MajicDesigns/MD_Parola (https://github.com/MajicDesigns/MD_Parola).
A video of the system working at http://www.youtube.com/watch?v=JgzVCSFaz3I&feature=youtu.be (http://www.youtube.com/watch?v=JgzVCSFaz3I&feature=youtu.be)
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: strykeroz on Jun 09, 2013, 07:38 am
Hi

That looks tremendous - well done!

I had a few modules laying about that I picked up from DX but wouldn't you know it, they don't have the connectors on the edges so they don't chain anywhere as nicely as yours.

Great stuff.  Of course I'll have Popcorn playing on tight rotation on brain-FM now for the rest of the afternoon after your video :)

Cheers ! Geoff
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Jun 09, 2013, 08:27 am
Thanks. I started with the DX/eBay modules as well but they have the connector on the wrong edge so I designed my own.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: Pedro147 on Jun 10, 2013, 01:48 am
Wow Marco,

what can I say "magnifico" What a great range of effects, I cannot think of anything else you might make them do but I am sure you will think of something. I had a look at your links but I must be missing something. Where can the control boards be purchased and where might there be information for connecting the switching controls and associated wiring,

thanks Pedro
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: CrossRoads on Jun 10, 2013, 02:49 am
Links for downloads lead here Pedro
https://code.google.com/p/parola-for-arduino/downloads/list
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: Pedro147 on Jun 10, 2013, 03:45 am
Thanks Crossroads. I saw the library file on the original link but not the board files.

Sharp as a tack today Pedro  8)

This now makes any 7219 projects that I try pale into insignificance
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Jun 10, 2013, 03:59 am
Thanks Pedro. I am sure that it could do a lot more but I have run out of interest at the moment and want to move on to something else. Maybe if others write effects they can be built into a future release ...

Documentation is included with the library in the docs folder as an html file.

Boards are not 'for sale' as such, but it is easy enough to use the SeedStudio files to have some made. It is actually quite cheap (about AUS$15 delivered to Australia) for 10 boards, so if you have not tried doing this before, give it a go. Takes about 2 weeks from order to postman delivering.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: Pedro147 on Jun 10, 2013, 04:39 am
Thanks Marco,

you are too humble. I did not realise that you could get boards made so cheaply, so I will definitely order some and "start to a soldering" I have been having a go at a bit of toner transfer PCB making at home, but having some professionally made boards to work with would be great. Keep up the good work,

Pedro.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: CrossRoads on Jun 10, 2013, 04:52 am
If you check e-bay, there are plenty of MAX7219 modules that have a chip, matrix, and input & output pins.
For example:
http://www.ebay.com/itm/1PCS-MAX7219-Dot-matrix-module-MCU-control-Display-module-DIY-kit-for-Arduino-/370827957354?pt=LH_DefaultDomain_0&hash=item565711946a

SMD versions too
http://www.ebay.com/itm/2x-Blue-8x8-LED-matrix-Max7219-Seamless-Cascadable-Arduino-PIC-Rasberry-Pi-MJKZZ-/390607543935?pt=LH_DefaultDomain_0&hash=item5af2061e7f
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Jun 10, 2013, 05:39 am
I did buy one of those larger units on eBay, as I started out wanting to use these 'off the shelf' type - they are pretty cheap. The problem (for me at least) is that the connections do not allow them to be joined up without cables. My design is similar but has connectors on the edges so the modules can be just plugged together.

The SMD units are more like where I would like to be at, but they are too expensive for my budget.

Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: CrossRoads on Jun 10, 2013, 06:37 am
If one set of female headers is replaced with female right angle headers,
http://www.karlssonrobotics.com/cart/6-pin-right-angle-female-header/?gclid=CLyetIbV2LcCFYyY4Aodsj8AWQ
then adjacent boards can be plugged together.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Jun 10, 2013, 06:41 am
Quote
If one set of female headers is replaced with female right angle headers,
http://www.karlssonrobotics.com/cart/6-pin-right-angle-female-header/?gclid=CLyetIbV2LcCFYyY4Aodsj8AWQ
then adjacent boards can be plugged together.


No doubt, but then with the joined units you have the matrix, the IC and then the next matrix. The matrices do not butt up against each other so, unless I am missing something, you can't build a continuous display (ie, matrix next to matrix next to matrix with no gaps).

Edit: for the sake of clarity I am not referring to the SMD units.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: daveydav27 on Jun 10, 2013, 01:01 pm
Very nice work. This is something I may look into using sometime.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: strykeroz on Jun 10, 2013, 01:53 pm

Edit: for the sake of clarity I am not referring to the SMD units.
Where did you source your 8x8 matrices for use on your boards, and have you tried more than 10 connected?

Geoff
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Jun 10, 2013, 11:48 pm
The section of the video showing 'Scrolling' has 12 units daisy chained and working together. That's all the boards I have made up to date. At this stage I don't expect to be building up the remaining 8 spare PCB (I had 2 lots of 10 made up), but I can't see any issues arising from having more of the units connected. Any specific reason you see 10 as a limit?

I get my 8x8 matrices from eBay. The last lot I bought were from http://www.ebay.com.au/itm/230754163950?ssPageName=STRK:MEWNX:IT&_trksid=p3984.m1439.l2649 (http://www.ebay.com.au/itm/230754163950?ssPageName=STRK:MEWNX:IT&_trksid=p3984.m1439.l2649).

The controller chips come from Tayda Electronics http://www.taydaelectronics.com (http://www.taydaelectronics.com). They are about $1.25 each, so are probably not 'genuine' but seem to work perfectly well. Here is an interesting article about that http://tronixstuff.wordpress.com/2013/05/16/the-max7219-led-display-controller-real-or-fake/ (http://tronixstuff.wordpress.com/2013/05/16/the-max7219-led-display-controller-real-or-fake/). I also get my passive components from Tayda.

Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: strykeroz on Jun 10, 2013, 11:55 pm
Thanks !
Any specific reason you see 10 as a limit?
No reason, I actually mis-counted the modules in the video  :)

Thanks!
Geoff
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Jun 15, 2013, 04:13 am
The web site has been updated with an additional PDF file documenting the hardware BoM, component sources, and assembly of the PCB.
https://parola.codeplex.com (https://parola.codeplex.com)
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: Pedro147 on Jun 15, 2013, 03:31 pm
Great job on the PDF Marco
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: Pedro147 on Jul 20, 2013, 02:44 am
Marco,

I have just completed populating eight of your boards and would just like to compliment you on your well written assembly documentation
+1 Buddha points from me  8)

Pedro
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: strykeroz on Jul 20, 2013, 05:43 am
That's top feedback Pedro.  It did look very comprehensive.  I've ordered my components - going to tack 20 of these boards onto my next Seeed order  :)

Geoff
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: Pedro147 on Jul 20, 2013, 06:24 am
You will not be disappointed Geoff. I only have eight going at the moment but four more would be good. I am  currently looking at the code examples to work out how to only use combinations of some of the functions. Great library.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: strykeroz on Aug 10, 2013, 07:25 am
Marco wanted to say thanks again.  I've made up 20 of these and the result is lovely, and still plenty bright enough even powered from an Arduino.  My intent is to make this into a self-contained display with an ATMega embedded in it.  I have a small bug to work out yet - the 16th module from the left (regardless how I shuffle the modules) has several horizontal lines displayed.  I'll do some more investigation on that.

Cheers ! Geoff
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Aug 10, 2013, 01:50 pm
Thanks. I also got lines sometimes and what fixed mine was powering down the display (remove the connector) and then back on again, followed by an Arduino reset.  To me it seems there is some timing issue on the reset at the start, as it appears to happen more frequently when many modules are used.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: strykeroz on Aug 10, 2013, 02:11 pm
hmm mine is more of a constant.  There is always 4 lines on the 16th module regardless which module I swap in there and tonight I've swapped them around a few times to confirm.  I have seen the effects you mention though, on other parts of the display especially if I hit reset when an animation is in progress.  Hopefully I'll get some time to look into it more closely this week.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Aug 14, 2013, 12:39 am
I have received a few private emails about this project and it is good to see that others are able to use the information to do their own thing. Of interest may be the following from one of the emails as it relates to some hardware behaviour noted in earlier posts:

Quote
I didn't change any of your parts or circuitry, but I did add an adapter board with 3 x 10K resistors on it. They go between DI, CLK and CS to ground. When the Arduino starts up or I reset it, the matrix doesn't flash up briefly before displaying.

One thing I have noticed is that some modules show junk at start up (and it never goes away). If I rearrange the modules (reposition the module that shows junk) they all still work. Just a case of finding a position it works at. I suspect it's the 7219's that might be getting through the QA check a little too fast...


If anyone finds the solution to the 'junk' being displayed, please let us all know...
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: strykeroz on Aug 14, 2013, 01:27 am

If anyone finds the solution to the 'junk' being displayed, please let us all know...
Hi, Mine is solidly always the module 16th from the left, and always the same pattern.  Has anyone in your PM conversations tried 20?

It's not a major issue as I'm thinking 20 is probably a bit too long to make a mount for and I'm likely to break it into two horizontal rows of 10.  But it's a puzzle!
Geoff
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Aug 14, 2013, 02:24 am
Same person that gave the feedback above was running 20 of them.
Correction: 20 were made but the display is only 10 modules.

Quote
I ordered some Parola PCB's from SeeedStudio, got the parts and LED 8x8's and built up 20 boards. Built them up like Lego's and they worked first time.


I must say yours is a weird one, being in the same position irrespective of which module it is. If you PM me I can put you in touch with the other 20 board pioneer :)

Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: wabbitguy on Aug 27, 2013, 01:07 am
I'm one of the guys with 20 modules that has been doing a lot of testing trying to see what works to get the artifacts off the Parola displays. And I'm posting to say that I was pretty much convinced if the display suffers from that, I was stuck with it. However after a lot of hours of "tweaking", I have a work around that I use.

To start with, after doing everything from building tri-state buffers (to inhibit the signals from a cold boot), triggers to clean up the wave forms, pull-down resistors, and generally mucking around in the MDMAX library, and using my scope to make sure all was well, I found that if I disconnected the Vcc after the Arduino booted up (I'm using a MEGA 2560), then reconnected Vcc and do a soft reset on the Arduino, the crud was gone. Every time. If you try this you'll probably find that once running even when you disconnect Vcc, the displays will stay on. Something isn't right there and I believe that's a "clone" chip problem.

I also found that I needed to add 10+ modules before any artifacts ever showed any way. The artifacts were also random. The best way to force them to appear, power down the Arduino and power it back up within a few seconds. If I let it sit for a few minutes and powered it, I got "luckier" and had less artifacts. Sometimes this lead me to believe I'd found the magic cure. Nope.

So in programmer speak I came up with YAWA based on how I noticed the displays did work. Yet another work around.

What I did was built a power adaptor board where I can cold boot the Arduino, and in the setup() I can enable a pin to turn on the Parola power (after which I delay 1 second to let the chips fall where they may). Hence, when I power up the Arduino, if there are any artifacts on the displays, a warm reset will clear them every time.

The power adaptor uses a 2N3904 to drive a P-Channel MOSFET. It's not designed for high speed switching on and off but it works on my 20 modules every time. Sort of a digital "magic wipe"...:)

In my project I'm only using 10 of the modules (it's a birthday present for my brother). There's a DS3231 RTC, a Bluetooth HC-04 (connected to Serial1). The project is controlled by any Bluetooth terminal so I can toggle between clock and scrolling message, any changes are stored in EEPROM for a reboot. On the inside from left to right you can see my power board, MEGA with proto-shield; RTC and Bluetooth, and buck converter to take 9-12VDC and knock it down to 7V to feed the Arduino's power jack.

Mel
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: strykeroz on Aug 27, 2013, 08:16 am
Nice one Mel,

I really do like the wood-grain case.  I'll give your idea of cycling the power manually on my 20-array tonight.  If that works I have some logic-level MOSFETs somewhere so will make up a standalone board with the ATMega and MOSFET to drive that.

Thanks for sharing your experiences,
Geoff
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: wabbitguy on Aug 27, 2013, 09:06 am

Nice one Mel,

I really do like the wood-grain case.  I'll give your idea of cycling the power manually on my 20-array tonight.  If that works I have some logic-level MOSFETs somewhere so will make up a standalone board with the ATMega and MOSFET to drive that.

Thanks for sharing your experiences,
Geoff


I just put together a second 10 module unit tonight and it works with the power adaptor board as well. Curious to see how yours works out Geoff and if that mod does help with the artifacts. To save you time wiring the board thing up, you can simply disconnect Vcc at the Parola, give it second or two, plug it back in, then do a soft reset on the Arduino. That should work as well.

Mel
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: strykeroz on Aug 27, 2013, 02:32 pm
My results were a little different.  Pulling the +5V on the 20 module array didn't stop it - it just continued to run dimmer than before with the same aberrations.  So I kept the wires connected from the Uno to the 20th module and just disconnected it from all the others, causing them to black out (including module 16 with the problem).  I then reconnected the array and they stayed dark; pressed reset on the Arduino and the 20 module array was working perfectly without any corruptions showing.

It ran for about 20minutes just now without anything unwanted displaying.  I think we have a winner.  Thanks again Mel!  I'll make sure when this sign goes standalone to include that power cycle on startup.

Incidentally, why use the transistor with the IRF9540 since it would appear logic level will be enough to switch that MOSFET on its own?

Thanks
Geoff
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Sep 10, 2013, 04:50 am
Some breaking news.

Tayda Electronics (http://www.taydaelectronics.com (http://www.taydaelectronics.com)) are starting a kit section in additon to their component store and will be carrying instructions for Parola on their kits website http://www.taydakits.com/instructions/parola-for-arduino (http://www.taydakits.com/instructions/parola-for-arduino). They are now also stocking the LED matrix displays and right angle edge sockets, so you can buy all the parts from one source. I am hoping that they will eventually sell these as a kit, including the Parola PCB, which will make it more accessible to everyone.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: Pedro147 on Sep 10, 2013, 07:39 am
Congratulations Marco. You deserve some recognition for this project, it is a great piece of engineering  8)
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: wabbitguy on Sep 10, 2013, 08:31 am

My results were a little different.  Pulling the +5V on the 20 module array didn't stop it - it just continued to run dimmer than before with the same aberrations.  So I kept the wires connected from the Uno to the 20th module and just disconnected it from all the others, causing them to black out (including module 16 with the problem).  I then reconnected the array and they stayed dark; pressed reset on the Arduino and the 20 module array was working perfectly without any corruptions showing.

It ran for about 20minutes just now without anything unwanted displaying.  I think we have a winner.  Thanks again Mel!  I'll make sure when this sign goes standalone to include that power cycle on startup.

Incidentally, why use the transistor with the IRF9540 since it would appear logic level will be enough to switch that MOSFET on its own?

Thanks
Geoff


The MOSFET is biased to keep it off when the Arduino cold starts so no power gets to the Parola boards. Normally the Arduino is in high impedance state during start up, so with a pull down resistor on the 3904 it keeps it off, and the positive bias on the MOSFET keeps it off.

Having said that, on a MEGA the circuit works exactly the way I expected it to. The power goes out, the MEGA resets, the power comes back on.

On some of the UNO's I have, not so much. I found my power LED indicator on the board flashes in sync with the D13 LED on the UNO. Which still seems to clear the artifacts from the displays with a warm reset, but obviously the UNO and MEGA reset is different.

I use an UNO for testing but normally almost everything here runs off MEGA 2560's.

I also found that you can pull the Vcc, then each of the three signal lines in any order and it's only when the last one is pulled that the display goes dark. I'm guessing that with these obvious clone chips, the logic levels from the Arduino are enough to keep the chip doing a bleed internally so all they do is dim. I also built 10 modules with 7221's in place of the 7219's and it makes no difference. Personally I think these are all the same chip and all they do is change the silk screening...

Mel
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: strykeroz on Sep 10, 2013, 01:03 pm

Some breaking news.  Tayda Electronics (http://www.taydaelectronics.com (http://www.taydaelectronics.com)) are starting a kit section in additon to their component store and will be carrying instructions for Parola on their kits website http://www.taydakits.com/instructions/parola-for-arduino (http://www.taydakits.com/instructions/parola-for-arduino).
Nice work Marco!  That certainly does make it more convenient to get some more modules made.  The kits I've bought there in the past used stripboard so it will be a welcome move if they start selling formed boards for these too.

Congrats - Geoff
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: wabbitguy on Sep 11, 2013, 01:39 am
I finished putting together some more modules so I have a total of 24 running in the attached photo's. When you get this many modules, some of the entry and exit effects are pretty slow. The left side modules are using 7219's the right half using 7221's. Or perhaps I should say, the silk screen on the chips indicates either a 7219 or 7221. What's underneath the silk screen is any ones guess...

It's using my power board that I referenced in an earlier post and with that board I find that if I power down the Arduino, wait a few minutes, power it back up, I rarely get artifacts on those displays. If I cycle the power, I almost always get some on one or more displays but a warm reset always clears it.

In the photo you can see the UNO and power board on the right edge of the picture. When I power cycle the UNO or even upload a sketch to it, my power board cycles on/off twice and then stays off until the sketch starts. Even a warm reset will do this "double cycle". None of my MEGA's do this, so it's something unique to the UNO. Not that it matters a fig any way since the object is to clear all the junk from the displays.

Current draw, which is dependant on what's being displayed, for the second photo (Powered by) where almost every module has something on it, I registered 180ma and that includes the power the UNO uses. I'm using 68K resistors on the Parola PCB's mainly because I don't have any 62K.

I kind of wish I hadn't finished off the previous two projects because I'm curious to see what a 44 module string would look like (other than really long; the 24 modules take 30.5")...:)

Mel
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: jezza103 on Sep 13, 2013, 02:24 am
That is a very cool display. Very nice work and your wiring is so neat. My projects look like a spider orgy lol. :smiley-red:
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: alparent on Oct 09, 2013, 08:01 pm
This is a great project. I'm building this with my 10 year old son. He is great at soldering.
In the Tayda site instructions there is a mention of a controle module being developed. (The one used in the video I guess?) Any news about that?

Thanks for the great woek and for sharing.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Oct 10, 2013, 03:54 am
I am guessing here that you are referring to the Parola modules and not Mel's clock project :-)

Not sure what you mean by the control module, and I can't see a reference to it on the Tayda site. The instructions are basically the same as the BoM PDF file on Google code site (link below).

The controller in the video is an Arduino Uno running one of the example sketches that come with the Parola library download. The switches and pots are just connected to a I/O shield, I just have pre-built switches, etc, on small PCBs with standard Ground Volt and Signal (GVS) headers that make hooking up things easier and faster. The details of the pins connected are in the sketches.

If you meant something else, please let me know. If you are interested in the modular approach to my system, I am happy to share as it is not my original idea.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: alparent on Oct 10, 2013, 05:08 am
This is what I'm talking about.

"It is also recommended to use a prototyping shield of some sort to connect the led matrices and interface with some sort of controller. (Instructions for this coming soon.) "

Taken from Page 2

Thanks
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: wabbitguy on Oct 10, 2013, 06:05 am

I am guessing here that you are referring to the Parola modules and not Mel's clock project :-)


Hey, whatcha got against clocks with scrollie messages....LOL

As an aside, I wrote a Mac program that connects to the clock/scrolling message and allows me completely program it from the computer via bluetooth. I also put in an LDR so the project auto dims at night so as not to light up the room...:)

I did read that "interesting" line on page 2 as well. Confused the heck out of me. But then, for the most part, I confuse easy any way...

I used my 24 module to do a fake "NYSE" ticker for a friend...these Parola's are still a hoot to use...

Mel
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Oct 10, 2013, 09:39 am
OK, thanks for pointing that out. It was added by the staff at Tayda, I guess trying to be helpful.

It is now changed to
Quote
The video shows connections from a prototyping shield to connect the led matrices and the controls used to demonstrate the functionality of the software, but any of the usual connection methods will suffice.


The sensor shield is available a number of places, like on eBay http://www.ebay.com.au/itm/Sensor-Shield-V5-For-Arduino-APC220-Bluetooth-Analog-Module-Servo-Motor-TR-/310722948446?pt=AU_B_I_Electrical_Test_Equipment&hash=item485887ed5e (http://www.ebay.com.au/itm/Sensor-Shield-V5-For-Arduino-APC220-Bluetooth-Analog-Module-Servo-Motor-TR-/310722948446?pt=AU_B_I_Electrical_Test_Equipment&hash=item485887ed5e). These shields standardise the digital and analog pins to a 3 pin interface (Ground, Voltage, Signal) so that standard connection wires (for example, http://www.ebay.com.au/itm/10pcs-3pin-20cm-2-54mm-Female-to-Female-jumper-wire-Dupont-cable-for-Arduino-/390556203029?pt=LH_DefaultDomain_0&hash=item5aeef6b815 (http://www.ebay.com.au/itm/10pcs-3pin-20cm-2-54mm-Female-to-Female-jumper-wire-Dupont-cable-for-Arduino-/390556203029?pt=LH_DefaultDomain_0&hash=item5aeef6b815)) can be used to rapidly connect sensors.

I build the simple circuits on small circuit boards (http://www.ebay.com.au/itm/GRS-24-X-1-Square-Prototype-Circuit-Board-Kit-PCB-Proto-/281140536860?pt=LH_DefaultDomain_0&hash=item417548261c) on which I mount a 3 pin connector for GVS. Boards have switches, LEDs, pots, lasers, IR detectors, Temp sensor, etc, mounted so that I have built a 'library' of standard modules that I can easily cable together to prototype ideas without fiddling with breadboard wires for the simple stuff. I also have some larger boards for LED display through 595 interfaces where the 595 inputs are GVS (3x3 pins) so that I can use these quickly as well.

Works for me and is completely reusable. You see the boards, with switches mounted, in the Parola video.

Hmm, re-reading that seems like a buy a lot of stuff on eBay.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: Pedro147 on Oct 11, 2013, 01:15 am


Hmm, re-reading that seems like a buy a lot of stuff on eBay.


It's OK Marco we won't tell your wife  8)

Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Nov 05, 2013, 08:30 am
I have reworked the MD_MAX72xx libraries for Parola and the whole system can now run on the more generic hardware modules with connectors at the top and bottom. Library version 2.2 is available in the repository (link below). You need to use the compiler switch USE_PAROLA_HW to switch the code in the library between hardware types. Please read the accompanying html documentation.

Thanks to Mel for Beta testing!
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: strykeroz on Nov 05, 2013, 08:38 am
Thanks Marco - that's going to be a very handy enhancement as I have a few of these laying about too.

Cheers ! Geoff
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: Docedison on Dec 01, 2013, 02:59 am
I just built eight of these modules with parts from ElectroDragon and it is easily the most satisfying Arduino project I've ever built.
All I needed to do was change the message in the demo and the number of displays. The code compiled without error and worked at first go. The Electrodragon boards were modified slightly from the original to use wider traces for power and ground and data between modules. The supplied artwork can go directly to SeeedStudios for manufacture and the total cost was less than $30.00 for all eight of the modules I built... Wow, I got Blinken Lites...

Doc
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: odometer on Dec 01, 2013, 10:58 am

Great stuff.  Of course I'll have Popcorn playing on tight rotation on brain-FM now for the rest of the afternoon after your video :)

That song is a tango, believe it or not. At least I've heard it used as one.

Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: odometer on Dec 01, 2013, 11:09 am
Some basic questions:

1) How big are the displays? (I mean in millimeters)
2) At what frequency do the displays flicker? From what I understand, all such displays do flicker; it's just a question of at what rate. If the rate is poorly chosen, the display will be annoying if not painful to look at.
3) How would I go about changing the font?

Note: if the digits are not all the same width, then if you have a clock showing seconds, the numerals will jump around on you.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Dec 01, 2013, 11:18 am
1. The display matrix is about 1.2" square
2. The MAX7219 datasheet says the refresh is minimum 500 Hz, typical 800 Hz. Animation speed depends on what the program does but it can run faster than you can read, for sure. These are definitely not painful on the eyes.
3. Font file is in the library as data. Easy to change if you want to. If you do, send me a copy and it can be included in the main library.

Proportional and fixed width fonts are included. Text messages work best as proportional. Things like the time need a fixed font. The numerals only jump if you want them to.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: Pedro147 on Dec 04, 2013, 03:04 am
I was so impressed with Marco's Parola for Arduino project that I have, with Crossroads invaluable help, designed a PCB that uses the larger 60 mm square LED matrices. Here is the thread  (http://forum.arduino.cc/index.php?topic=197027.0)where this is developed and once I have done some minor tidying up of the Eagle package Marco has kindly allowed me to put the files up on his Parola site for download. The final version of the Eagle files in reply # 28 of that thread are functional aside from the fact that the drill hole size for the sixteen LED matrix holes are marginally too small. This, along with some other minor cleaning up will be done before they are put up on the Parola site.
Pedro.

EDIT - Marco has moved his Parola project to GitHub and consequently the Bigger Parola files have moved there too

https://github.com/MajicDesigns/MD_Parola/tree/master/hardware/Larger%20Parola%20Module%20by%20Pedro147 (https://github.com/MajicDesigns/MD_Parola/tree/master/hardware/Larger%20Parola%20Module%20by%20Pedro147)
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Dec 04, 2013, 04:31 am
Great work Pedro.

Now we have Mama Parola and Baby Parola. Who will do a Papa Parola? I am expecting window size :-)

Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: odometer on Dec 04, 2013, 07:11 pm
How much to buy the things already assembled? Or at least with a circuit board already printed; I haven't the facilities for printing them.

Also, is there any intermediate size of matrix (maybe 40 or 50 millimeters) available?
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: CrossRoads on Dec 04, 2013, 09:59 pm
check e-bay, several sizes are available. May not have the nice, neat interconnections, you'll have to take care of that.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: wilson16 on Dec 05, 2013, 02:37 pm
got link to download this MD_MAX72xx.h ?  :)
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: wabbitguy on Dec 05, 2013, 05:52 pm

got link to download this MD_MAX72xx.h ?  :)


It's a little tough to find on the CodePlex site but here's the link:

http://arduinocode.codeplex.com/downloads/get/761587

Mel
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: wilson16 on Dec 06, 2013, 10:32 am
thank you very much :) :) :) :)
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: Pedro147 on Dec 12, 2013, 01:27 am
Marco has kindly allowed me to host my files for the Bigger Arduino V1 on his Github page here

https://github.com/MajicDesigns/MD_Parola/tree/master/hardware/Larger%20Parola%20Module%20by%20Pedro147 (https://github.com/MajicDesigns/MD_Parola/tree/master/hardware/Larger%20Parola%20Module%20by%20Pedro147)

The Eagle schematic and board files, seeedstudio gerbers and custom 8 x 8 LED matrix are all included.

Pedro
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: Pedro147 on Dec 14, 2013, 05:57 am
I still have a bit more work to go but these "Mama Parola" 60 mm displays are looking good  :D

http://www.youtube.com/watch?v=QXIf5Z4g-v8&feature=c4-overview&list=UUiDU4JVEj5d6OgizDqoi_SA (http://www.youtube.com/watch?v=QXIf5Z4g-v8&feature=c4-overview&list=UUiDU4JVEj5d6OgizDqoi_SA)
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: CrossRoads on Dec 14, 2013, 06:16 am
Looks good Pedro - get a tripod for that camera tho & fire the cameraman :)
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: Pedro147 on Dec 14, 2013, 07:40 am
Too true Crossroads,
I have been meaning to fire that guy for ages   8)  And that was after a bit of Youtube video stabilisation too. I will have to shout myself a tripod for Christmas, which reminds me, all the best to you and your family for the festive season and stay safe,
Pedro
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: CrossRoads on Dec 14, 2013, 07:48 am
Thank you Pedro, and all the best to you and yours!
Big snow storm coming in tomorrow, 8-10-12 inchese expected.
So, teach fencing class in the morning, snowblowing in the afternoon!
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: maki007 on Dec 15, 2013, 08:13 pm
Hello
I am new to dotmatrix and arduino I love your libery but have a problem I use the one (picture)
So when I connect 2 unites  it the text scrolls text to each other is it possible to rotate the direction of text!

Thank you in advance!

(http://i.ebayimg.com/t/MAX7219-Dot-matrix-module-MCU-control-Display-module-for-Arduino-DIY-kit-/00/s/ODAwWDEwMDA=/z/RD8AAOxy-j9SRlM1/$%28KGrHqF,!rMFJCue9%280jBSRlM01%28Yw~~60_57.JPG)
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Dec 15, 2013, 08:18 pm
Download the latest MD_Max72xx library and read the documentation. There is now a library switch that allows the use of these more common displays. You need to change it before compiling the code.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: maki007 on Dec 15, 2013, 09:37 pm
Hello
First thank you for fast reply!  :)
bu I canot find this V2 on http://parola.codeplex.com/ can you pleas give me the link!
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: wabbitguy on Dec 15, 2013, 10:53 pm

Hello
First thank you for fast reply!  :)
bu I canot find this V2 on http://parola.codeplex.com/ can you pleas give me the link!


Try this link for the MD_MAXxx library:

http://arduinocode.codeplex.com/downloads/get/761587

Mel
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Dec 16, 2013, 12:45 am
Quote
can you pleas give me the link!


Also in my signature block.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: maki007 on Dec 16, 2013, 01:31 am
Hello
Thank you bought!
I made it work and I am relay grateful!
:)

One more question!
Is it possible to have special characters ? Š ? Ž ?

Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Dec 16, 2013, 02:10 am
you can define your own character if you want. The current character set does not have your characters.

You need to modify the data file where the font is located (it will have FONT in the name) and replace one of the existing characters with your own. The documentation tells you a bit about the character set definition and if you map out the current data as bits (convert from hex) you should be able to work it out.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: wabbitguy on Dec 16, 2013, 02:44 am

Quote
can you pleas give me the link!


Also in my signature block.


The signature block points to code.Google, however the code now sits are codeplex....time to update the signature link?...:-)

Mel
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Dec 16, 2013, 02:49 am
Yes I totally agree! And I have done so 30 times already but it keeps changing back.

http://forum.arduino.cc/index.php?topic=202429.0

The best I can do is a redirect. It is needed anyway because the site has been referenced in a few places outside my control.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: wabbitguy on Dec 16, 2013, 02:52 am

Yes I totally agree! And I have done so 30 times already but it keeps changing back.

The best I can do is a redirect. It is needed anyway because the site has been referenced in a few places outside my control.


Don't you just HATE it when that happens...ROFLOL

Mel
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: Paul__B on Dec 16, 2013, 09:43 pm

Yes I totally agree! And I have done so 30 times already but it keeps changing back.


Apparently a side effect of some peculiar "anti-spam" policy which has been enforced none too skilfully.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: gusset25 on Jan 04, 2014, 10:36 pm
i'm thinking of using parola for a 50-unit display. how do i approach the power requirements?

and which is the library containing the font data, as I will need to amend it?

thanks
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Jan 04, 2014, 11:27 pm
The power requirements depend on how many LED elements are on at once once, but you should use 200mA per unit as an approximate calculation. You could measure the current of a unit will display full-on using a multiumeter.

I would also not just inject the power at one end of the chain as this will probably cause you problems because of the long run (resistance = voltage drop). You will need to have multiple points where power is applied along the chain. You may also want to consider soldering the units together rather than plugging them in to reduce the resistance of the joints.

Fonts are in the MD_MAX72XX font file. Read the documentation to understand how the font is encoded.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Jan 26, 2014, 02:02 am
I am planning an upgrade to the Parola and MD_MAX72xx libraries.

I will be working on the following:
- Additional animation that makes the displayed text scan before it appears. The text will be in place but shown one line or one column at a time before finally being shown.
- Allow for different zones in the display that effectively turns the display into multiple displays. Allows for different animations in the different zones - for example, a clock display 'always on' in one part and a scrolling text message in a second part.

Does anyone have any issues or suggestions for improvements and/or new features?
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: wabbitguy on Jan 26, 2014, 03:52 am

I am planning an upgrade to the Parola and MD_MAX72xx libraries.

Does anyone have any issues or suggestions for improvements and/or new features?

I can only think of two I'd like to see.

The first would be multiple lines of Parola displays where each line is independent of the other.

With the addition of your individual zone theme, the second would be custom character creation like one can do for LCD displays.

Mel
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Jan 26, 2014, 09:40 am
Quote
The first would be multiple lines of Parola displays where each line is independent of the other.


I think you can do this as is. I had some code I was playing with to do this, but did not include it in the last release. It is, however, in the codeplex source repository. Maybe have a look at that example and see if it does 'sort of' what you are looking for. From memory it was never really finished, just used as a proof of concept.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: strykeroz on Jan 26, 2014, 11:11 am
Are you planning much of a revision to the module PCB at this time?

Geoff
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Jan 26, 2014, 11:12 am
Software only. I was not planning to revisit the hardware.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: Paul__B on Jan 26, 2014, 01:10 pm

I would also not just inject the power at one end of the chain as this will probably cause you problems because of the long run (resistance = voltage drop). You will need to have multiple points where power is applied along the chain. You may also want to consider soldering the units together rather than plugging them in to reduce the resistance of the joints.


Methinks this may be at least as much a cause of the apparent limitation some people find with longer chains (such as more than 8 modules - and I am thinking of the the eBay ones) as driving the clock and latch lines.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: wabbitguy on Jan 26, 2014, 08:36 pm


I would also not just inject the power at one end of the chain as this will probably cause you problems because of the long run (resistance = voltage drop). You will need to have multiple points where power is applied along the chain. You may also want to consider soldering the units together rather than plugging them in to reduce the resistance of the joints.


Methinks this may be at least as much a cause of the apparent limitation some people find with longer chains (such as more than 8 modules - and I am thinking of the the eBay ones) as driving the clock and latch lines.


I've got a lot of modules of both the eBay style and Parola. I've done a lot of tests with both types of displays and when I used the official 7219/7221's from Maxim Integrated, no artifacts ever showed up and both styles of displays worked perfectly (I tested them out on a 22 module setup).

With the modules from eBay or the 7219's (I also tested out 7221's) from eBay, it didn't matter where or how many connections I made into the clock, latch or power lines for the displays. I still got artifacts. Almost always when working with 8 or more modules.

Of course the cost of the Maxim IC's alone are over twice what the whole matrix costs from eBay. When I was building the Parola boards, I could get 10 eBay 7219's for the cost of 1 Maxim IC.

The only conclusion I could draw was that the eBay 7219/7221's are knock off chips and simulate an official 7219/7221, but only to a point. Regardless of whatever part number is silk screened on the eBay IC's, they work differently than the Maxim chips.

The work around I use is my power control board for these displays when ever I use more than 8 displays with eBay chips.

Mel


Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: Pedro147 on Jan 27, 2014, 05:58 am
I finally finished putting my 8 x 60mm Bigger  Parola for Arduino displays into a timber enclosure with aluminium end plates. I fitted three momentary switches for the justification, mode and effect functions that Marco incorporated into his software and a pot for speed control. The eight LED displays are controlled by the miniscuino board that Crossroads helped me with. There is onboard 9 to 5 volt power regulation and a five pin connector on the rear to reprogram the Arduino via a FTDI cable. I  thought of painting the perspex front panel black to hide the electronics, but decided that I would leave it clear to "celebrate the circuitry"
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Jan 27, 2014, 06:27 am
Looks good Peter!
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: wabbitguy on Jan 27, 2014, 06:27 am

I finally finished putting my 8 x 60mm Bigger  Parola for Arduino displays into a timber enclosure with aluminium end plates. I fitted three momentary switches for the justification, mode and effect functions that Marco incorporated into his software and a pot for speed control. The eight LED displays are controlled by the miniscuino board that Crossroads helped me with. There is onboard 9 to 5 volt power regulation and a five pin connector on the rear to reprogram the Arduino via a FTDI cable. I  thought of painting the perspex front panel black to hide the electronics, but decided that I would leave it clear to "celebrate the circuitry"

Nice work Pedro!
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: Pedro147 on Jan 27, 2014, 06:40 am
Thanks fellas  :D
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: strykeroz on Jan 27, 2014, 08:13 am
I do love how the bigger matrix covers the entire PCB underneath.  Makes for a very neat enclosure.

Lovely work !
Geoff
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: Pedro147 on Jan 27, 2014, 09:15 am
Thanks Geoff. Yes the LED matrix nearly covers the entire PCB, but there is a 4mm strip of the board showing at the bottom of the matrix. This was the first time I had used Eagle and I initially moved the bottom of the board down because one of the traces was running too close to the bottom edge of the board. After Crossroads gave me some of his excellent tutelage and the offending trace was relocated, I never moved the board edge back to line up with the matrix. Oh well, overall I am very pleased with the result and to be able to use Marco's great software in a slightly bigger format.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: Karontes on Jan 28, 2014, 07:01 am
Dear marco_c,

I have seen that many of the commercial LED displays use two rows of 8x8 LED matrix modules, with the possibility of deploying larger letters occupying both lines simultaneously.

I searched on the internet for 3 days any such project with Arduino without success.

There are few well known modules that implement two lines:
http://www.adafruit.com/products/555
http://www.sureelectronics.net/goods.php?id=1137

And this, (not using 8x8 LED matrix modules):
http://www.freetronics.com/products/dot-matrix-display-32x16-red

There are also a couple of Chinese products but with very little or none documentation:
http://www.icstation.com/product_info.php?products_id=2609
http://www.emartee.com/product/41903/Arduino

But none is as good, simple and flexible as Parola!

If there exist the possibility that Parola, allow large letters and displays with arrays of 16xN, (now or in the future), Parola would be the only project of its kind.

I tried the library, with two Chinese modules of this type:
http://dx.com/p/max7219-dot-matrix-module-w-5-dupont-lines-184854

I activated the "USE_PAROLA_HW" switch and it worked, but the letters are vertically inverted, I could not fully understand how to use "USE_FONT_ADJUST" to reverse letters or I did well, but did not work.

If you could include in the renovation of the library, an example of use, with Chinese modules, help a lot to people who have these modules and want to quickly test the library before it can acquire or manufacture the hardware to Parola.

Thank you very much!,
(from Chile, South America).
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Jan 28, 2014, 09:31 am
@Karontes - can you please post a photo of what you mean about the modules vertically inverted?

Have you looked at the html documentation - there is a picture of the chinese modules connected.

For some reason the photo is not there! It is in the html documentation for the MD_MAX72xx library.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: wabbitguy on Jan 28, 2014, 05:29 pm
I tested out four and six of those eBay matrix modules with the Parola/MD library and it works fine.  I mounted the modules I got on a piece of perf board. The Arduino feeds the extreme right hand one (input is nearest the 7219 chip at the top). From there, I used Dupont jumpers to go from the out on the bottom to the input top on the next module (on the left).

Mel
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: Karontes on Jan 28, 2014, 06:31 pm
Dear wabbitguy,

That's right, just turn the switch "USE_PAROLA_HW" in the library to work properly with the Chinese Ebay modules.

But, I thought the "right" position of these modules was with Maxim chip down (since the module inputs are in this position and exits in the opposite position, at least for a beginner putting modules on a breadboard) and therefore the function "USE_FONT_ADJUST" helped to invert the position of letters, if not in this way, what is the use of this function?, I activated this switch in the library but did not get any change in the orientation of letters on the display.

There may be no "right" position of use of these modules, to add some pictures of the implementation with them in the documentation, would help clarify questions from beginners.

Here is a link with a Youtube video of my modules: http://youtu.be/_2h1B-6HM6A

Thanks!
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Jan 28, 2014, 10:03 pm
Quote
"USE_FONT_ADJUST" helped to invert the position of letters
If you read the MD_MAX72xx library documentation, this is an engineering function used when modifying the library. Inverting the letters does not reverse the scrolling, for example, so you end up with a mess. This is for people who may want to mount the modules vertically and want to rotate the letters so that they appear correct when the modules are mounted in that orientation. For normal operation, this should not be necessary.

Can you confirm that you found and read the library documentation? I am just interested as my impression is most people just jump in and run the examples.

Quote
to add some pictures of the implementation with them in the documentation, would help clarify questions from beginners
The picture is there in the MD_MAX72xx library documentation, so the question above is relevant here.

Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: eidbi on Feb 04, 2014, 01:15 pm
Hi Marco,
First, Thanks for a great project. I used the http://www.icstation.com/product_info.php?products_id=2609 to make a display. They are good because the PCB is exactly the same size as the led matrix. I used the "upside down" version of the font in MD_MAX72xx_font.cpp to get the text shown properly.
Regards,
Hamilton
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: alhootti on Feb 05, 2014, 03:36 pm
in the beganing i faced some problem but now every thing is ok except one.
How i can display text in Arabic language ?
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Feb 05, 2014, 07:13 pm
Displaying any text requires a font in that language. You can change the font to a different language by modifying the font file in the MD_MAX72xx library. Read the library documentation as it has a small section on the font format. If you do create an arabic font, send me the font file and I can include it in the next version of the software.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: alhootti on Feb 05, 2014, 08:33 pm
Marco you are great man.
Is there a software to help me to create arabic font?
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Feb 06, 2014, 02:17 am
No, you will need to code the font manually at this stage.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: alhootti on Feb 06, 2014, 09:45 am
My dear
i tried too much time but not succeeded
however
the folowing is arabic font code 8*8:

Code: [Select]

0x00,0x04,0x06,0x1D,0x25,0x24,0x20,0x20, //129/ --> ?
0x20,0x20,0x20,0x20,0xA0,0x20,0x28,0x30, //130/ --> ‚
0x00,0x30,0x28,0x20,0xA0,0x20,0x30,0x20, //132/ --> „
0x20,0x20,0x20,0x22,0x20,0x22,0x28,0x30, //133/ --> …
0x20,0x20,0x20,0x22,0x21,0x22,0x28,0x30, //136/ --> ˆ
0x20,0x20,0x20,0x22,0x31,0x22,0x20,0x20, //137/ --> ‰
0x00,0x30,0x28,0x22,0x21,0x22,0x30,0x20, //138/ --> ?
0x20,0x20,0x28,0x28,0x28,0xB0,0x20,0x20, //139/ --> ‹
0x20,0x20,0x28,0x2A,0x28,0x30,0x20,0x20, //141/ --> ?
0x00,0x24,0x24,0x24,0x38,0x20,0x20,0x20, //142/ --> ?
0x00,0x24,0x25,0x24,0x38,0x20,0x20,0x20, //143/ --> ?
0x00,0x80,0x80,0x40,0x30,0x20,0x20,0x20, //144/ --> ?
0x00,0x80,0x80,0x40,0x34,0x20,0x20,0x20, //145/ --> '
0x20,0x20,0x20,0x38,0x20,0x38,0x20,0x18, //146/ --> '
0x20,0x20,0x38,0x20,0x38,0x20,0x38,0x20, //147/ --> "
0x60,0x80,0x80,0x78,0x20,0x38,0x20,0x18, //148/ --> "
0x20,0x20,0x20,0x38,0x22,0x39,0x22,0x18, //149/ --> •
0x20,0x20,0x38,0x22,0x39,0x22,0x38,0x20, //150/ --> -
0x60,0x80,0x80,0x78,0x22,0x39,0x22,0x18, //151/ --> --
0x20,0x20,0x30,0x20,0x30,0x28,0x28,0x18, //152/ --> ?
0x60,0x80,0x80,0x60,0x30,0x28,0x28,0x38, //154/ --> ?
0x20,0x20,0x30,0x20,0x30,0x28,0x2A,0x18, //155/ --> ›
0x60,0x80,0x80,0x60,0x30,0x28,0x2A,0x38, //157/ --> ?
0x20,0x20,0x3E,0x30,0x28,0x28,0x38,0x20, //158/ --> ?
0x20,0x20,0x3E,0x30,0x28,0x2A,0x38,0x20, //159/ --> ?
0x20,0x20,0x20,0x20,0x30,0x28,0x28,0x00, //160/ -->  
0x20,0x20,0x20,0x30,0x28,0x28,0x20,0x20, //161/ --> ?
0x20,0x20,0x20,0x20,0x30,0x28,0x2A,0x30, //166/ --> ¦
0x20,0x20,0x30,0x2A,0x28,0x32,0x20,0x20, //170/ --> ?
0x60,0x80,0x80,0xB2,0xA8,0x7A,0x20,0x20, //171/ --> «
0x22,0x25,0x25,0x25,0x25,0x25,0x25,0x19, //172/ --> ¬
0x20,0x20,0x20,0x1C,0x22,0x21,0x20,0x20, //173/ --> ­
0x20,0x20,0x20,0x20,0x20,0x20,0x1F,0x00, //175/ -->
0x20,0x20,0x20,0x20,0x1F,0x20,0x20,0x20, //176/ --> °
0x00,0x30,0x40,0x40,0x3F,0x20,0x20,0x20, //177/ --> ±
0x20,0x20,0x20,0x20,0x30,0x48,0x48,0x30, //178/ --> ²
0x20,0x20,0x30,0x48,0x48,0x30,0x20,0x20, //179/ --> ³
0x80,0x40,0x30,0x48,0x48,0x30,0x20,0x20, //180/ --> ´
0x20,0x20,0x20,0x20,0x22,0x20,0x18,0x00, //181/ --> µ
0x20,0x20,0x20,0x20,0x1A,0x20,0x20,0x20, //182/ --> ¶
0x30,0x40,0x44,0x40,0x30,0x20,0x20,0x20, //183/ --> ·
0x20,0x20,0x20,0x30,0x28,0x3A,0x2C,0x18, //184/ --> ¸
0x20,0x20,0x30,0x28,0x3A,0x2C,0x38,0x20, //185/ --> ¹
0x00,0x18,0x14,0x14,0x18,0x20,0x20,0x20, //186/ --> ?
0x00,0x21,0x22,0x24,0x28,0x10,0x0F,0x00, //187/ --> »
0x00,0xB0,0xA8,0x78,0x20,0x20,0x20,0x20, //188/ --> ¼
0x20,0x20,0x20,0xA0,0x20,0xA0,0x28,0x30, //189/ --> ½
0x20,0x20,0x20,0xA0,0x30,0xA0,0x20,0x20, //190/ --> ¾
0x00,0x60,0x80,0x80,0xA0,0x50,0x10,0x20, //191/ --> ?
0x00,0x1E,0x20,0x20,0x20,0x20,0x20,0x20, //192/ --> ?
0x00,0x20,0x30,0x28,0x28,0x20,0x00,0x00, //193/ --> ?
0x00,0x04,0x02,0x02,0x3A,0x02,0x02,0x01, //194/ --> ?
0x00,0x00,0x04,0x06,0x3D,0x05,0x04,0x00, //195/ --> ?
0x00,0x00,0x04,0xB6,0xAD,0x7D,0x04,0x00, //196/ --> ?
0x00,0x00,0x80,0xC0,0xBF,0xA0,0x80,0x00, //197/ --> ?
0x04,0x66,0x85,0x95,0xA8,0xA8,0x48,0x00, //198/ --> ?
0x00,0x00,0x00,0x3F,0x00,0x00,0x00,0x00, //199/ --> ?
0x00,0x30,0x28,0x20,0xA0,0x20,0x28,0x30, //200/ --> ?
0x00,0x00,0x30,0x2A,0x28,0x32,0x00,0x00, //201/ --> ?
0x00,0x30,0x28,0x22,0x20,0x22,0x28,0x30, //202/ --> ?
0x00,0x30,0x28,0x22,0x21,0x22,0x28,0x30, //203/ --> ?
0x00,0xC0,0xA8,0xA8,0x28,0xB0,0x20,0x20, //204/ --> ?
0x00,0xC0,0xA8,0xA8,0xA8,0x30,0x20,0x20, //205/ --> ?
0x00,0xC0,0xA8,0xAA,0x28,0x30,0x20,0x20, //206/ --> ?
0x00,0x00,0x24,0x24,0x24,0x38,0x00,0x00, //207/ --> ?
0x00,0x00,0x24,0x25,0x24,0x38,0x00,0x00, //208/ --> ?
0x00,0x80,0x80,0x40,0x30,0x00,0x00,0x00, //209/ --> ?
0x00,0x00,0x80,0x80,0x40,0x34,0x00,0x00, //210/ --> ?
0x60,0x80,0x80,0x78,0x20,0x38,0x20,0x18, //211/ --> ?
0x60,0x80,0x80,0x78,0x22,0x39,0x22,0x18, //212/ --> ?
0x60,0x80,0x80,0x60,0x30,0x28,0x28,0x18, //213/ --> ?
0x60,0x80,0x80,0x60,0x30,0x28,0x2A,0x18, //214/ --> ?
0x00,0x22,0x14,0x08,0x14,0x22,0x00,0x00, //215/ --> ×
0x20,0x20,0x3E,0x30,0x28,0x28,0x18,0x00, //216/ --> ?
0x20,0x20,0x3E,0x30,0x28,0x2A,0x18,0x00, //217/ --> ?
0x00,0x00,0x40,0xA0,0xB0,0x28,0x28,0x00, //218/ --> ?
0x00,0x00,0x40,0xA0,0xB0,0x2A,0x28,0x00, //219/ --> ?
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, //220/ --> ?
0x00,0x18,0x20,0x20,0x30,0x28,0x2A,0x30, //221/ --> ?
0x00,0x60,0x80,0x80,0xB2,0xA8,0x7A,0x00, //222/ --> ?
0x00,0x30,0x28,0x2C,0x2A,0x20,0x3F,0x00, //223/ --> ?
0x00,0x40,0xA9,0xAA,0xA8,0xF0,0x00,0x00, //224/ --> à
0x00,0x00,0x60,0x80,0x80,0x7E,0x00,0x00, //225/ --> ?
0x00,0x40,0xAA,0xA9,0xAA,0xF0,0x00,0x00, //226/ --> â
0x00,0x00,0xC0,0x20,0x30,0x28,0x28,0x30, //227/ --> ?
0x00,0x00,0x60,0x80,0x88,0x80,0x60,0x00, //228/ --> ?
0x00,0x00,0x30,0x28,0x28,0x30,0x00,0x00, //229/ --> ?
0x00,0x00,0x00,0xB0,0xA8,0x78,0x00,0x00, //230/ --> ?
0x00,0x30,0x40,0x40,0x50,0x28,0x08,0x00, //236/ --> ?
0x00,0x30,0xC0,0x40,0xD0,0x28,0x08,0x00, //237/ --> ?
0x00,0x00,0x02,0x79,0x02,0x00,0x00,0x00, //238/ --> î
0x00,0x00,0x02,0x78,0x02,0x00,0x00,0x00, //239/ --> ï
0x00,0x00,0x00,0x00,0x00,0x05,0x05,0x05, //240/ --> ?
0x00,0x00,0x00,0x04,0x03,0x0B,0x06,0x06, //241/ --> ?
0xA0,0xA0,0xA0,0x00,0x00,0x00,0x00,0x00, //242/ --> ?
0x00,0x00,0x01,0x01,0x01,0x01,0x00,0x00, //243/ --> ?
0x00,0x40,0x60,0x50,0x48,0x50,0x40,0x40 //255/ --> ?
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Feb 08, 2014, 09:38 am
I have developed a pretty 'quick and dirty' font editor, as there seems to have been a number of questions around this aspect of the Parola software (file attached).

It is an Excel VBA program that pops up a form for editing each character (press the button next to each Id in the "Work Sheet" tab). Not fully completed yet but it does make the whole font editing/creation thing a lot easier. Happy for any feedback on bugs and/or functionality at this stage (bugs get fixed, functionality may wait).

The idea with this is that it creates the code to populate the font array via a simple cut and paste and the end of an editing session. The font data can be left in the excel workbook and copied to another sheet for future reference (as is the case for the standard font at the moment).

@alhootti - can you please check the arabic characters - I actually can't tell if they are correct. If there are errors in the import, can you please correct and send it back to me via PM. Arabic characters are in the Work sheet font at ASCII 129 onwards.

Anyone else who has created symbols/fonts, please let me know. This tool and any contributions will be in the next release.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: Pedro147 on Feb 08, 2014, 01:53 pm
Hi Marco.
I just saw your font editor. Hey do you ever sleep  XD I could not find anything on the Instructions tab. Thanks for another string for the Parola bow.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Feb 08, 2014, 07:49 pm
Hi Pedro - Instructions to come. As usual the documentation plays catchup.

Red area - no editing allowed. Green area - user changeable. Orange area - output for code arrays.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: Pedro147 on Feb 08, 2014, 09:29 pm
Thanks Marco.
I just thought that I would let you know in case there was a problem
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: alhootti on Feb 09, 2014, 12:34 am
Thank you Marco.
I will do .
Actionally, now im out of my town when i go back to my town i will keep you posted.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Feb 09, 2014, 08:39 am
Just updated the font builder file in previous post. Should be finished now - including Instructions :-)

The file currently has Katakana (Japanese), Arabic to be checked, standard font and a bunch of symbols. I am looking for a good source for a greek alphabet in dot form - any ideas?
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: alhootti on Feb 12, 2014, 06:49 pm
Marco I have some Questions:
when i cut and paste code it show like this:
Code: [Select]

uint8_t  _fontname[] PROGMEM = {
"0, // 0 - Empty Cell"
"5, 62, 91, 79, 91, 62, // 1 - Sad Smiley"
"5, 62, 107, 79, 107, 62, // 2 - Happy Smiley"
"5, 28, 62, 124, 62, 28, // 3 - Heart"
"5, 24, 60, 126, 60, 24, // 4 - Diamond"
"5, 28, 87, 125, 87, 28, // 5 - Clubs"
"5, 28, 94, 127, 94, 28, // 6 - Spades"
"4, 0, 24, 60, 24, // 7 - Bullet Point"
"5, 255, 231, 195, 231, 255, // 8 - Rev Bullet Point"
"4, 0, 24, 36, 24, // 9 - Hollow Bullet Point"
"5, 255, 231, 219, 231, 255, // 10 - Rev Hollow BP"
"5, 48, 72, 58, 6, 14, // 11 - Male"
"5, 38, 41, 121, 41, 38, // 12 - Female"
"5, 64, 127, 5, 5, 7, // 13 - Music Note 1"
"5, 64, 127, 5, 37, 63, // 14 - Music Note 2"
"5, 90, 60, 231, 60, 90, // 15 - Snowflake"
"5, 127, 62, 28, 28, 8, // 16 - Right Pointer"
"5, 8, 28, 28, 62, 127, // 17 - Left Pointer"
"5, 20, 34, 127, 34, 20, // 18 - UpDown Arrows"
"5, 95, 95, 0, 95, 95, // 19 - Double Exclamation"
"5, 6, 9, 127, 1, 127, // 20 - Paragraph Mark"
"4, 102, 137, 149, 106, // 21 - Section Mark"
"5, 96, 96, 96, 96, 96, // 22 - Double Underline"
"5, 148, 162, 255, 162, 148, // 23 - UpDown Underlined"
"5, 8, 4, 126, 4, 8, // 24 - Up Arrow"
"5, 16, 32, 126, 32, 16, // 25 - Down Arrow"
"5, 8, 8, 42, 28, 8, // 26 - Right Arrow"
"5, 8, 28, 42, 8, 8, // 27 - Left Arrow"
"5, 30, 16, 16, 16, 16, // 28 - Angled"
"5, 12, 30, 12, 30, 12, // 29 - Squashed #"
"5, 48, 56, 62, 56, 48, // 30 - Up Pointer"
"5, 6, 14, 62, 14, 6, // 31 - Down Pointer"
"2, 0, 0, // 32 - Space"
"1, 95, // 33 - !"
"3, 7, 0, 7, // 34 - """
"5, 20, 127, 20, 127, 20, // 35 - #"
"5, 36, 42, 127, 42, 18, // 36 - $"
"5, 35, 19, 8, 100, 98, // 37 - %"
"5, 54, 73, 86, 32, 80, // 38 - &"
"3, 8, 7, 3, // 39 - '"
"3, 28, 34, 65, // 40 - ("
"3, 65, 34, 28, // 41 - )"
"5, 42, 28, 127, 28, 42, // 42 - *"
"5, 8, 8, 62, 8, 8, // 43 - +"
"3, 128, 112, 48, // 44 - ,"
"5, 8, 8, 8, 8, 8, // 45 - -"
"2, 96, 96, // 46 - ."
"5, 32, 16, 8, 4, 2, // 47 - /"
"5, 62, 81, 73, 69, 62, // 48 - 0"
"3, 66, 127, 64, // 49 - 1"
"5, 114, 73, 73, 73, 70, // 50 - 2"
"5, 33, 65, 73, 77, 51, // 51 - 3"
"5, 24, 20, 18, 127, 16, // 52 - 4"
"5, 39, 69, 69, 69, 57, // 53 - 5"
"5, 60, 74, 73, 73, 49, // 54 - 6"
"5, 65, 33, 17, 9, 7, // 55 - 7"
"5, 54, 73, 73, 73, 54, // 56 - 8"
"5, 70, 73, 73, 41, 30, // 57 - 9"
"1, 20, // 58 - :"
"2, 128, 104, // 59 - ;"
"4, 8, 20, 34, 65, // 60 - <"
"5, 20, 20, 20, 20, 20, // 61 - ="
"4, 65, 34, 20, 8, // 62 - >"
"5, 2, 1, 89, 9, 6, // 63 - ?"
"8, 32, 32, 32, 32, 160, 32, 40, 48, // 130 - ?"
"8, 0, 48, 40, 32, 160, 32, 48, 32, // 131"
"8, 32, 32, 34, 32, 34, 32, 40, 48, // 132 - ?"
"8, 32, 32, 32, 34, 33, 34, 40, 48, // 133 - ?"
"8, 32, 32, 32, 34, 49, 34, 32, 32, // 134 - ???"
"8, 0, 48, 40, 34, 33, 34, 48, 32, // 135 - ??"
"8, 32, 32, 40, 40, 40, 176, 32, 32, // 136 - ??"
"8, 32, 32, 40, 42, 40, 48, 32, 32, // 137 - ??"
"8, 0, 36, 36, 36, 56, 32, 32, 32, // 138 - ??"
"8, 0, 36, 37, 36, 56, 32, 32, 32, // 139 - ??"
"8, 0, 128, 128, 64, 48, 32, 32, 32, // 140 - ??"
"8, 0, 128, 128, 64, 52, 32, 32, 32, // 141 - ??"
"8, 32, 32, 32, 56, 32, 56, 32, 24, // 142 - ??"
"8, 32, 32, 56, 32, 56, 32, 56, 32, // 143 - ???"
"8, 96, 128, 128, 120, 32, 56, 32, 24, // 144 - ?"
"8, 32, 32, 32, 56, 34, 57, 34, 24, // 145 - ??"
"8, 32, 32, 56, 34, 57, 34, 56, 32, // 146 - ???"
"8, 96, 128, 128, 120, 34, 57, 34, 24, // 147 - ?"
"8, 32, 32, 48, 32, 48, 40, 40, 24, // 148 - ??"
"8, 96, 128, 128, 96, 48, 40, 40, 56, // 149 - ?"
"8, 32, 32, 48, 32, 48, 40, 42, 24, // 150 - ??"
"8, 96, 128, 128, 96, 48, 40, 42, 56, // 151 - ?"
"8, 32, 32, 62, 48, 40, 40, 56, 32, // 152 - ??"
"8, 32, 32, 62, 48, 40, 42, 56, 32, // 153 - ??"
"7, 32, 32, 32, 32, 48, 40, 40, // 154 - ??"
"8, 32, 32, 40, 36, 52, 44, 32, 32, // 155 - ???"
"8, 32, 32, 32, 32, 48, 40, 42, 48, // 156 - ??"
"8, 32, 32, 48, 42, 40, 50, 32, 32, // 157 - ???"
"8, 96, 128, 128, 178, 168, 122, 32, 32, // 158 - ??"
"8, 0, 40, 44, 42, 42, 32, 32, 31, // 159 - ?"
"8, 32, 32, 32, 28, 34, 33, 33, 33, // 160 - ??"
"7, 32, 32, 32, 32, 32, 32, 31, // 161 - ??"
"8, 32, 32, 32, 32, 31, 32, 32, 32, // 162 - ???"
"8, 0, 48, 64, 64, 63, 32, 32, 32, // 163"
"8, 32, 32, 32, 32, 48, 72, 72, 48, // 164"
"8, 32, 32, 48, 72, 72, 48, 32, 32, // 165"
"8, 128, 64, 48, 72, 72, 48, 32, 32, // 166"
"7, 32, 32, 32, 32, 34, 32, 24, // 167"
"8, 32, 32, 32, 32, 26, 32, 32, 32, // 168"
"8, 48, 64, 68, 64, 48, 32, 32, 32, // 169"
"8, 32, 32, 32, 48, 40, 58, 44, 24, // 170"
"8, 32, 32, 48, 40, 58, 44, 56, 32, // 171"
"8, 0, 24, 20, 20, 24, 32, 32, 32, // 172"
"7, 0, 33, 34, 36, 40, 16, 15, // 173"
"8, 0, 176, 168, 120, 32, 32, 32, 32, // 174"
"8, 32, 32, 32, 160, 32, 160, 40, 48, // 175"
"8, 32, 32, 32, 160, 48, 160, 32, 32, // 176"
"8, 0, 96, 128, 128, 160, 80, 16, 32, // 177"
"8, 0, 30, 32, 32, 32, 32, 32, 32, // 178"
"6, 0, 32, 48, 40, 40, 32, // 179"
"8, 0, 4, 2, 2, 58, 2, 2, 1, // 180"
"7, 0, 0, 4, 6, 61, 5, 4, // 181"
"7, 0, 0, 4, 182, 173, 125, 4, // 182"
"7, 0, 0, 128, 192, 191, 160, 128, // 183"
"7, 4, 102, 133, 149, 168, 168, 72, // 184"
"4, 0, 0, 0, 63, // 185"
"8, 0, 48, 40, 32, 160, 32, 40, 48, // 186"
"6, 0, 0, 48, 42, 40, 50, // 187"
"8, 0, 48, 40, 34, 32, 34, 40, 48, // 188"
"8, 0, 48, 40, 34, 33, 34, 40, 48, // 189"
"8, 0, 192, 168, 168, 40, 176, 32, 32, // 190"
"8, 0, 192, 168, 168, 168, 48, 32, 32, // 191"
"8, 0, 192, 168, 170, 40, 48, 32, 32, // 192"
"6, 0, 0, 36, 36, 36, 56, // 193"
"6, 0, 0, 36, 37, 36, 56, // 194"
"5, 0, 128, 128, 64, 48, // 195"
"6, 0, 0, 128, 128, 64, 52, // 196"
"8, 96, 128, 128, 120, 32, 56, 32, 24, // 197"
"8, 96, 128, 128, 120, 34, 57, 34, 24, // 198"
"8, 96, 128, 128, 96, 48, 40, 40, 24, // 199"
"8, 96, 128, 128, 96, 48, 40, 42, 24, // 200"
"6, 0, 34, 20, 8, 20, 34, // 201"
"7, 32, 32, 62, 48, 40, 40, 24, // 202"
"7, 32, 32, 62, 48, 40, 42, 24, // 203"
"7, 0, 0, 64, 160, 176, 40, 40, // 204"
"7, 0, 0, 64, 160, 176, 42, 40, // 205"
"8, 32, 32, 32, 32, 32, 32, 32, 32, // 206"
"8, 0, 24, 32, 32, 48, 40, 42, 48, // 207"
"7, 0, 96, 128, 128, 178, 168, 122, // 208"
"7, 0, 48, 40, 44, 42, 32, 63, // 209"
"6, 0, 64, 169, 170, 168, 240, // 210"
"6, 0, 0, 96, 128, 128, 126, // 211"
"6, 0, 64, 170, 169, 170, 240, // 212"
"8, 0, 0, 192, 32, 48, 40, 40, 48, // 213"
"7, 0, 0, 96, 128, 136, 128, 96, // 214"
"6, 0, 0, 48, 40, 40, 48, // 215"
"6, 0, 0, 0, 176, 168, 120, // 216"
"7, 0, 48, 64, 64, 80, 40, 8, // 217"
"7, 0, 48, 192, 64, 208, 40, 8, // 218"
"5, 0, 0, 2, 121, 2, // 219"
"5, 0, 0, 2, 120, 2, // 220"
"8, 0, 0, 0, 0, 0, 5, 5, 5, // 221"
"8, 0, 0, 0, 4, 3, 11, 6, 6, // 222"
"3, 160, 160, 160, // 223"
"6, 0, 0, 1, 1, 1, 1, // 224 - Beta"
"8, 0, 64, 96, 80, 72, 80, 64, 64, // 225 - Gamma"
"5, 2, 126, 2, 126, 2, // 226 - Pi"
"5, 99, 85, 73, 65, 99, // 227 - Sigma"
"5, 56, 68, 68, 60, 4, // 228 - Theta"
"5, 64, 126, 32, 30, 32, // 229 - mu"
"5, 6, 2, 126, 2, 2, // 230 - Tau"
"5, 153, 165, 231, 165, 153, // 231"
"5, 28, 42, 73, 42, 28, // 232"
"5, 76, 114, 1, 114, 76, // 233"
"5, 48, 74, 77, 77, 48, // 234"
"5, 48, 72, 120, 72, 48, // 235"
"5, 188, 98, 90, 70, 61, // 236 - Zero Slashed"
"4, 62, 73, 73, 73, // 237"
"5, 126, 1, 1, 1, 126, // 238"
"5, 42, 42, 42, 42, 42, // 239 - 3 Bar Equals"
"5, 68, 68, 95, 68, 68, // 240 - +/-"
"5, 64, 81, 74, 68, 64, // 241 - >="
"5, 64, 68, 74, 81, 64, // 242 - <="
"5, 0, 0, 255, 1, 3, // 243 - Top of Integral"
"3, 224, 128, 255, // 244 - Bot of Integral"
"5, 8, 8, 107, 107, 8, // 245 - Divide"
"5, 54, 18, 54, 36, 54, // 246 - Wavy ="
"5, 6, 15, 9, 15, 6, // 247 - Degree"
"4, 0, 0, 24, 24, // 248 - Math Product"
"4, 0, 0, 16, 16, // 249 - Short Dash"
"5, 48, 64, 255, 1, 1, // 250 - Square Root"
"5, 0, 31, 1, 1, 30, // 251 - Superscript n"
"5, 0, 25, 29, 23, 18, // 252 - Superscript 2"
"5, 0, 60, 60, 60, 60, // 253 - Centered Square"
"5, 255, 129, 129, 129, 255, // 254 - Full Frame"
"5, 255, 255, 255, 255, 255, // 255 - Full Block"
};



2. where  can i paste the code do you mean this file (MD_MAX72xx_font.cpp)
Please explain more
Sorry for disturbing
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Feb 12, 2014, 08:09 pm
You need to edit out the " marks at the start and end of each line.  I am working on whether I can export from excel without these.

You have the right file name and just need to replace the  data contained in the font definition with this new one. You will not need the array PROGMEM statement at the top as this will already be in the file.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: alhootti on Feb 13, 2014, 04:17 am
My Dear Marco i follow your instruction
Code: [Select]

uint8_t _sysfont_var[] PROGMEM =
{
5, 124, 18, 17, 18, 124, // 65 - A
5, 127, 73, 73, 73, 54, // 66 - B
5, 62, 65, 65, 65, 34, // 67 - C
5, 127, 65, 65, 65, 62, // 68 - D
5, 127, 73, 73, 73, 65, // 69 - E
5, 127, 9, 9, 9, 1, // 70 - F
5, 62, 65, 65, 81, 115, // 71 - G
5, 127, 8, 8, 8, 127, // 72 - H
3, 65, 127, 65, // 73 - I
};

I wrote down" AB"   "CD"  in english lunguage just for testing in led matrix  but on other word shown in led matrix like number 89 .
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Feb 13, 2014, 04:58 am
Code: [Select]
uint8_t _sysfont_var[] PROGMEM =
{
5, 124, 18, 17, 18, 124, // 65 - A
5, 127, 73, 73, 73, 54, // 66 - B
5, 62, 65, 65, 65, 34, // 67 - C
5, 127, 65, 65, 65, 62, // 68 - D
5, 127, 73, 73, 73, 65, // 69 - E
5, 127, 9, 9, 9, 1, // 70 - F
5, 62, 65, 65, 81, 115, // 71 - G
5, 127, 8, 8, 8, 127, // 72 - H
3, 65, 127, 65, // 73 - I
};

In your previous post you had the whole ASCII set (all 255 characters). Please confirm that you have copied all of them to the font file, as your next post only shown the letters for A-I (code just above here). As it is shown it will definitely not work because (a) you do not have the whole characters set and (b) the Arabic characters are not there.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: alhootti on Feb 13, 2014, 08:57 pm
As you told me i paste whole 255 words to font file all thing is fine except when i write done text in Arabic or in English  i see on Matrix on other text totally except first word .
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Feb 14, 2014, 12:23 am
I am having trouble understanding what you are explaining. Can you post a picture or a video?
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: alhootti on Feb 14, 2014, 03:37 am
Thank you for your prompt replay
the problem is when i write done the following text "Parola for",
 "Arduino",  - led matrix  display on other text like ( Plospmlo  9ps Asevjop) instead of  (Parola for
  Arduino)

See
https://www.youtube.com/watch?v=m1FUB4gvrSs&feature=youtube_gdata_player
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Feb 14, 2014, 04:31 am
All the lower case letters are one letter out (ie, you are getting b instead of a, s instead of r) - Pbspmb gps Asevjop. Try a message in uppercase and see if that works ok. If it does, then check that there are no ASCII characters missing between the end of the upper case and the start of the lower case letters in the table.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: alhootti on Feb 14, 2014, 07:04 am
uppercase letter working fine
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: alhootti on Feb 14, 2014, 08:38 am
I think there are no mising letter in lowercase but i noticed there are dubelcate letter in Arabic font.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Feb 14, 2014, 11:09 am
Can you post the font file or pm me with it so I can check? If uppercase is ok then there is definitely a misalignment between the end of upper and start of lowercase.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Feb 15, 2014, 12:55 am
I have worked it out. Character 92 is '\' and putting this at the end of the line in the comment makes the next line part of the line for char 92 (\ is the line continuation character in C++). Please remove the \ from the end of the line and it will fix the problem. I will change the font builder to cope with this.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: terrag42 on Feb 18, 2014, 04:09 am
Hello, I searched this thread for anyone who has tried the example code called MD_MAX72XX_Eyes and it looks like nobody has mentioned it! The sketch features a moving eye animation. The example is cool because the movement of the pupil and the timing of the blinks comes from a random number generated on the Arduino. Perhaps people haven't tried this example because it requires the TrueRandom library (http://code.google.com/p/tinkerit/ (http://code.google.com/p/tinkerit/)) but I encourage you to try it out.
What I'd like to do with the example is to connect more than one MAX7219 & 8x8 matrix and make each one have different pupil movements and blinks. First, I tried changing the number of devices in the code to 5, but each of the eyes was synchronized in the pupil movements. I tried digging a bit deeper into the program's subroutines to make different eyes go to different chips, but I gave up after a few hours of frustration. Would anybody like to take a look at this example and give me some suggestions? It would be greatly appreciated. I'd like to eventually have as many as 50 eyes all blinking away. I understand that only about 24 modules have been successfully linked using the Parola software, so I will need two or three Arduinos to make the 50 eyes come to life.
Thanks for any help or suggestions!
-Terrag
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Feb 18, 2014, 06:22 am
The example was only ever designed for 'normal' 2 eye operation. People normally blink with their eyes in synch, so the eyes work together. Changing MAX_DEVICES will get more eyes but all doing the same thing. Basically the code is written for one eye but does the same thing in 2 matrices. What I did allow for was changing the design of the eyes, how they move and how deeply they blink, which is defined in the header file.

Changing it to do multiple eyes independently should be possible and probably relatively easy given the code that is already there, despite your frustration. I may give it a go in the next few days, See update -as you have me intrigued!.

Quote
I understand that only about 24 modules have been successfully linked using the Parola software, so I will need two or three Arduinos to make the 50 eyes come to life.

I am sure we can do more than 24, the problem is that for fast animations the data transfer takes more time than is available. The eyes are very slow, so the limit is probably much higher.

UPDATE: Many eyes demo is attached. A bit creepy and for me not as effective as just 2 eyes. The eye should really be a class, but it works as is.
Title: Re: Scrolling LED matrix display - Parola for Arduino - OLIMEX MOD-LED8x8
Post by: GraspGG on Feb 18, 2014, 10:58 am
Hello all,

first i would like to introduce myself as new within this forums and say hello to everyone.

Secondly i wanna to congratulate Pedro and all people involved for this incredible peace of software! Searching the web for weeks i found many DMD code projects - but none could even reach the level of Parola.

Therefore i really would love to use the Parola code together with a (nearly not documented) OLIMEX MOD-LED8x8 Boosterpack and 7 x MOD-LED8x8 Modules, even if they are using 74HC595 chips instead of MAX7219... Looking at parola and olimex schematics both seem to follow the same principle shifting out the same amount of bits using the same pins/ports.

But, unfortunately, either trying SPI and standard digital ports of the arduino the result is kind of strange, even if i can imagine what the software is going to show on the modules - but only on the lower 4 rows. Using LSBFISRT instead of MSBFIRST within the spiTransmit() statement, only the upper 4 rows do work.

For me as new one in coding c, i guess there is not much to change to make it work properly - if one of the professionals please may have a look and hopefully give me a hint what i can change/try!?

Here you may see how it looks like on the modules, using different settings:

• Parola_Display.ino
• #define USE_PAROLA_HW is set to 0
• spiTransmit() is shifting out in MSBFIRST bit order
• Video (http://www.hannappels.net/_share/pics/arduino/MOD-LED8x8_MSBFIRST.MP4) showing the effect (lower 4 rows, MP4, 8.01MB)

• Parola_Display.ino
• #define USE_PAROLA_HW is set to 0
• spiTransmit() is shifting out in LSBFIRST bit order
• Video (http://www.hannappels.net/_share/pics/arduino/MOD-LED8x8_LSBFIRST.MP4) showing the effect (upper 4 rows, MP4, 4.18MB)

Some Facts about the OLIMEX MOD-LED8x8 modules i am trying to use:
• Common anode
• two 74HC595 connected in row (pin 9 >> pin 14) on each module
• first 74HC595 connected to ULN2003 on each module
• Boosterpack Schematics (PDF) (http://www.hannappels.net/_share/pics/arduino/MSP430-LED-BOOSTERPACK-schematic.pdf)
• MOD-LED8x8 Schematics (PDF) (http://www.hannappels.net/_share/pics/arduino/MOD-LED8x8-SCHEMATIC-REV-D.pdf)

Thanks for any reply in advance!
As said before, i am new to this bit-shifting stuff and i wouldn't even ask if the modules would't show recognizeable animations...

Greets, Olaf

P.S. sorry for my amateur english - hopefully it is understandable
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Feb 18, 2014, 02:12 pm
Quote
both seem to follow the same principle shifting out the same amount of bits using the same pins/ports

Yes, they both use the SPI interface and are connected to a LED matrix.

Quote
even if they are using 74HC595 chips instead of MAX7219

And this is the big difference. It is like saying a bicycle and a car are the same thing. They get you from one place to another but the amount of effort required by the user is quite different.

The 7219 is a chip that will run all the LEDs independently of the Arduino, once it knows the pattern you want to display. The same is not true of the 595 circuit, where you (the programmer) need to do all the scanning. They are fundamentally different technologies and you cannot use the either of the 2 circuits you propose with the MD_MAX72xx library.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: GraspGG on Feb 18, 2014, 02:31 pm

Quote
both seem to follow the same principle shifting out the same amount of bits using the same pins/ports

Yes, they both use the SPI interface and are connected to a LED matrix.

Quote
even if they are using 74HC595 chips instead of MAX7219

And this is the big difference. It is like saying a bicycle and a car are the same thing. They get you from one place to another but the amount of effort required by the user is quite different.

The 7219 is a chip that will run all the LEDs independently of the Arduino, once it knows the pattern you want to display. The same is not true of the 595 circuit, where you (the programmer) need to do all the scanning. They are fundamentally different technologies and you cannot use the either of the 2 circuits you propose with the MD_MAX72xx library.


Thanks for having a look at it, marco, and thanks for the answer!

The reason i thought it could work: cause there are animations currently shown on the modules - scrambled, but they ARE shown ... somehow ...

Hopefully the MAX7219 modules ordered one week ago will arrive soon ;)

Thanks again!
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: Pedro147 on Feb 19, 2014, 04:02 am

Secondly i wanna to congratulate Pedro and all people involved for this incredible peace of software!


GraspGG - Marco is the smart fellow that wrote all the code for the Parola for Arduino project and any small part that I have have had, is only developing Eagle board files for a slightly larger version of LED matrices, with might I say, much help from Robert (Crossroads) of this forum. But you are right it is a great project that Marco has here  :D
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: alhootti on Feb 21, 2014, 07:57 pm
Thank you
marco
Last problem has been resolved when i remeved \
But There is on other problem in Arabic letters.
When I write in Arabic "  ? "   led matrix display on other letter.
this problem happend with most of Arabic letters.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Feb 21, 2014, 08:00 pm
If you are writing the letters from the serial interface then the mapping my be wrong. What letters are you getting instead and are they the same substitutions all the time?
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: alhootti on Feb 22, 2014, 04:39 am
yes, exactly same substitutions all the time
if i write letter no 185 led matrix display letter no 167 + 216 .
if i write letter no 186 led matrix display letter no 168 + 216 .
if i write letter no 213 led matrix display letter no 133 + 217 .
on other hand it must display one letter not tow because i wrote only one letter.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Feb 22, 2014, 07:34 am
Then if the offset is wrong you need to move the font definitions into the correct slot for the characters you  are expecting to see.  If you do adjust the font send it back to me and I will put it into the next release. Unfortunately I cannot understand any of the Arabic characters.

By the way, how would you write "Arduino"in Arabic?
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: alhootti on Feb 22, 2014, 09:37 am
I appreciate your cooperation on this
"Arduino"in Arabic   " ???????"
Ok after adjusment i will send it to you.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: alhootti on Feb 23, 2014, 11:45 am
Mr.Marco
In Arabic we write from right to left opposite of English
now i faced this problem when i write word in Arabic the first letter come to  last one it must be in first as i wrote it.
for Exsample:
???? ----> ? ? ? ?
how i can resolve this problem?
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Feb 23, 2014, 12:01 pm
It depends what you are doing.  If you are typing in the message thru the serial monitor, then you should reverse the string before display. You probably also want to scroll in from the left as well.

As I don't know what you are doing it is hard to be more specific.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: alhootti on Feb 23, 2014, 02:59 pm
I flip the letters but still same problem how i reverse it please give me exsample.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: alhootti on Feb 23, 2014, 03:02 pm
I display word thrugh led matrix not serial monitor.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Feb 23, 2014, 09:48 pm
Quote
I display word through led matrix not serial monitor.

Yes, but how does the text get into the Arduino program?

It is probably time for you to post your code so that we can talk specifics.

Reversing a string s:
Code: [Select]
for (int I = 0; I<strlen(s)/2; I++)
{
  char c = s[I];
  s[I] = s[strlen(s)-I];
  s[strlen(s)-I] = c;
}
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: alhootti on Feb 24, 2014, 07:11 pm
Thank you for your cooperation please guide me where i can put the code  because im beginer in arduino.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Feb 24, 2014, 08:14 pm
Without knowing what you have how can I tell you where to put it? Add your current code to the forum so we can see what you have so far.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: alhootti on Feb 24, 2014, 08:57 pm
Code: [Select]

#include <MD_Parola.h>
#include <MD_MAX72xx.h>
#include <SPI.h>

// Define the number of devices we have in the chain and the hardware interface
// NOTE: These pin numbers will probably not work with your hardware and may
// need to be adapted
#define MAX_DEVICES 1
#define CLK_PIN 13
#define DATA_PIN 11
#define CS_PIN 10

// set to 1 if we are implementing the user interface pot
#define USE_UI_CONTROL 1

#if USE_UI_CONTROL
#define SPEED_IN A0
#endif // USE_UI_CONTROL

#define PAUSE_TIME 1000
#define SPEED_DEADBAND 5
uint8_t frameDelay = 25; // default frame delay value


#if INCLUDE_HARDWARE_SPI
MD_Parola P = MD_Parola(CS_PIN, MAX_DEVICES);
#else
MD_Parola P = MD_Parola(DATA_PIN, CLK_PIN, CS_PIN, MAX_DEVICES);
#endif // USE_HARDWARE_SPI

#define SPEED_TIME 25
#define PAUSE_TIME 1000

// Turn on debug statements to the serial output
#define  DEBUG  1

#if  DEBUG
#define PRINT(s, x) { Serial.print(F(s)); Serial.print(x); }
#define PRINTS(x) Serial.print(F(x))
#define PRINTX(x) Serial.println(x, HEX)
#else
#define PRINT(s, x)
#define PRINTS(x)
#define PRINTX(x)
#endif

// Global variables
uint8_t  curText;
char *pc[] =
{
// here i want to rverse thr string
 "????",
 //"Arduino",
};

uint8_t  inFX, outFX;
MD_Parola::textEffect_t effect[] =
{
//  MD_Parola::PRINT,
// MD_Parola::SCROLL_LEFT,
// MD_Parola::WIPE,
// MD_Parola::SCROLL_UP,
 //MD_Parola::OPENING_CURSOR,
// MD_Parola::BLINDS,
// MD_Parola::CLOSING,
 //MD_Parola::WIPE_CURSOR,
 //MD_Parola::DISSOLVE,
 //MD_Parola::OPENING,
// MD_Parola::CLOSING_CURSOR,
 MD_Parola::SCROLL_RIGHT,
// MD_Parola::SCROLL_DOWN,
//  MD_Parola::SLICE,
};

#if USE_UI_CONTROL
void doUI(void)
{
 // set the speed if it has changed
 {
   int16_t speed = map(analogRead(SPEED_IN), 0, 1023, 0, 250);

//    if ((speed >= ((int16_t)P.getSpeed() + SPEED_DEADBAND)) ||
//      (speed <= ((int16_t)P.getSpeed() - SPEED_DEADBAND)))
   if (speed != (int16_t)P.getSpeed())
   {
     P.setSpeed(speed);
 P.setPause(speed);
 frameDelay = speed;
     PRINT("\nChanged speed to ", P.getSpeed());
   }
 }
}
#endif // USE_UI_CONTROL

void setup(void)
{
 Serial.begin(57600);
 PRINTS("[Parola Demo]");

#if USE_UI_CONTROL
 pinMode(SPEED_IN, INPUT);
 doUI();
#endif // USE_UI_CONTROL

 P.begin();
 P.setInvert(false);
 P.displayText(pc[curText], MD_Parola::CENTER, SPEED_TIME, PAUSE_TIME, effect[inFX], effect[outFX]);
}

void loop(void)
{
#if USE_UI_CONTROL
doUI();
#endif // USE_UI_CONTROL

 if (P.displayAnimate()) // animates and returns true when an animation is completed
 {
   // Set the display for the next string.
   curText = (++curText) % ARRAY_SIZE(pc);
   P.setTextBuffer(pc[curText]);

   // When we have gone back to the first string, set a new exit effect
   // and when we have done all those set a new entry effect.
   if (curText == 0)
   {
     outFX = (++outFX) % ARRAY_SIZE(effect);
     if (outFX == 0)
 {
       inFX = (++inFX) % ARRAY_SIZE(effect);
if (inFX == 0)
P.setInvert(!P.getInvert());
 }
       
     P.setTextEffect(effect[inFX], effect[outFX]);
   }

   // Tell Parola we have a new animation
   P.displayReset();
 }
}

Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Feb 24, 2014, 09:32 pm
If you are using this code, then I would reverse the strings only once in the setup() function. This way you can type them in the way you expect but they also display that way.

Also as the message is a constant value, you may want to consider just typing it in back to front.

? ? ? ? = ? ? ? ?
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: alhootti on Feb 25, 2014, 09:44 am
I put the code like this but m\not working :smiley-red:
Code: [Select]

// Program to demonstrate the MD_Parola library
//
// For every string defined by pc[] iterate through all combinations
// of entry and exit effects.
//
// Animation speed can be controlled using a pot on pin SPEED_IN

#include <MD_Parola.h>
#include <MD_MAX72xx.h>
#include <SPI.h>

// Define the number of devices we have in the chain and the hardware interface
// NOTE: These pin numbers will probably not work with your hardware and may
// need to be adapted
#define MAX_DEVICES 1
#define CLK_PIN 13
#define DATA_PIN 11
#define CS_PIN 10

// set to 1 if we are implementing the user interface pot
#define USE_UI_CONTROL 1

#if USE_UI_CONTROL
#define SPEED_IN A0
#endif // USE_UI_CONTROL

#define PAUSE_TIME 1000
#define SPEED_DEADBAND 5
uint8_t frameDelay = 25; // default frame delay value


#if INCLUDE_HARDWARE_SPI
MD_Parola P = MD_Parola(CS_PIN, MAX_DEVICES);
#else
MD_Parola P = MD_Parola(DATA_PIN, CLK_PIN, CS_PIN, MAX_DEVICES);
#endif // USE_HARDWARE_SPI

#define SPEED_TIME 25
#define PAUSE_TIME 1000

// Turn on debug statements to the serial output
#define  DEBUG  1

#if  DEBUG
#define PRINT(s, x) { Serial.print(F(s)); Serial.print(x); }
#define PRINTS(x) Serial.print(F(x))
#define PRINTX(x) Serial.println(x, HEX)
#else
#define PRINT(s, x)
#define PRINTS(x)
#define PRINTX(x)
#endif

// Global variables
uint8_t  curText;
char *pc[] =
{
 "????",
 //"Arduino",
};

uint8_t  inFX, outFX;
MD_Parola::textEffect_t effect[] =
{
 //MD_Parola::PRINT,
 MD_Parola::SCROLL_LEFT,
 //MD_Parola::WIPE,
// MD_Parola::SCROLL_UP,
// MD_Parola::OPENING_CURSOR,
// MD_Parola::BLINDS,
// MD_Parola::CLOSING,
// MD_Parola::WIPE_CURSOR,
// MD_Parola::DISSOLVE,
// MD_Parola::OPENING,
// MD_Parola::CLOSING_CURSOR,
// MD_Parola::SCROLL_RIGHT,
// MD_Parola::SCROLL_DOWN,
// MD_Parola::SLICE,
};

#if USE_UI_CONTROL
void doUI(void)
{
 // set the speed if it has changed
 {
   int16_t speed = map(analogRead(SPEED_IN), 0, 1023, 0, 1000);

//    if ((speed >= ((int16_t)P.getSpeed() + SPEED_DEADBAND)) ||
//      (speed <= ((int16_t)P.getSpeed() - SPEED_DEADBAND)))
   if (speed != (int16_t)P.getSpeed())
   {
     P.setSpeed(speed);
 P.setPause(speed);
 frameDelay = speed;
     PRINT("\nChanged speed to ", P.getSpeed());
   }
 }
}
#endif // USE_UI_CONTROL

void setup(void)
{
 Serial.begin(57600);
 PRINTS("[Parola Demo]");

#if USE_UI_CONTROL
 pinMode(SPEED_IN, INPUT);
 doUI();
#endif // USE_UI_CONTROL
for (int I = 0; I<strlen(curText)/2; I++)
{
 char c = curText[I];
 curText[I] = curText[strlen(curText)-I];
 curText[strlen(curText)-I] = c;
}
 P.begin();
 P.setInvert(false);
 P.displayText(pc[curText], MD_Parola::LEFT, SPEED_TIME, PAUSE_TIME, effect[inFX]);
}

void loop(void)
{
#if USE_UI_CONTROL
doUI();
#endif // USE_UI_CONTROL

 if (P.displayAnimate()) // animates and returns true when an animation is completed
 {
   // Set the display for the next string.
   curText = (curText) * ARRAY_SIZE(pc);
   P.setTextBuffer(pc[curText]);

   // When we have gone back to the first string, set a new exit effect
   // and when we have done all those set a new entry effect.
   if (curText == 0)
   {
     outFX = (++outFX) % ARRAY_SIZE(effect);
     //if (outFX == 0)
//  {
      // inFX = (++inFX) % ARRAY_SIZE(effect);
//if (inFX == 0)
//P.setInvert(!P.getInvert());
//  }
       
     P.setTextEffect(effect[inFX], effect[outFX]);
   }

   // Tell Parola we have a new animation
   P.displayReset();
 }
}

Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Feb 25, 2014, 10:16 am
This will reverse the strings in the PC array once only. The smaller loop was missing a -1 I think.
Code: [Select]
for (j=0; j<sizeof(pc)/sizeof(pc[0]); j++)
{
char *p = pc[j];

  for (int i = 0; i<strlen(p)/2; i++)
  {
    char c = p[i];
    p[i] = p[strlen(p)-I-1];
    p[strlen(p)-I-1] = c;
  }
}


If this does not work, try printing things out in the loop and learn how it works.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: alhootti on Feb 25, 2014, 05:43 pm
Thank you soooooooooooo   muuuuuuuuuuuuuuuuuuuuch
it is working fine
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: alhootti on Feb 25, 2014, 07:03 pm
Between two letters there are wide gaps (four leds) how i can remove it?
Ex:
"?    ?   ?   ?"
it must be after removing qaps "????"
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Feb 25, 2014, 08:12 pm
There is a setting for the space between characters - read the documentation.

You will not get the change fron individual characters to the joined up style unless you actually write code to do it. At best you will get the characters closer together but still individual.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: alhootti on Feb 26, 2014, 03:50 am
Do you mean these:
Code: [Select]

setSpeed(10);
  setPause(10*getSpeed());
  setCharSpacing(1);  // this one isnt it?
  setTextAlignment(LEFT);
  setTextEffect(PRINT, NO_EFFECT);
  setTextBuffer(NULL);
  setInvert(false);
  displaySuspend(false);
  displayClear();

Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Feb 26, 2014, 08:36 am
If you are trying to create a script type display in Arabic then you need to be aware that this is extremely complex. Heavy duty typesetting systems have difficulty and they have a lot more space and resolution to display the characters - you only have 8 dots high! I have attached articles describing the problem (in computer terms) and I am guessing from your questions so far that you are not very experienced in computer programming.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: alhootti on Feb 26, 2014, 11:08 am
I understood that.
i will try till i find out the solution.
how i can display a  word or  a sentence  on 16x64 led matrix?
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Feb 26, 2014, 11:10 am
That depends on the matrix. I suggest you start another topic on that one as this is a Parola thread.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: alhootti on Feb 26, 2014, 11:43 am
http://forum.arduino.cc/index.php?topic=221462.0
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: bperrybap on Feb 27, 2014, 02:48 am
Marco,
The "eyes" example has a bug in it probably from using a Windows filesystem.
The include for MD_MAX72xx_eyes.h is misspelled.
The real filename does not used capital X's.

--- bill
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: bperrybap on Feb 27, 2014, 03:20 am
Marco,
I'm bring up the libraries on the surface mount icstation modules.
http://www.icstation.com/product_info.php?products_id=2609#.Uw6fxaqXWtg (http://www.icstation.com/product_info.php?products_id=2609#.Uw6fxaqXWtg)
Very similar design to the Parola board, other than it is surface mount.
The documentation is a bit skimpy.
However..... The Leds are not wired up the same.
It appears that the column bits are reversed from the Parola board.
So, as a result, to get it working, it required changes to MD_MAX72xx_buf.cpp
The changes are minimal. The module works in Porola mode other than
it doesn't require bit reversing the value in setColumn() and getColumn()


I also found what looks like a bug in transformBuffer().
It appears that not all the bits are being proper shifted during Right shifts.
Code: [Select]
case TSR: // Transform Shift Right one pixel element
//      for (uint8_t i=0; i<ROW_SIZE-1; i++)
     for (uint8_t i=0; i<ROW_SIZE; i++)
#if USE_PAROLA_HW
       _matrix[buf].row[i] <<= 1;
#else  // Same code as PAROLA_HW TSU
       _matrix[buf].row[i] = _matrix[buf].row[i+1];
#endif
   break;


Was there are reason for this?
What I see with the original code is the top row of pixels isn't moved while
all the others are.

With those small changes, it appears to be working but I'm still playing with it.

And BTW, the master branch of the git repo for MD_Parola library doesn't build for me
(quite a few compile errors - haven't looked to deeply into it yet)
so I'm using the older pre-built download zip image.


--- bill


Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Feb 27, 2014, 06:29 am
Thanks.  I have 4 of those modules on order as they seem to be aligned with my aims for the modules in the first place.  Any work you have done will be leveraged into the next version released.

I am guessing that the changes to the MAX72xx library are not allowing the Parola compile to work properly. What errors do you get?
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: bperrybap on Feb 27, 2014, 06:58 am

Thanks.  I have 4 of those modules on order as they seem to be aligned with my aims for the modules in the first place.  Any work you have done will be leveraged into the next version released.

I am guessing that the changes to the MAX72xx library are not allowing the Parola compile to work properly. What errors do you get?

I'm not sure what you mean.
I have it up and working with my changes to the MAX72xx library.
My changes are to the code from this link: http://arduinocode.codeplex.com/downloads/get/761587 (http://arduinocode.codeplex.com/downloads/get/761587)
which works with this downloaded Parola library: http://parola.codeplex.com/downloads/get/761596 (http://parola.codeplex.com/downloads/get/761596)
What doesn't work for me is if I try to use the Parola library from the head of the Master branch from the git tree:
https://git01.codeplex.com/parola
with the zip image MAX72xx library above.
I'm guessing that you have updated the MAX72xx library?

Here is what I get when I use the parola library from the head of the master branch:
Code: [Select]
/media/DataPartition/2B-Organized/devel/avr/arduino/arduino-1.0.5/hardware/tools/avr/bin/avr-g++ -c -g -Os -Wall -fno-exceptions -ffunction-sections -fdata-sections -mmcu=atmega328p -DF_CPU=16000000L -MMD -DUSB_VID=null -DUSB_PID=null -DARDUINO=105 -I/media/DataPartition/2B-Organized/devel/avr/arduino/arduino-1.0.5/hardware/arduino/cores/arduino -I/media/DataPartition/2B-Organized/devel/avr/arduino/arduino-1.0.5/hardware/arduino/variants/standard -I/media/UbuntuRoot/home/bill/Arduino/Arduino-AVR/libraries/MD_Parola -I/media/UbuntuRoot/home/bill/Arduino/Arduino-AVR/libraries/MD_MAX72xx /tmp/build1750095175550942804.tmp/Parola_Display.cpp -o /tmp/build1750095175550942804.tmp/Parola_Display.cpp.o
In file included from /media/UbuntuRoot/home/bill/Arduino/Arduino-AVR/libraries/MD_Parola/MD_Parola.h:201,
                 from Parola_Display.ino:8:
/media/UbuntuRoot/home/bill/Arduino/Arduino-AVR/libraries/MD_MAX72xx/MD_MAX72xx.h: In member function 'bool MD_MAX72XX::update(MD_MAX72XX::controlValue_t)':
/media/UbuntuRoot/home/bill/Arduino/Arduino-AVR/libraries/MD_MAX72xx/MD_MAX72xx.h:630: warning: no return statement in function returning non-void
/media/UbuntuRoot/home/bill/Arduino/Arduino-AVR/libraries/MD_MAX72xx/MD_MAX72xx.h: In member function 'bool MD_MAX72XX::wraparound(MD_MAX72XX::controlValue_t)':
/media/UbuntuRoot/home/bill/Arduino/Arduino-AVR/libraries/MD_MAX72xx/MD_MAX72xx.h:655: warning: no return statement in function returning non-void
/media/UbuntuRoot/home/bill/Arduino/Arduino-AVR/libraries/MD_MAX72xx/MD_MAX72xx.h: In member function 'bool MD_MAX72XX::update(uint8_t)':
/media/UbuntuRoot/home/bill/Arduino/Arduino-AVR/libraries/MD_MAX72xx/MD_MAX72xx.h:748: warning: no return statement in function returning non-void
In file included from Parola_Display.ino:8:
/media/UbuntuRoot/home/bill/Arduino/Arduino-AVR/libraries/MD_Parola/MD_Parola.h: At global scope:
/media/UbuntuRoot/home/bill/Arduino/Arduino-AVR/libraries/MD_Parola/MD_Parola.h:576: warning: '__progmem__' attribute ignored
/media/UbuntuRoot/home/bill/Arduino/Arduino-AVR/libraries/MD_Parola/MD_Parola.h:603: warning: 'typedef' was ignored in this declaration
/media/UbuntuRoot/home/bill/Arduino/Arduino-AVR/libraries/MD_Parola/MD_Parola.h: In member function 'void MD_Parola::setFont(uint8_t*)':
/media/UbuntuRoot/home/bill/Arduino/Arduino-AVR/libraries/MD_Parola/MD_Parola.h:576: error: no matching function for call to 'MD_MAX72XX::setFont(uint8_t*&)'
/media/UbuntuRoot/home/bill/Arduino/Arduino-AVR/libraries/MD_MAX72xx/MD_MAX72xx.h:802: note: candidates are: bool MD_MAX72XX::setFont(MD_MAX72XX::fontType_t)
Parola_Display.ino: At global scope:
Parola_Display.ino:57: warning: deprecated conversion from string constant to 'char*'
Parola_Display.ino:57: warning: deprecated conversion from string constant to 'char*'
Parola_Display.ino: In function 'void loop()':
Parola_Display.ino:128: warning: operation on 'curText' may be undefined
Parola_Display.ino:135: warning: operation on 'outFX' may be undefined
Parola_Display.ino:138: warning: operation on 'inFX' may be undefined



I couldn't find anything newer for MD_MAX72xx and the repo here
http://arduinocode.codeplex.com/SourceControl/list/changesets?branch=master (http://arduinocode.codeplex.com/SourceControl/list/changesets?branch=master)
seems to be empty.

There are also a few warnings in there that should be fixed like the bool returns that don't
return anything.

It would be nice to have a separate repo for MD_MAX72xx
I use the direct repo for any library that has one and clone it directly
into my sketchbook/libraries directory.
It is nice to work this way as you can debug your code in place and push
pull requests back to the authors.

I'm just starting to do diffs between the two parola library trees to see what has changed.

--- bill

Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: bperrybap on Feb 27, 2014, 07:18 am
ok, got the master branch head working.
I'm assuming it doesn't work for you either.
I had to remove the inline setFont() in MD_Parola.h
And pick a real font for the setFont() call in begin() in MD_Parola.cpp
as it wants an enum for the font.

Guess I was a victim of a broken head revision.

--- bill
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Feb 27, 2014, 07:28 am
No. You have a mismatch with the hardware library. I have not yet released the new version of the lib.  I will set up a repository later today as this will be a problem for you for a while if I don't.

Parola repo is in between versions but functional, but it needs a newer version of the max lib.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: bperrybap on Feb 27, 2014, 07:57 am

No. You have a mismatch with the hardware library. I have not yet released the new version of the lib.  I will set up a repository later today as this will be a problem for you for a while if I don't.

Parola repo is in between versions but functional, but it needs a newer version of the max lib.

Ah, so there is a newer MP_MAX72xx library
A repo for this would be great, but no hurry. I can live with the older released zip images
(with my mods) for while.

btw, I think the iset resistor (10k) that comes with the icstation boards is too low.
It is blindingly bright and hurts your eyes when at half brightness and when cranked down to 1 it
is still a decent brightness.
I don't know what the voltage drop or max current for these LEDs is,
but I'm betting they are way overdriving the LEDs at 40ma+
I'm going to try to find some larger resistors.
After building a few of these I'll recommend that it is best to solder the surface mount
cap first.

--- bill
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Feb 27, 2014, 08:30 am
Done. Repo is set up. MD_MAX72XX should work with MD_Parola from the repo now. Let me know if there are any issues.

There are a few changes to the hardware dependency and fonts in this release - look at the header file or the repo history.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Feb 27, 2014, 09:56 am
Quote
I don't know what the voltage drop or max current for these LEDs is,


The MAX7219 datasheet has a table for the resistor based on the current through the LED. 10k give 40mA with 3V drop across the LED. This is way too much, especially as the V drop is not 3 but closer to 2, typically. Something like 60-65k is more appropriate for 10mA.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: bperrybap on Feb 27, 2014, 08:03 pm

Quote
I don't know what the voltage drop or max current for these LEDs is,


The MAX7219 datasheet has a table for the resistor based on the current through the LED. 10k give 40mA with 3V drop across the LED. This is way too much, especially as the V drop is not 3 but closer to 2, typically. Something like 60-65k is more appropriate for 10mA.


Yep, that is what I was thinking from looking at the table, which is why I said 40ma+
I'm in the process of documenting the board layout for my own use,
measuring forward voltage, and location of anodes vs cathodes with respect
to the in/out connectors and the 7219 outputs.
Let me know if you want it.
--- bill
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Feb 27, 2014, 10:47 pm
Any documentation on the matrices and how they are wired will be useful. I was thinking last night that the doc for the MAX72XX library needs to have something like that in it now that it is starting to support multiple hardware types.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: bperrybap on Feb 27, 2014, 11:18 pm
Here is the type of diagram that I'm thinking helps quite a bit:
Code: [Select]

RegData  DP A  B  C  D  E  F  G
(bit)   7  6  5  4  3  2  1  0
       +------------------------+ Digit
       |                        |  0
CLK ---|                        |  1  --- CLK
CS ---|                        |  2  --- CS
DIN ---|                        |  3  --- DOUT
GND ---|                        |  4  --- GND
VCC ---|                        |  5  --- VCC
       |                        |  6
       |                        |  7
       +------------------------+


This is for the icstation DIY module kit.
This shows the led orientation on the board vs 7219 registers & bits.
I prefer this as the whole row/column convention starts to get very
confusing as there are so many different orientations and layouts that
are used. It makes it easy to see what happens when you begin to rotate
the display around to different orientations like having the inputs on the
bottom vs on the left vs on the right.

Maybe the ifdefs in the max7219 library could be based on the orientation and bit
ordering vs on h/w/vendor types?

Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Feb 27, 2014, 11:48 pm
The style of diagram is helpful and should be in the doc, for advanced users if nothing else.

Quote
Maybe the ifdefs in the max7219 library could be based on the orientation and bit ordering vs on h/w/vendor types?

I am not sure it would help much. Most users are beginners (hardware and/or software) and by-and-large the questions I get indicate that they connect up and run the examples without too much thought. If they don't work, they ask a question, often without even knowing that the documentation exists. Making things explicit by brand name reduces the support load considerably, as does including a picture of the hardware. I don't perceive that there are a lot hardware types anyway, with the majority being the 'generic' type you can buy all over the place.

As an example, with the generic modules, the 'upside down' orientation of the module (with the 7219 driver chip on top) does not seem obvious to everyone when the scrolling is observed as back to front and upside-down.

Quote

I prefer this as the whole row/column convention starts to get very confusing

The hardware and the software views of what is Col0 can be different, so I think this is where the confusion comes in. I think that the diagram you have may help clear that up.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: bperrybap on Feb 28, 2014, 12:14 am
I agree with you about people just trying things without reading.
(seems to be the "arduino way", actually encouraged by its founders)
I've also done quite bit of documentation for my glcd libraries:
http://code.google.com/p/glcd-arduino/ (http://code.google.com/p/glcd-arduino/)
https://bitbucket.org/bperrybap/openglcd/wiki/Home (https://bitbucket.org/bperrybap/openglcd/wiki/Home)
and have noticed that many don't adauqtely read the documentation,
if at all.

On the ifdefs I guess what I really meant to say was more a combination of both.
The orientation/row/column bit order conditionals are what is in the actual code
and then to make it easier for the users, allow them to select from a list of canned device
defines which then set the appropriate secondary defines.
Just a thought.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Feb 28, 2014, 06:50 am
Quote
The orientation/row/column bit order conditionals are what is in the actual code and then to make it easier for the users, allow them to select from a list of canned device defines


Yes, I like the idea. It would contain the amount of mods that will be needed in the code in the long run, with changes to the header file becoming sufficient. In fact, putting the setup of the #defines for transformation feature in the _lib.h file hides the detail and guarantees that they are local to the library only.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: alhootti on Mar 01, 2014, 08:21 pm
Mr.Marco we done the work 90% please try to help me about last topic to solve the problem im sure you can do that.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Mar 02, 2014, 07:47 am
@alhootti - Parola is a tool provided for people to do their project more easily, and I am happy to make that tool more useful by adding general features that can be combined in different ways. There is now a tool for creating fonts, which simplifies this process a lot from version 1, and you have provided an Arabic font that you can use. I have no knowledge or understanding of what I am reading in Arabic to be able to do any more work in this area.

Arabic is the only language I know of where the position of the letter makes a difference to how that letter is drawn. This makes it a complex script to display. On top of that, there are also many styles of scripting. These scripting rules don't belong in a Parola object but in a separate implementation to process a string before Parola displays it. I also don't think that 8 pixels tall enough to do 'Arabic script' well. However, as all the tools are there, it is up to someone else (you maybe?) to do the 10% you think is need to make it work for you.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: makini on Mar 09, 2014, 09:38 pm
Hello to all friends
I am trying to do scrolling text with two pieces of MAX7219 module.
The sketch code for this .... found it here
https://docs.google.com/file/d/0B_YlEklLDDS7WTF0c2hlVzFCZWc/edit?usp=sharing
I want to do something like this http://youtu.be/uG88Tt6Apoo
But i do not found the sketch ....i have arduino Uno and the last arduino software .
I was trying this sketch code without results .....always problem.....
Arduino: nightly (Windows 7), Board: "Arduino Uno"

MAX7219_5:135: error: 'MaxMatrix' does not name a type
MAX7219_5.ino: In function 'void setup()':
MAX7219_5:159: error: 'm' was not declared in this scope
MAX7219_5.ino: In function 'void printCharWithShift(char, int)':
MAX7219_5:196: error: 'm' was not declared in this scope
MAX7219_5.ino: In function 'void printString(char*)':
MAX7219_5:221: error: 'm' was not declared in this scope

  This report would have more information with
  "Show verbose output during compilation"
  enabled in File > Preferences.

Please help me.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Mar 09, 2014, 10:00 pm
It is entirely possible to do what you want with the Parola library.

Code: [Select]
#include <MaxMatrix.h>

However, the example you are using does not use Parola but requires the MaxMatrix library (a different one, not MD_Parola). The error message you are posting are consistent with you not having installed the library. You will need to download and install that library.

If you want to use MD_Parola, then you will need to download MD_Parola and MD_MAX72XX libraries. In this case I would start with one of the example programs rather than the code you have.

Hope this helps.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: mbecus on Mar 10, 2014, 06:33 pm
How can I write with all the characters from the ascii table? (0x20 -> 0xFF) :smiley-red:
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Mar 10, 2014, 10:08 pm
Quote
How can I write with all the characters from the ascii table? (0x20 -> 0xFF)


This depends on what and why you are doing this:

1. The MD_MAX72XX_Test example shows what is defined for all the characters as part of its normal cycle.

2. Font Builder will let you view what the characters look like and edit them.

3. Non-printable characters can be put in a string or character constant using the usual escape sequence normal for C/C++ - "\x0NN" - where \ is the escape, x indicates hex and then the next three hex digits are the ascii code for the character (eg, \x0a4 for Ascii 0xa4). There are others forms of this so best to look it up.

4. Printable characters are just put in a string or character as normal.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: mbecus on Mar 10, 2014, 10:41 pm

Quote
How can I write with all the characters from the ascii table? (0x20 -> 0xFF)


This depends on what and why you doing this:

1. The MD_MAX72XX_Test example shows what is defined for all the characters as part of its normal cycle.

2. Font Builder will let you view what the characters look like and edit them.

3. Non-printable characters can be put in a string or character constant using the usual escape sequence normal for C/C++ - "\x0NN" - where \ is the escape, x indicates hex and then the next three hex digits are the ascii code for the character (eg, \x0a4 for Ascii 0xa4). There are others forms of this so best to look it up.

4. Printable characters are just put in a string or character as normal.



I would like to write all characters 0x20 to 0x7F, and all of the accented characters. (őűüáéöóÓŐŰ etc.) I tried it befor but it failed. Usually not written anything, or displayed the wrong characters. Thanks for the help.  :) I'm going to try out what you've written.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: Jeff_Haas on Mar 19, 2014, 07:23 am
Hi Marco,

I have four of Chinese MAX7219 modules that seem to be wired differently than the ones you tested with.  Take a look at this video:

http://youtu.be/M5Qup8lfPug (http://youtu.be/M5Qup8lfPug)

The letters display in mirror-image and scroll backwards.  Setting #define USE_PAROLA_HW    0 makes no difference.

Is there a way to change this?  I've gone through the docs for both the MAX72XX and Parola libraries and haven't found a command that would handle this.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Mar 19, 2014, 10:07 am
You have to edit the MAZ72xx,h file and change the define there. Just setting it in your code won't work.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: Jeff_Haas on Mar 19, 2014, 05:21 pm
Thank you, that did it.  First time I've had to edit something in a library.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Mar 19, 2014, 08:27 pm
Unfortunately because of the way the header files are mashed in the Arduino compilation environment, using an external define to select the hardware type is very unreliable, as you discovered.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Mar 29, 2014, 02:03 am
Version 2.0 Release

Version 2.0 of the Parola library has been released today. All the features of version 1.0 plus


Zones provide a huge increase in the flexibility of the displays. A zone is a contiguous sequence of one or more display modules (LED matrices) and has all the attributes of the original displays - animation, speed, font, spacing, etc. This allows complex displays to be easily created. For example, one part can show relatively static text while a different one has animation and movement (see the video).

Video of the new features at http://youtu.be/u1iELyROjW8 (http://youtu.be/u1iELyROjW8)

Parola library is available from http://parola.codeplex.com (http://parola.codeplex.com)
MD_MAX72XX library from  http://arduinocode.codeplex.com (http://arduinocode.codeplex.com)
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: Jeff_Haas on Mar 29, 2014, 03:02 am
Very nice!
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: bperrybap on Mar 29, 2014, 06:16 am
Cool.
I'll be playing with it over the next few days.
I really like the module orientation diagrams. I think that really helps.
I did notice an issue.
When I built the MD_MAX72xx doygen files, the h/w module diagrams in
the html output were missing newlines so they weren't readable/usable.

I've got a couple of 8x8 fonts in my openGLCD library that will work with slight modification.
(They just need to have the width field added to each character)
I'll be trying them out.

--- bill




Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Mar 29, 2014, 06:20 am
Bill - not sure I get what is happening to the file. The download (zip) has the doc file - can you please download that and see if yours are different from the published one (also generated using doxygen).

I saw an effect where everything was on one line when I didn't know what doxygen was doing - to have it as 'code' it needs 4 spaces at the start of the line. If that is missing doxygen will do its normal 'folding' of lines as it pleases.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: bperrybap on Mar 29, 2014, 06:43 am
marco,
The one in the download is correct. Mine is isn't.
(I'm using a git clone which is why I built it)
Looks like the doxygen in the Linux Mint 13 repo is really old.
Mine doxygen is 1.7.6.1 vs the one you built with is 1.8.6
Lots of changes and new features since then like markup support,
which is being used.
Not sure why the mint 13 repo is so far out of date.
1.7.6.1 was released in late 2011 and 1.8 was released back in early 2012.

So don't worry about this one. This is my issue.
I'll get my doxygen updated.

--- bill
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: alhootti on Mar 29, 2014, 04:38 pm
Thank you Marco you are great man
IS IT SUPPORT ARABIC LANGUAGE?
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: bperrybap on Mar 29, 2014, 06:27 pm
marco,
Seems to be all working on my icstation modules.
In taking a closer look at the module orientation diagrams there is one thing missing.
The orientation marker for the LED matrix itself.
While I was playing with the icstation module writing up some documentation
for it, I found it quite useful, particularly since the schematic that they provide
is totally wrong with respect to the LED matrix pin connections.
I used a caret and a V as the marker in the diagrams to show
the orientation of the actual LED martrix since it kind of looks
like the little marker on the actual matrix.
It's not necessary for those only writing s/w but it might
be useful for completeness.

Code: [Select]

Rather than use row/column terminology and LED pin numbers which
can get cofusing, particuarly when the modules
are rotated or connected in different ways,
here is an orientation map that shows how the leds are mapped
on the actual display module relative to the max7219 registers

72xx
RegData  DP A  B  C  D  E  F  G (anode)
(bit)   7  6  5  4  3  2  1  0   72xx
       +-----------^------------+ Digit (cathode)
       |                        |  0
CLK ---|                        |  1  --- CLK
CS ---|   8x8 Red LED Matrix   |  2  --- CS
DIN ---|        1088AS          |  3  --- DOUT
GND ---|      Row Cathode       |  4  --- GND
VCC ---|       Vf = 1.8v        |  5  --- VCC
       |                        |  6
       |                        |  7
       +------------------------+
=============================================================================
This shows the LED matrix oriented as shown by a typical "datasheet" jpg image.
Note that the orientation marker is on the bottom vs top when plugged
into the actual PCB and that row/col indexing starts at 1 vs 0.

     COL  1  2  3  4  5  6  7  8
     PIN 13  3  4 10  6 11 15 16 (anode)
ROW PIN+------------------------+
1   9 |                        |
2  14 |                        |
3   8 |   8x8 Red LED Matrix   |
4  12 |        1088AS          |
5   1 |      Row Cathode       |
6   7 |       Vf = 1.8v        |
7   2 |                        |
8   5 |                        |
       +-----------V------------+


Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: bperrybap on Mar 29, 2014, 06:37 pm
marco,
I'm assuming you got your icstation modules in?
10k for iset was just way too bright for me.
The schematic they provide is wrong, it was obviously for some other matrix
with a different pinout.
I exchanged many emails with icstation to try to get the datasheet for the matrix
but they never could come up with one.
Several times they kept trying to point me to the 72xx datasheet.
I think they copied the circuit from somebody else.
I finally just gave up and ended up swapping out the 10k iset resistors for 68k 1/8 watt resistors through
hole resistors that I could source locally.
It is a pretty easy mod as there is a hole the pcb on one of the iset traces.
I attached a photo.

Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Mar 29, 2014, 08:16 pm
@Alhooti - It supports different fonts but not the scripting requirements. As per previous post, this is too specific for this type of library.

@bill - I used the same sort of technique for my resistors, and yes the tab on the matrix makes sense. I guess they only go in 2 ways so if the first doesn't work ...
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: Jeff_Haas on Apr 01, 2014, 10:44 am
I got more of the Chinese MAX7219 modules in the mail.  So now I have enough to set up a large display.  However, I find that six modules connected to an Arduino work fine, but any more than that give unpredictable results.  Miscellaneous pixels lit on one of the modules, some modules not lighting at all...variations of the issues discussed early in this thread.  This occurs if the Arduino is powered from the computer's USB or via a 5V battery pack (although the battery pack seems to cause fewer problems.)

Do I need to look at powering these differently?
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Apr 01, 2014, 01:23 pm
A solution has been proposed earlier in this thread involving powering down the display and then resetting the  7219s. Look for it.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: Jeff_Haas on Apr 01, 2014, 06:56 pm
I've done some more testing, and I read through the earlier messages and have tried them out; here's what I'm seeing...

Six modules work fine.  Rock-solid, predictable results.  Occasionally I get some stray pixels, but pulling the VCC pin, letting the modules turn off, reconnecting it and then resetting the Arduino will clear that up.  Sometimes this needs to be done twice, but after that, it works fine.

Turn off the power and add a 7th - now I get poor results.  Many of the displays will have stray pixels...cycling the power doesn't work; pulling the VCC pin from the boards, and resetting the Arduino doesn't work; pulling the entire connector to the boards, reconnecting and resetting the Arduino doesn't work.  But as soon as I remove module #7, it goes back to being reliable.  I've swapped the modules around and gotten the same results.  I've also tried powering the Arduino off a 5V 2000mA wall supply, and a 12V wall supply, with no difference in results.  I've used a different type of Arduino, same results (I have a Duemilanove and a few Evil Mad Science Diavolinos).

At this point I'm guessing it's the modules, given that other users on this thread have had success with different boards.  But any ideas are welcome.

Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: bperrybap on Apr 01, 2014, 07:49 pm
Some additional information that I've noticed.
What I see is occasionally, junk pixels show up and are stuck on.
For mine it is typically a few rows that are on on a single matrix.
The pixels remain stuck on even during scrolling and multiple display updates.
I have seen this with as few as 2 displays.
You can reset the arduino, which causes the 7219s to be re-initialized and the "junk" pixels
still remain in place.
Even downloading the sketch again, does not clear it up.
(which is essentially the same as doing a hardware reset)
Powering it off is the only thing that seemed to clear it up.
However, when the displays are in this state,
if I download code that uses a different matrix library, it does clear up.

I haven't bothered to chase it down yet, to see what the issue is
but i'm guessing it may have something to do with the initialization sequence and possibly
its timing.

One thing that I have noticed is that this library does not seem to be setting
the DECODEMODE register, where the other libraries are.
So if that register somehow goes wonky, it won't ever be re-initialized
properly even when the Arduino is reset.

Maybe there is ringing on the clock line or CS that causes an accidental write
to the DECODEMODE register due to it corrupting the data stream bits.
Or maybe a reset glitch from autoreset causes a glitch on the SPI pins
or the CS pin that occasionally accidentally clocks something to a register #9 on a matrix.
Whatever the case,
once that happens, even a reset wouldn't fix it since the library isn't
initializing the register.

I'll try to chase it down further when I have some time,
but I'm assuming that programing the DECOEMODE register would be a good thing
to do and would at least clear things up with reset vs a power down.

--- bill
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: Jeff_Haas on Apr 01, 2014, 08:05 pm
Bill, I've seen the same thing you describe - where "junk" pixels don't clear even with a reset, and they remain on even as scrolling effects go past their positions.  I'll try the tip about downloading using a different library tonight.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Apr 01, 2014, 09:08 pm
Bill, which library clears the modules? I can compare the initialisation code this week end. I see what you describe occasionally but a power cycle is enough with my modules, and usually more than 8 modules rather than 6.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: bperrybap on Apr 01, 2014, 09:25 pm
marco,
What is missing in your library is the initializing of the decode mode register (register #9)
It needs to be set to 0 to disable any decoding of the digits.
The datasheet does not specify the power up state of this register but it must
normally power up cleared rather than with junk or the problem would be
showing up all the time.

I was going to toss in a quick control() call to set it to zero in
MD_MAX72XX::begin() but it isn't that easy as there is currently no support
for DECODEMODE in the controlRequest enum or in control()

So I added a quick and dirty bit of code in the bottom of control()
to set the decode register to 0 whenever a SCANLIMIT is being set.

Code: [Select]

 // actually do the write to the device
 if (opcode != OP_NOOP)
   spiSend(buf, opcode, param);

 if(opcode == OP_SCANLIMIT)
   spiSend(buf, OP_DECODEMODE, 0);

 return(true);


The interesting thing during testing, is that as luck would have it,
one of the displays was corrupted when I plugged in the Arduino.
The Arduino was already loaded with the Scrolling demo and was connected
to 7 displays. The middle display had the corruption.

I downloaded this new code and it cleared it right up.
Pure luck that the problem happened on the very first power up.

Clearly the problem is that the decode mode register is getting corrupted.
How or why it is getting corrupted, I can't say, but for sure the decode mode
register should be initialized as part of the initialization sequence.

I think the proper fix is probably not the hack that I did for testing.

--- bill
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Apr 01, 2014, 10:57 pm
OK. Will try this on the week end. DECODEMODE was not implemented as it does not relate to the LED matrices, but easy enough to add it into the control switch and it can't hurt.

The datasheet is fairly clear on what happens on reset:
Quote
On initial power-up, all control registers are reset, the display is blanked, and the MAX7219/MAX7221 enter shutdown mode. Program the display driver prior to display use. Otherwise, it will initially be set to scan one digit, it will not decode data in the data registers, and the intensity register will be set to its minimum value.

but I guess these clone chips don't conform.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: bperrybap on Apr 01, 2014, 11:25 pm

OK. Will try this on the week end. DECODEMODE was not implemented as it does not relate to the LED matrices, but easy enough to add it into the control switch.

The datasheet is fairly clear on what happens on reset:
Quote
On initial power-up, all control registers are reset, the display is blanked, and the MAX7219/MAX7221 enter shutdown mode. Program the display driver prior to display use. Otherwise, it will initially be set to scan one digit, it will not decode data in the data registers, and the intensity register will be set to its minimum value.

but I guess these clone chips don't conform.

It's right there on the datasheet on page 7. Not sure how I missed that.
It could be that the issue is not actually a chip power up issue but rather glitches on
the external input signals to the max chips.
Maybe poor/degraded clock or data signals in the case of many chips strung together,
or maybe the max chips powerup sooner than the Arduino which might create a phantom glitch on the CS signal
as the AVR powers up.

When I see the issue, it has been from powerup not after running for a while.
Others may have different experiences.

Because of the auto-reset circuity on the Arduino,
the AVR gets reset many times when the USB cable is plugged in
(At least on linux) as it probes around looking at the device.
And then other resets can happen as the IDE comes up and it probes
for serial ports.

Maybe it happens as a result of a reset on the AVR while it was in the middle
of sending out  bits.
Consider this case:
CS is low
The avr is clocking out  bits,
a reset occurs.
This will cause the CS line to go HI-Z which may get seen as a high
which would then latch in whatever was sent just prior to that, which might
be an incomplete set of bits which who knows how that might be interpreted.
If the bits were just right, it could even write a non zero value to a displays #9 register.
When the next reset starts the code over, the #9 register is never cleared
so digit interpretation is enabled.


Another thing I've noticed while testing GLCDs for my openGLCD library,
I have seen that some the i/o pins on the AVR seem to glitch & toggle during self programming
(sketch updates by the boot-loader)
Not sure why it happens, (I never tracked it down) but I notice that it messes with some of the GLCDs
causing them to do all kinds of funky strange things while the programming is happening.

--- bill
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Apr 02, 2014, 09:54 am
MD_MAX72XX repo has been updated with new begin() code to initialise OP_DECODEMODE. Let me know how you all go.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: bperrybap on Apr 02, 2014, 08:06 pm
Once again a lucky coincidence occurred. When I plugged in my Arduino,
one of the matrixes had stray rows/pixels. When I uploaded the new
code, it fixed it. So odd, in that the many times I tried to intentionally create
the issue I couldn't.
So far it seems to have cleared up my issue.
Further long term testing will be needed to see if that fully resolves it or
whether there may be other intermittent h/w issues lurking.

One other thing you might want to look is that there are a few warnings in the code
that could be cleaned up.
Some of them are from a few functions that are declared returning a bool type but have no return in them.
setRow(), transform(), update(), wraparound(),

If you turn on the "Show verbose output during compilation" preference you will see them.

--- bill
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: wabbitguy on Apr 02, 2014, 08:13 pm
I have 10 of the eBay modules and 24 Parola modules so I've been testing the changes and mods for artifacts.

I started with the 2 line patch as suggested by bperrybap and where I initially had artifacts on my Parola 24 module display, the patch seemed to clear this up. Too easy as it turned out.

The keyword there being, "initially". I started last night, swapping around the Parola module order to see if I could introduce some artifacts on the displays and sure enough, I found two orders that did it. Neither the previous MD_MAX library with the added patch, nor the newer library Marco just released would cure it. Changing the module order would or using my power board modification would.

I found exactly the same issues with the eBay modules after 7 modules artifacts showed up. Playing around with the module orders I could get an order that worked. But it took a lot of order changes to find it. Way too many in fact. Again, I'd put my power control mod in and end of problem.

When I first started with the Parola boards, I found artifacts and at that time I'd tried everything I could think of. From adding external power, to filters on the power, tie in's at various points along the signal chain (Vcc/Gnd; even feeding signals from each end of the chain), and I used a DS1102E to watch it all. I found that I could take the Vcc out entirely and the Arduino would power the displays via the SPI pins albeit at a diminished brightness (not a good sign of things to me). I even tried using a quad state buffer on the SPI lines with again, mixed results.

What always seemed to work was powering the whole thing up, removing the 5 pin connector going to the modules, plugging it back in, and then warm booting the Arduino.

My thought was, and the power board mod and scope indicated this, when the UNO starts up, there's a significant amount of jitter that shows up on the pins as it powers up. With the MEGA2560 that I normally use for these types of modules, there doesn't seem to be the same high/low transitions on the pins during a power up. Thus, from my experience the Mega is better behaved and I normally use it with my power board.

I recently acquired some authentic MAXX 7219 chips and they don't exhibit the same problems as the eBay 7219's have. Of course the clone chips are five times cheaper. Along with that budget price is not what I'd deem to be stellar performance or 100% compatibility. So trying to fix the artifact issues with software is at best a bandaid solution because at any time the clone chips could change and we'd be back to square one.

Having said all this, having a permanent cure in software would be fabulous, but for now, I'll just keep the power board mod in my circuit and at worst, a warm reset on the Ardunio to clean up the "stuff"...

Mel

Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: Jeff_Haas on Apr 02, 2014, 09:06 pm
A few quick tests with my group of Chinese ebay modules showed that stray pixels are all cleared up.  I haven't seen one since updating to the latest version.

I still have the issue where any six of the modules work fine, and then adding one more results in unpredictable results - displays showing corruption, not showing any characters, etc.  That seems to be the cheap hardware.  The code clearly knows what it's doing - if I set it up for seven modules it's obvious that the demos will center the text correctly if I only have six plugged in. 
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Apr 02, 2014, 10:36 pm
Thanks all for your testing. It's a bit like having a virtual R&D group :)
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: bperrybap on Apr 02, 2014, 10:59 pm

The keyword there being, "initially". I started last night, swapping around the Parola module order to see if I could introduce some artifacts on the displays and sure enough, I found two orders that did it. Neither the previous MD_MAX library with the added patch, nor the newer library Marco just released would cure it. Changing the module order would or using my power board modification would.

I found exactly the same issues with the eBay modules after 7 modules artifacts showed up. Playing around with the module orders I could get an order that worked. But it took a lot of order changes to find it. Way too many in fact. Again, I'd put my power control mod in and end of problem.


Maybe there are different types of "artifacts"?
The ones on mine were fixed pixels usually rows that got stuck on a particular display.
I didn't see any sort of ghosting of pixels that moved around.

I'm not understanding how your power mod could affect the runtime environment.
It should only affect the powerup sequence and the timing as to when the s/w initialization sequence
starts.

The s/w update should eliminate any "artifacts" that occur due to any glitches at power-up
that affected the decode register prior to the library running.

If glitches on the clock or data lines are occurring while the library code is up and running
then neither the new code in the s/w update or the power control mod would come into play
as both are only dealing with things that happen only once at initialization.

I could see how long strings of displays could create clock signal degradation or even
ground bounce on modules.
But those types of issues would should show up regardless of what happened during
the initialization.

I'd be curious to look at VCC, GND, clock, and CS signals on the first and last modules
on the scope while there are artifact issues going on to see how they compare to each other
to see if there is any signal degradation or if there is any power issues like ground bounce.


--- bill


Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: wabbitguy on Apr 03, 2014, 01:29 am

Maybe there are different types of "artifacts"?
The ones on mine were fixed pixels usually rows that got stuck on a particular display.
I didn't see any sort of ghosting of pixels that moved around.

I'm not understanding how your power mod could affect the runtime environment.
It should only affect the powerup sequence and the timing as to when the s/w initialization sequence
starts.

The s/w update should eliminate any "artifacts" that occur due to any glitches at power-up
that affected the decode register prior to the library running.

If glitches on the clock or data lines are occurring while the library code is up and running
then neither the new code in the s/w update or the power control mod would come into play
as both are only dealing with things that happen only once at initialization.

I could see how long strings of displays could create clock signal degradation or even
ground bounce on modules.
But those types of issues would should show up regardless of what happened during
the initialization.

I'd be curious to look at VCC, GND, clock, and CS signals on the first and last modules
on the scope while there are artifact issues going on to see how they compare to each other
to see if there is any signal degradation or if there is any power issues like ground bounce.
--- bill

The artifacts on my displays are usually stuck rows/columns and usually at some position beyond the 6th module. Rarely will a whole matrix on a module be all on, usually 1/4 to 1/2 of it will be stuck. And it stays stuck. No library modifications of any kind I've tried will cure it. I can change a few modules around and find a new combination that doesn't work. On my 24 module test bench, I might find one, two or three of the modules affected.

My power control doesn't affect the runtime at all, since in my opinion it's not a runtime problem, I attribute all the hassles to those knock off 7219's. To my thinking, it's a problem in the 7219 chip. Or the chip that's labeled as a 7219 any way. Who knows what the heck it is. I don't. Oh and the 7221's knock offs don't fair any better.

Like you, I would have thought that once the Arduino is running and you send the initialize info to the chips, they should all reset and behave. Except mine don't.

When I first tested the newest library, the one module that exhibited junk suddenly cleared up. I was elated for a minute or so. I swapped its position with other modules and suddenly I had 3 that were displaying junk. Change them back, same module displayed junk. Removed "bad" module. Then I had one closer in the chain that displays junk. That's about what I commonly see.

Something to bare in mind is that the smallest setup I've ever built uses 10 modules. That's the usual point where I started to see problems.

What my power board does is apply power to the modules Vcc via an output pin in the sketch at the Setup(). When I do a warm reset, power is removed from the modules, and then applied again during the setup(). I've built about a half dozen different configurations for people (longest module count is with Parola's at 28 modules on a MEGA). Every one of them uses my Arduino controlled power board to power the modules after the Arduino boots up. I put a reset push button on the Arduino in the event that it's not a "clean" start up. That fixes it.

I rarely use the eBay displays because they don't fit as well together as the Parola ones do.

I've scoped the Parola modules from one end to the other, I found minimal signal degradation/noise (even added filters to tame it, added buffers to build/shape it up; didn't help), and even run multiple lines to various points along the displays to ensure as clean a signal as possible. My experience is it made no difference what so ever. Even on my 24 modules. It's what the 7219's "think" they see and lock onto during a cold boot and then they become deaf.

So any way, I pretty much gave up chasing this all down last year and just put in my Arduino controlled power board. Fix lousy knock off chips with other hardware. Easier for me.

The strangest thing is once the modules get running, I can remove the Vcc line and they keep running. That just doesn't seem right to my mind.

Mel
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: Jeff_Haas on Apr 03, 2014, 01:45 am
I just tried a quick experiment...I have two geniune MAX7219 chips.  I swapped them in for the ebay chips, then downloaded the MAX72XX_Test sketch set for two modules, and after it booted, I pulled the VCC pin.  The real chips act the same as the ebay chips - you have some power going to them that keeps some of the pixels on.  However the display is messed up.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: wabbitguy on Apr 03, 2014, 02:20 am

I just tried a quick experiment...I have two geniune MAX7219 chips.  I swapped them in for the ebay chips, then downloaded the MAX72XX_Test sketch set for two modules, and after it booted, I pulled the VCC pin.  The real chips act the same as the ebay chips - you have some power going to them that keeps some of the pixels on.  However the display is messed up.

Wow. I haven't been all that keen on doing that with my authentic chips so this GREAT info! Thanks!

Mel
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: Jeff_Haas on Apr 03, 2014, 02:40 am
Another update...some of the comments about the ebay chips being out of spec gave me another idea.  What if I set up a chain of the ebay modules but put some real chips in two of them (since right now all I have is two)?

Put one real chip in a module closest to the Arduino:
7 modules -  Works fine.
8 modules - Won't work.

Two real chips in first two modules closest to the Arduino:
No change from above.

Two real chips, one closest to the Arduino and then one third from the Arduino:
8 modules - works fine!
9 modules - works fine!
10 modules - Problem, module #9 shows glitches or is blank.

Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: wabbitguy on Apr 03, 2014, 03:02 am

Another update...some of the comments about the ebay chips being out of spec gave me another idea.  What if I set up a chain of the ebay modules but put some real chips in two of them (since right now all I have is two)?

Put one real chip in a module closest to the Arduino:
7 modules -  Works fine.
8 modules - Won't work.

Two real chips in first two modules closest to the Arduino:
No change from above.

Two real chips, one closest to the Arduino and then one third from the Arduino:
8 modules - works fine!
9 modules - works fine!
10 modules - Problem, module #9 shows glitches or is blank.

Cool. I just tried my authentic 7219's (I have four). By moving them around I could get a string of Parola 16 modules working perfectly. It's almost as these are acting as signal conditioners for the not so stellar crowd. On the scope they don't look any different though.

Now, if we could MAXX to sell us the authentic chips for $2.... :D

Mel
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: Jeff_Haas on Apr 03, 2014, 03:10 am
Mel - What was the pattern for using the genuine chips?  Every other one?
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: bperrybap on Apr 03, 2014, 03:47 am
I decided to look at the initialization code some more.
(I'm still not convinced that there is a chip issue yet)
I did this because I was noticing some garbage pixels during the initialization
that show up briefly and then go away as the scrolling demo starts up.
I would see this after pushing the reset button on the Arduino.
Not every time but occasionally.
This shouldn't happen.
I figured there was an issue so I slowed down the SPI clock to as slow as it would
go in attempt to increase the probability. It worked. It would happen more often.

In looking at the actual code I found an issue that can and does send
garbage commands to the chips.
Down in MD_MAX72XX::begin(void)

there is this sequence.

Code: [Select]
  if (_hardwareSPI)
  {
// Set direction register for SCK and MOSI pin.
// MISO pin automatically overrides to INPUT.
// SS pin is still used and needs to be made HIGH
pinMode(SS, OUTPUT);
digitalWrite(SS, HIGH);


The issue with this is that the pinMode will force the pin to be driven low.
Then the digitalWrite will drive the pin high.
If the csPIn is the same pin as SS (which it normally is when using SPI),
that just clocked in whatever is in the shift registers.
If it is a clean startup, it should be zeros, which is NOPs
but if it was a reset during operation from either pushing the reset button
or from an autoreset when uploading the sketch, then there is a possibility
that the shift registers are not all zeros.
There is also the possibility that if the clock and data lines glitch
during the reset process, that the 7219 might actually clock in data since
it clocks data regardless of the state of LOAD/CS.

One thing that I did to ensure that the LOAD/CS is never driven low prior
to driving it high by swapping the initialization order to:
Code: [Select]

digitalWrite(SS, HIGH);
pinMode(SS, OUTPUT);


I also inserted additional debug code to be able control and pause every pin
initialization and control() call.
Strange things happened and you could watch the "garbage" pixels turn and off
from the TEST and SHUTDOWN control() calls.
Certain pixels would go away and then re-appear.
It was very strange.

The good news is that after
the SS initialization order change, I no longer saw the garbage pixels after many resets.

I'm assuming that this worked because the 7219 CS pin is biased high if it is floating and so if the AVR pin
is made an input with the pullup turned on,
which is what happens if setting the pin high before you set it to be an output,
then the CS pin would never see the low which avoids the low to high transition.

One thing that is interesting is if you look at the 72xx register table you can see
that registers 0xD and 0xE don't exist.
It is undefined what would happen if you write to them.
If sending garbage bits, it is possible that these end up being written to
and that strange things then happen.
It is also possible that different versions of the chips react differently to this
invalid condition and maybe some don't ever recover.

Another thing that is interesting about this is that the powerdown that mel is doing
would force the shift registers to be zeroed out whereas a normal reset will just
interrupt the SPI operation leaving garbage in the shift registers.

I'd be curious if the issues you guys are seeing go away if you modify
the SS initialization code.

-- bill

Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: wabbitguy on Apr 03, 2014, 04:20 am

Mel - What was the pattern for using the genuine chips?  Every other one?

Yep. I put them at the odd number positions. Worked the best that way. I tried spacing them out more but about 4 modules apart things started to regress...

Mel
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: wabbitguy on Apr 04, 2014, 09:18 am

I decided to look at the initialization code some more.
(I'm still not convinced that there is a chip issue yet)

One thing that I did to ensure that the LOAD/CS is never driven low prior
to driving it high by swapping the initialization order to:
Code: [Select]

digitalWrite(SS, HIGH);
pinMode(SS, OUTPUT);


I'd be curious if the issues you guys are seeing go away if you modify
the SS initialization code.

-- bill

Bill, I finally got some times to try out your suggestion. I modified the MD7219xx library as per your instructions. I'm using an official UNO, 24 Parola modules.

With the unmodified library, the 11th module would get exactly the same artifacts every time from a  cold boot. A warm boot would not make the artifacts go away once they show up.

With the modified library, the 11th module showed the exact same problem. No difference what so ever.

Interestingly, I could swap out the 11th module with ANY other module in the chain, and the 11th module would still exhibit the problem using either the modified library or unmodified one.

I attached the scope shots from the CLK and LD lines at the 1st and 24th module.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Apr 04, 2014, 10:39 am
My findings, running the eyes demo (which has always had the most 'artefacts' with my setup) and 22 Parola modules:


Looking up the didtalWrite() manual reference:
Quote
If you do not set the pinMode() to OUTPUT, and connect an LED to a pin, when calling digitalWrite(HIGH), the LED may appear dim. Without explicitly setting pinMode(), digitalWrite() will have enabled the internal pull-up resistor, which acts like a large current-limiting resistor.


So I am guessing that this code
Code: [Select]
digitalWrite(SS, HIGH);
pinMode(SS, OUTPUT);

is not doing anything but setting the input resistor rather than setting the pin HIGH.
Update: I also found this, which answers my question
Quote
a pin that is configured to have pullup resistors turned on when the pin is an INPUT, will have the pin configured as HIGH if the pin is then switched to an OUTPUT with pinMode().


If only there was a way to 'reset' the 7219 chips without cycling power, I think we would have no problem...
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: bperrybap on Apr 04, 2014, 03:36 pm

So I am guessing that this code
Code: [Select]
digitalWrite(SS, HIGH);
pinMode(SS, OUTPUT);

is not doing anything but setting the input resistor rather than setting the pin HIGH.

Correct. It turns on the pullup which is very important in this situation.
The existing order causes the AVR pin to go from
floating to driven low to driven high.
The swapped order causes the AVR pin to go from
floating to pulled high to driven high.
It must be done in this order to ensure that the AVR does not clock the CS line on the 72xx
by first driving it low then high.

If you slow down the code, you can visually see garbage being clocked into the chips
on warm-starts as I would have expected without this change.
(In my case, when decode register is updated the garbage is cleaned up)

Setting the NODECODE fix ensures that the 72xx decode register is properly
set if it gets clobbered for some reason like the garbage writes that happen
when the SS line accidentally strobes by accidentally setting it low first.

Both of these fixes should be in the code.
The NODECODE being the more important one as it should initialize
the decode register to a known state which should correct
the issue created by the incorrect SS initialization order.
However, if the chip freaks out when register 0xD or oxE is written to,
then all bets are off if there is some other h/w glitch going
on that does this.

But at least by correcting the SS initialization order, it can ensure
that garbage somewhat random registers writes are not happening as
part of the initialization sequence.


wabbitguy,
I'm not understanding your scope diagrams.
I can't tell what the voltages are and where ground is.
If the clock signal is really undershooting ground, that looks like
ringing or a ground bounce problem.
i.e. are we seeing ground floating up, or are we seeing undershoot?

--- bill


Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: wabbitguy on Apr 04, 2014, 06:11 pm

I'm not understanding your scope diagrams.
I can't tell what the voltages are and where ground is.
If the clock signal is really undershooting ground, that looks like
ringing or a ground bounce problem.
i.e. are we seeing ground floating up, or are we seeing undershoot?

I had all the measurement data turned off since I was looking at the raw signal coming out of the UNO, then comparing that against the signal at the end of the 24th module. Thus I moved the waveforms around on the scope (the clk was all in the top right quadrant on the scope so bottom of the trace is 0v). If you see a ground ringing problem in the clk_1st, then it's coming directly out of the UNO, and it is powered by a bench supply.

Mel
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: bperrybap on Apr 05, 2014, 01:34 am
Ok, so still not believing there is any sort of chip problem,
I decided to dig a bit deeper into the s/w to see if there were any other s/w issues
since even though my displays seemed to no longer have initialization issues,
there were some funky pixel issues I had earlier seen during the initialization when I
had slowed things down that I never resolved.
So I REALLY slowed down everything and starting seeing the funky pixel changes again during
initialization after pressing RESET on the Arduino.
It all eventually seem to recover to work ok, but there shouldn't be any odd pixels.
It was REALLY odd, momentarily some pixels changed, some displays had pixels with different
intensities. Lots of funky stuff.
It was very repeatable. This was good!

So then I went back to pausing after each control() message and
noticed the funky pixel stuff had happened by the time the first
control message was done.
control(TEST, OFF);
(my pauses were after each control function call)
So now thinking there must be some sort of reset issue potentially
related to the led pin13 blinking (which is the clock line)
I hooked up the logic analyzer to see what the signals
going to the modules looked like to see what was going on.

First thing I noticed was WAY more messages being sent to the displays
than I expected.
(I'll get back to that later).

So after spending quit a bit time going down MANY rat holes,
I noticed that for the TEST/OFF command,
the commands being sent were the wrong ones!
I was seeing a string of DIGIT0, 0 commands (0x1, 0x0)
instead of TEST/OFF (0xf, 0x0)
Now we are getting somewhere!
Looking closer at the commands,
I had 7 displays but I noticed that there were 49 command being sent to set the test mode
on the 7 displays.
Seven bursts of 7 commands.
The command looked like:
six (d0/0) one (TEST/0)
five (d0/0) two (TEST/0)
four (d0/0) three (TEST/0)
....
seven (TEST/0)

It eventually turned out to be something really simple:
This code:

Code: [Select]
void MD_MAX72XX::spiClearBuffer(void)
// Clear out the spi data array
{
  memset(_spiData, SPI_DATA_SIZE, OP_NOOP);
}

Here is the prototype for memset:
Code: [Select]
void *memset(void *s, int c, size_t n);

So the code should be:

Code: [Select]
void MD_MAX72XX::spiClearBuffer(void)
// Clear out the spi data array
{
  memset(_spiData, OP_NOOP, SPI_DATA_SIZE);
}


The error caused the _spiData arrary to not be filled in with
the needed NOOPs.
So whatever was there was being used and since it is malloc'd
it can vary depending on the actual code.

After this fix, no more funky pixel stuff.

One thing that would be nice is if the code could be a little smarter and
send the commands to all the displays at the same time vs sending the
command to each display separately which requires sending NOOPs to all
the other displays.
This would reduce the number of commands sent from NxN to just N.

I'd be curious if others still see issues after all four s/w updates are incorporated.
- the decode register
- the SS init order change
- the _csPin init order change
- the memset() parameter order fix.

marco,
I am curious on one thing. The SPI code.
Any reason not to use the SPI library that comes with the IDE so that the code could work
on the non AVR platforms? Like chipkit or Teensy 3?
Anyway just  wondering.

--- bill




Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Apr 05, 2014, 07:37 am
Quote
After this fix, no more funky pixel stuff

I am staggered that the library worked at all reliably given that this clear function is called for EVERY comms cycle. Well done finding that! Thanks. Having fixed the problems with memset, DECODE does not seem to be needed any more.

Quote
This would reduce the number of commands sent from NxN to just N

Yes it would. The library is like that for historical reasons and it is time to address this inefficiency. Commands are rare compared to the number of other messages, so it was left alone at the time when there was a lot of other stuff to sort out and never came back to it. I have fixed this now.

Quote
Any reason not to use the SPI library that comes with the IDE

Nothing specific (I assume you are referring to the SPI.h library). I originally used the library but decided it would be neater (header files, better control) if the specific code was just included in my lib. The defines for SS, MOSI, SCK are from the Arduino header files.

Repo has been updated with revised library code.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: wabbitguy on Apr 05, 2014, 09:37 am
Sure glad this works for you guys....because doesn't look one iota different here. Same artifacts as always. Maybe it just doesn't like having 24 modules online. To make sure my UNO wasn't haywire, I also tried 3 other Arduino UNO's I have.

Artifacts on 3, 11, 22. Changed the module order. Artifacts stayed in the same positions.

I'm going to test with less modules running when I get some time later today, see if there's a magic break point. And I'm going to throw a MEGA at it as well to see how that fairs.

Mel
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Apr 05, 2014, 10:26 am
Have you taken the latest from the source code section?

Memset was definitely wrong ...
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: wabbitguy on Apr 05, 2014, 05:34 pm

Have you taken the latest from the source code section?

Memset was definitely wrong ...

No, I didn't. I assumed, incorrectly, that it was the usual download (the March date should have been the tip off but it was late; that's my excuse and I'm sticking to it). So I just now redownloaded from the source code and colour me elated!

All of my 24 modules work perfectly, as well as the 4 UNO's I've been testing with. Way to go Bill!

Good thing I can repurpose these power boards for other projects... XD

Mel
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Apr 05, 2014, 09:46 pm
That's good news that it works for you as well.

The source code download will always be the latest working copy as I develop a new release, before the official release. The zip file releases include updated documentation. This applies for Parola as well. You can look at the history of the source code to see my check-in comments as to what has changed.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: bperrybap on Apr 05, 2014, 10:30 pm
latest code works for me.
I clone the repo directly into my libraries directory so I can just pull in the latest code
and merge it into any local changes that I've made.

I'm currently playing with using some 8x8 fonts from my openGLCD library.
There are some slight issues that crop up when the font spacing is zero pixels.
But I've got the fonts up and working.

On the down side while playing with this, one time, I did run into some displays
that got stuck pixel rows just like what I was seeing before.
This happened after a download of some new code.
reseting or downloading new code would not fix it.
I had to power down everything to clear it. Not sure what is going there
as I would have thought the new initialization code should clear it up even
if some thing strange happened.
I can't seem to re-produce it.


--- bill
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: Pedro147 on Apr 06, 2014, 05:58 am
Marco I just saw all the new effects that you have added to your library and wanted to congratulate you on the great job you do with your library and the continual improvements you incorporate. I also see that you have Bill and a few of the other guys all enthused and hard at work too. Great job guys  8)
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: sgd_indian on Apr 08, 2014, 03:52 pm
Dear sir, Can i expand this matrix vertically. If yes pls. provide demo video of the vertical expansion of displays in actions.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: Docedison on Apr 10, 2014, 02:56 am
All I can Say is Thank You both Bill and Marco... I have 8 of the original and 20 of the square Ebay modules with the SMD 7219's (Leave it to CN to Phuck things up)... I had been using a digistump USB power switch [Really Handy] to clear my original modules... BTW I had the artwork reworked to triple the bus width for the common signals, CLK... and no joy... I'm not too sure I made a wise decision in buying 20 of the Ebay modules (the SMD ones)... But so far it really looks like a slight mistake in the initialization order... with the original Parola code... I haven't done much with the MD_72XX code yet. I have a 40 year history with H'ware but pointers are just becoming clear enough to read and understand... Not yet too sure about using them... I have to say that this has been a Very interesting project, Very educational in Many aspects...
Again Thank You BOTH for your hard work.. I own a Saleae Logic... Funny thing but it never occurred to monitor each I and O Vs the clock.. The scope pictures really look like capacitive loading is the issue... A lower value pull-up or some Fast buffering might fix that. However Sharp leading edge generally means an HP filter (faster rise time, sharp trailing edges generally mean a LP filter..  I use a Buono for testing as it has a switcher for the 5V output and a 7.5V wall wart or a 5A PSU adj to 7V out. THe USB switch seems to clear things up But it might take two or three attempts and I have noticed that as the modules are handled the artifacting will re-appear and is cleared by cycling the PSU via the power switch... I've been too busy to build a wooden box to hold two rails (90 Deg angle brackets 10" long) which will with some smoke acrylic for front and rear house both a Pro-Mini and the GPS for the time data... Etc. More latter.. Off to get the latest code.. and try it out. Sure beats an HT1632 though..

Doc
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Apr 12, 2014, 01:14 am
Quote
Can i expand this matrix vertically


You need to explain what you want to do. You can stack the displays on top of each other - that is just a physical layout.

If you want your software to operate as if it was a big screen, then you will need to handle the operations between the 'lines' of display. The ability to define zones has made this much easier - just define a zone for each line.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: E40racer on Apr 12, 2014, 11:17 am
Built 8 modules from ICstation yesterday, and tried out an example sketche of the library. Works great. Thanks for the fantastic library :)

https://www.youtube.com/watch?v=i_8tvPwT6OE
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: mkfloria on Apr 14, 2014, 01:34 pm
Hi,
I have to tell, that the that's much nice project.
I want ask, whether be somewhere possible to download them circuit diagram to control ?
In potentiometer, switching device etc .
Thank you for inf.
Martin
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Apr 14, 2014, 01:42 pm
I am not sure I understand your question. Do you mean the control you see in the video? It is just plain switches and a pot, like are used in most of the simple arduino examples.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: mkfloria on Apr 14, 2014, 07:48 pm
Yes, it am thought. Schematic layout hereof circuit and attach to pin Arduino.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Apr 14, 2014, 09:17 pm
All the pin numbers are defined in the Parola_Test example. You can change it to whatever you want if they don't suit.
Code: [Select]
// User interface pin and switch definitions
#define  SPEED_IN      A5 // control the speed with an external pot
#define  PAUSE_SET   4 // toggle pause time
#define  JUSTIFY_SET  6 // change the justification
#define  INTENSITY_SET 7 // change the intensity of the display
#define  EFFECT_SET    8 // change the effect
#define  INVERSE_SET   9 // set/reset the display to inverse


There is not much to explain about the circuit. Look at other examples on how to connect a pot and a switch to the Arduino. There is a lot already on this forum for these basic Arduino connections, so it is not really worth explaining it again here.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: mkfloria on Apr 15, 2014, 06:25 am
Hi Marco.
Much thank you for explication. This am found and I can understand that. Have had in view rather recommend HW circuit potentiometer, SW and alike.
I'm sorry, that the am it wrong wrote.
Martin
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: atairu on May 05, 2014, 05:53 am
Want to thank marco_c for this project and the countless number of hours he is putting for unpaid support!

I have put together a generic 8 modules and they work out of the box after going through the documentation.

I was wondering if wabbitguy will be able to share how he was able to combine/integrate real time clock chip to one of his modules in earlier thread? Can you share the sketch codes?
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: wabbitguy on May 05, 2014, 06:02 am

Want to thank marco_c for this project and the countless number of hours he is putting for unpaid support!

I have put together a generic 8 modules and they work out of the box after going through the documentation.

I was wondering if wabbitguy will be able to share how he was able to combine/integrate real time clock chip to one of his modules in earlier thread? Can you share the sketch codes?

You mean those Parola message board/clocks I built for my brother last year and for myself? They have a DS3231 RTC, HC-05 Bluetooth, Parola modules and LDR in them. I used a MEGA 2560. Plus I wrotethe Macintosh application that allows you to control them from Bluetooth.

Let me know if that's the one you mean...

Mel
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on May 05, 2014, 08:58 am
Quote
I was wondering if wabbitguy will be able to share how he was able to combine/integrate real time clock chip to one of his modules in earlier thread? Can you share the sketch codes?


Mel can give you an answer, but one of the example programs (Parola_Zone_TimeMsg) implements the time, temperature and relative humidity message that you see in the video for Parola v2. It uses a DS1307 module for the clock.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: atairu on May 05, 2014, 05:48 pm


Want to thank marco_c for this project and the countless number of hours he is putting for unpaid support!

I have put together a generic 8 modules and they work out of the box after going through the documentation.

I was wondering if wabbitguy will be able to share how he was able to combine/integrate real time clock chip to one of his modules in earlier thread? Can you share the sketch codes?

You mean those Parola message board/clocks I built for my brother last year and for myself? They have a DS3231 RTC, HC-05 Bluetooth, Parola modules and LDR in them. I used a MEGA 2560. Plus I wrotethe Macintosh application that allows you to control them from Bluetooth.

Let me know if that's the one you mean...

That was the thread I was referencing. Can you share more of the details?
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: atairu on May 05, 2014, 05:54 pm

Quote
I was wondering if wabbitguy will be able to share how he was able to combine/integrate real time clock chip to one of his modules in earlier thread? Can you share the sketch codes?


Mel can give you an answer, but one of the example programs (Parola_Zone_TimeMsg) implements the time, temperature and relative humidity message that you see in the video for Parola v2. It uses a DS1307 module for the clock.


It will be nice if some of us (Arduino rookies) can get the details of how to combine other hardwares like the RTC and sensors with the LED modules we've built. Playing around with the Parola LED matrix have really helped me in learning how to interact with Arduino because prior to this I describe myself as "Hardware-Phobic" (I am just a middle of the road C# programmer). Once again thank you guys for your selfless services.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: wabbitguy on May 05, 2014, 09:17 pm
Quote
It will be nice if some of us (Arduino rookies) can get the details of how to combine other hardwares like the RTC and sensors with the LED modules we've built. Playing around with the Parola LED matrix have really helped me in learning how to interact with Arduino because prior to this I describe myself as "Hardware-Phobic" (I am just a middle of the road C# programmer). Once again thank you guys for your selfless services.

I'll post my sketch later on. It apears that since I built my clocks/message boards last year, I haven't updated the library for the latest release of Parola so my original sketch won't even compile. No use starting off with something that way... :smiley-red:

Mel
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: wabbitguy on May 05, 2014, 10:31 pm
As the Swedish Chef would say, "Everyting is okey dokey" now...

I added some photos so you could see what I did for connections to all the bits and pieces. Essentially I used a bare breakout board from an UNO and used it to mount the DS3231 RTC and the Bluetooth HC-05 on top of the MEGA 2560.

The LDR (light dependant resistor; far left side of photo) in the second photo is mounted on a piece of scrap cardboard. Typical three wire connection, V+, GND and output (there is a resistor on the back side of that cardboard you can't see 4K7 or 4.7K):

GND--->resistor-->output<-->LDR--->Vcc

The Bluetooth HC-05 is connected to Serial1 on the MEGA.

For power I almost always use the same setup. A typical wall wart DC jack and a bridge rectifier (2A). You can see that in the third photo. The output of the bridge (+ and -) feeds a DC to DC buck converter. The output of the converter I set to 7VDC and connect that to the DC power jack on the Arduino. The reason I do it is two fold. First I can grab almost any DC adapter without worrying about polarity of it. Secondly, when you power the Arduino via the DC jack, anything over about 6.75V is dissapated in heat. Thus you can feed it 9-12VDC and it will work, but it runs pretty hot. Whereas feeding closer to 7V keeps the heat to a minimum.

I did try feeding 5VDC from the converter to the Vin pin on an Arduino, but I cooked the regulator when I did that. So I've just gotten used to feeding the DC jack on the MEGA.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on May 05, 2014, 11:55 pm
Quote
It will be nice if some of us (Arduino rookies) can get the details of how to combine other hardware like the RTC and sensors with the LED modules we've built.


This is an interesting question and I think goes more to the way of thinking about hardware in the Arduino world than the hardware itself. Most of the simple modules used on these forums can be purchased cheaply and provide a few pins to interface to the Arduino hardware. By and large the interfaces are either Direct I/O or consist of ICs with bit-bashing serial interfaces (like the 595 or the MAX7219) or I2C or etc. The key here is that most newbies don't look at the datasheet for the hardware and jump right in, without too much understanding of what they are doing. Reading the datasheet (as difficult as some of them are!) at least gives a reason for why things are done as they are, and builds a knowledge of how to deal with classes of problems. An SPI interface to an IC is pretty much the same no matter what IC it is, so you just need to learn it once.

To take the example of the time and temperature displayed in the example video and sketch. The way I start these things is to build a knowledge of how the devices work (LED display, DS1307 Clock module, Temp sensor) individually. This requires some experimentation and code, independently of the final project device. This can be built up as part of general learning and experimentation (my preferred mode) or just specifically what is required for the project at hand. Google is a big friend here. In the software world this would be consistent with writing a function and a test harness to exercise the code to see 'what happens if ...'.

I use a 'sensor shield' arrangement and build small circuits for individual sensors on a 1"x1" prototype PCB. The sensor shield has standard Ground-Voltage-Signal (GVS) pins for each Arduino I/O and ready made 3-pin connectors can be bought in this configuration. This allows me to quickly combine the devices in different ways to test ideas. Many of the experimenter kits work in a similar fashion, but having to build the small test circuit forces me to read and understand the datasheet. I have described this arrangement much earlier in this thread, I think. [ Edit: Here it is http://forum.arduino.cc/index.php?topic=171056.30 (http://forum.arduino.cc/index.php?topic=171056.30)].

Once over this hurdle, integrating the devices comes down to what the project is about, which becomes quite specific to the application. The sensor shield once again allows me to mock up a large part of the functionality required before I build the final circuit. I will also, at this stage, usually breadboard some of the circuit that is not standard or too large to fit on the small protoboards.

Hope this helps. My background is in software but by breaking down the hardware into manageable 'subroutines' the ideas behind what is going on become quite manageable and easier to understand and integrate.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: wabbitguy on May 06, 2014, 05:23 am
Typically, I start with an LCD and an UNO or MEGA, add in a shield and start to experiment with it to get a sketch working. The goal being to learn how the shield itself works. The shields I order from any of the many online Arduino suppliers or from fleaBay. With fleaBay if things don't work, the seller is just that, a seller. Rarely do they have any clue as to what they are selling so don't expect any hand holding to get it working.

In many cases there's an Arduino library someplace that has examples for the standard shields so it's a simple matter of reading the code and figuring out how the shield works. Because there are so many different shields, there can be a number of communication protocols between the Arduino and the sheild.

After all the shields are working, I then start on the main sketch, adding in the shields as I write the sketch and finally, at some point, the whole thing works. Or in many cases doesn't... :) Which is where debugging comes in. Because I started with each shield to see how it works, I have a better understanding for fixing issues. The ugly issues show up when you have multiple shields that don't work together because of their design.

If I'm going to make a number of the same circuits, depending on the complexity, I design a PCB to hold all the parts. I route and etch them myself. Rarely do I have them made for me. Actually the Parola boards were the first ones I'd had made in about 30 years. Where I'm doing one-ups, I generally just use a prototyping board and some Dupont connectors.

My background, apart from being a musician was an electronics technician in 1960's, short lived though since there was no money in that field at the time here. There were no personal computers when I went through school. I didn't start writing commercial software until 1978 and at that point it was Z80 assembler. The lowly Arduino UNO has twice as much memory as the computers I was programming at that time.

I never saw, let alone wrote, a line of C code until I got my first Arduino UNO two years ago. The language syntax was what almost did me in. I knew what I wanted to do, but the syntax was light years from anything I'd ever used so hugely frustrating. I still have to stop and think for a minute to wrap my head around Structs and Unions. On the other hand, handles and pointers are second nature because of my assembler background.

Point being that none of the hardware or software is what I'd call "easy" if you've never done it before or had limited exposure to it. Be patient and work through each part. When you get stuck, Google is a first stop, then it's forums or people you know who can help out. But don't expect them to do the lion's share of your work. They are a resource for help, not do.

Mel
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: atairu on May 06, 2014, 05:30 am


Hope this helps. My background is in software but by breaking down the hardware into manageable 'subroutines' the ideas behind what is going on become quite manageable and easier to understand and integrate.


You are not just a selfless helper, you are also a teacher. Thanks, as I will use your principles as guidance in my pursue of interests in interacting with hardware.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: atairu on May 06, 2014, 05:49 am

As the Swedish Chef would say, "Everyting is okey dokey" now...


Thanks for the quick response, the post and the pictures.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: deanlure on May 14, 2014, 05:48 am
I am trying to make it work with Arduino Uno but getting the following errors when I try to run any of the example code provided in the folder:

In file included from Parola_Display.ino:8:
C:\Users\R-B\Documents\Arduino\libraries\parola/MD_Parola.h: In member function 'void MD_PZone::zoneClear()':
C:\Users\R-B\Documents\Arduino\libraries\parola/MD_Parola.h:319: error: no matching function for call to 'MD_MAX72XX::clear(uint8_t&, uint8_t&)'
C:\Users\R-B\Documents\Arduino\libraries\MD_MAX72xx/MD_MAX72xx.h:483: note: candidates are: void MD_MAX72XX::clear()
C:\Users\R-B\Documents\Arduino\libraries\MD_MAX72xx/MD_MAX72xx.h:668: note:                 bool MD_MAX72XX::clear(uint8_t)
C:\Users\R-B\Documents\Arduino\libraries\parola/MD_Parola.h:319: error: no matching function for call to 'MD_MAX72XX::transform(uint8_t&, uint8_t&, MD_MAX72XX::transformType_t)'
C:\Users\R-B\Documents\Arduino\libraries\MD_MAX72xx/MD_MAX72xx.h:616: note: candidates are: bool MD_MAX72XX::transform(MD_MAX72XX::transformType_t)
C:\Users\R-B\Documents\Arduino\libraries\MD_MAX72xx/MD_MAX72xx.h:735: note:                 bool MD_MAX72XX::transform(uint8_t, MD_MAX72XX::transformType_t)
C:\Users\R-B\Documents\Arduino\libraries\parola/MD_Parola.h: In member function 'void MD_PZone::setIntensity(uint8_t)':
C:\Users\R-B\Documents\Arduino\libraries\parola/MD_Parola.h:415: error: no matching function for call to 'MD_MAX72XX::control(uint8_t&, uint8_t&, MD_MAX72XX::controlRequest_t, uint8_t&)'
C:\Users\R-B\Documents\Arduino\libraries\MD_MAX72xx/MD_MAX72xx.h:405: note: candidates are: bool MD_MAX72XX::control(uint8_t, MD_MAX72XX::controlRequest_t, int)
C:\Users\R-B\Documents\Arduino\libraries\MD_MAX72xx/MD_MAX72xx.h:416: note:                 void MD_MAX72XX::control(MD_MAX72XX::controlRequest_t, int)

Any help would be greatly appreciated.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on May 14, 2014, 06:04 am
Make sure that you are using a consistent set of libraries with the examples code. Download all the latest and then try again.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: deanlure on May 14, 2014, 03:38 pm
Hi Marco,
I am currently looking at two downloaded zipped files: MD_Parola_v2.0_20140329.zip and MD_MAX72xx_v2.4_20140406.zip. If I have understood correctly then Parola also requires the MAX72xx library. So I need both of them to run the test programs supplied inside the MD_Parola/examples/ folder. Is that correct?
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: deanlure on May 14, 2014, 05:47 pm
Hi Marco,
Sorry for bothering you too much, but I have one more question. I was reading this forum (https://code.google.com/p/parola-for-arduino/issues/detail?id=2) and somebody mentioned that Parola can be used with type A (where columns are anodes) by setting  USE_PAROLA_HW and USE_FONT_ADJUST in the header file. But in the latest download, I don't see the USE_FONT_ADJUST in the header. How can I make the latest library to work with the A-type displays?

Thank you so much.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: Jeff_Haas on May 14, 2014, 07:12 pm
Dean,

You need to install both of Marco's libraries to get Parola to work.  Here's reference on how to do that:
http://arduino.cc/en/Guide/Libraries

Once you have done that, look in the MD_MAX72xx folder, and use a text editor to open the MD_MAX72xx.h file.  Marco has documented how to use his libraries quite extensively.  Scroll down to the section for:

\def USE_PAROLA_HW

and

\def USE_GENERIC_HW
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: deanlure on May 14, 2014, 08:10 pm
Thanks, Jeff. I will try it tonight and report it here.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: Jeff_Haas on May 14, 2014, 08:27 pm
Forgot to mention that once you've installed the libraries, there are demos added to the File > Examples menu.  Configure your modules according to the info in the MD_MAX72xx.h file and then try out all the demos.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on May 14, 2014, 10:29 pm
There are only 2 latest versions in the download sections. So installing those versions should be correct.

The libraries have changed in the latest versions. You need to read the documentation that comes with the libraries as this will be more up to date than the forum discussions.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: deanlure on May 15, 2014, 03:14 am
Hi Marco and Jeff,
Thank you for your help. I have now it running successfully on Generic type displays with #define   USE_GENERIC_HW    1 setting in the header file. But I would like to ask one more question. A while ago I designed my own PCB for driving Type A (which are also known as "columns anode" or CC) but with its orientation opposite to that of the generic one. I did that way to make it compatible with MaxMatrix library. At that point I was not aware of Parola. I wonder would it be possible to implement Parola in my current design? I have attached a picture of two boards showing how they are cascaded. You can see the pin number 1 of the display is on right bottom. It is on left top on standard generic type display.

Otherwise, I will make new boards.

Thanks.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on May 15, 2014, 04:01 am
The USE_*_HW defines ultimately are controlling how the libraries behave on a L-R and Top-Bottom. The translation is done in the _lib.h header file. There is a hardware test example that allows you to see which way the matrix is wired so that you can set up the appropriate mapping in the software header file.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: deanlure on May 15, 2014, 04:36 am
Hi Marco,
I have tried all 8 combinations of  HW_DIG_ROWS, HW_REV_ROWS, and HW_REV_COLS in the following block of code, but nothing worked out for my design layout.

#if USE_GENERIC_HW      
#define  HW_DIG_ROWS   0
#define     HW_REV_ROWS   0
#define     HW_REV_COLS   1
#endif

Any further suggestions? I really appreciate your help.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on May 15, 2014, 04:37 am
What does the matrix testing demo show?
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: deanlure on May 15, 2014, 04:41 am
Sorry I could not locate the testing demo code? If you are talking about Parola_Test example routine, it gives some compilation errors:
Parola_Test:66: error: 'MD_KeySwitch' does not name a type
Parola_Test:67: error: 'MD_KeySwitch' does not name a type
Parola_Test:68: error: 'MD_KeySwitch' does not name a type
Parola_Test:69: error: 'MD_KeySwitch' does not name a type
Parola_Test:70: error: 'MD_KeySwitch' does not name a type
Parola_Test.ino: In function 'void doUI()':
Parola_Test:87: error: 'uiJustify' was not declared in this scope
Parola_Test:104: error: 'uiEffect' was not declared in this scope
Parola_Test:140: error: 'uiPause' was not declared in this scope
Parola_Test:149: error: 'uiIntensity' was not declared in this scope
Parola_Test:158: error: 'uiInverse' was not declared in this scope
Parola_Test.ino: In function 'void setup()':
Parola_Test:172: error: 'uiJustify' was not declared in this scope
Parola_Test:173: error: 'uiEffect' was not declared in this scope
Parola_Test:174: error: 'uiPause' was not declared in this scope
Parola_Test:175: error: 'uiIntensity' was not declared in this scope
Parola_Test:176: error: 'uiInverse' was not declared in this scope
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on May 15, 2014, 04:43 am
It is a test program in the MD_72xx examples.

There is a library that you do not have in the Parola test example. That is documented in the code file. You need to read these and not just load and compile.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: deanlure on May 15, 2014, 05:04 am
Marco,
I found the MD_MAX72xx_HW_Mapper inside MD_72xx examples. When I ran it, here is what I found:

Segment Mapping
Seg G top left LED
..................................
Seg DP bottom left LED

And, Mapping for Digits
D0  Left most column

D7 Right most column
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on May 15, 2014, 01:32 pm
Sure, and which LEDs are on when it says that? The point of the test program it to turn on the led and tell you which row/column you are looking at.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: deanlure on May 15, 2014, 02:58 pm
Marco,
That's what I have mentioned above:

When it says Seg G, the top left corner LED (first row, first column) is on. Seg F is second row first column, and so on. Finally, Seg DP is 8th row, first col.

Similarly, for mapping for digits, when it says D0, all LEDs in first col are ON. For D1, all LEDs in second col are ON, and so on.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: deanlure on May 15, 2014, 03:08 pm
Marco,
I think I might have confused you with column numbers. When I said first column, I meant to the left most column.

Thanks
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on May 16, 2014, 10:18 pm
If understand you correctly the mapping you see , as-is
Code: [Select]

 D0 D1 D2 D3 D4 D5 D6 D7
G
F
E
D
C
B
A
DP



This is probably configured as HW_DIG_ROWS=0, HW_REV_COLS=1, HW_REV_ROWS=0. This looks like generic hardware config.

The modules upside down
Code: [Select]
 D7 D6 D5 D4 D3 D2 D1 D0
DP
A
B
C
D
E
F
G

This I think is HW_DIG_ROWS=0, HW_REV_COLS=0, HW_REV_ROWS=0.

Neither combination has been tested and probably won't work without some debugging.

Note: Late edit due to error in the explanation.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: deanlure on May 17, 2014, 05:47 am
Hi Marco,
You are correct. The orientation of my module is as you have shown above in the first diagram.
D0 D1 D2 D3 D4 D5 D6 D7
G
F
E
D
C
B
A
DP

I have posted a video on Youtube that shows the difference between the Generic type and mine.

https://www.youtube.com/watch?v=hmz1eRPwyAs

You can  see mine is rotated 180 degree. The following video shows how the text scrolling (left) demo shows up on my design. The characters are inverted and scrolling towards right. Since my Din is on right side, I can't simply rotate it 180 degrees if I have to cascade it with other modules.

https://www.youtube.com/watch?v=JC3zTc4ZZuw

Please let me know if there is any quick fix in the software (like inverting font and scroll direction) for this without spending too much of your time. Otherwise, I will redesign the hardware.

Thank you very much for your help again.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on May 17, 2014, 06:27 am
DIn on the right side is good because the module on the right is module 0.

I am not clear what hardware you have selected in the scrolling video. Is it the generic module?

In the hardware test video, your columns are scanning from left to right (ie, col 0 is on the left), so that needs to be reversed with REV_COLS=1. Your rows are scanning from top to bottom, so the rows do not need to be reversed (REV_ROWS=0). I really can't see why that would not work...

Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: deanlure on May 17, 2014, 02:14 pm
Hi Marco,
I am using the same hardware as the Generic type uses but the display is rotated 180 degrees. That's why the text is inverted and scrolling right, when they are supposed to be scrolling left. In the first video, the first half shows the HW map for Generic one, and in the second half you can see for my hardware. I have also attached a picture that shows the difference between the Generic hardware and the one I am using.

Thanks.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: deanlure on May 17, 2014, 04:54 pm
Hi Marco,
The following video shows selecting the ICSTATION HW option.

#if USE_ICSTATION_HW   
#define   HW_DIG_ROWS   1
#define   HW_REV_ROWS   1
#define   HW_REV_COLS           1
#endif

https://www.youtube.com/watch?v=ZLlHmo0RFrU

This option would probably work if we could somehow rotate the font and shift function by 90 degrees anti-clockwise.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on May 17, 2014, 11:17 pm
Font can easily be rotated. Use Font builder for that.

The shift functions can be changed. There is a table in the source code that maps the request for a shift to an actual shift. Hardware remapping selects a different shift depending on the configuration. Have a go at that if your feel like it. At the moment I don't have time to go back to these libraries to make major changes.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Jul 03, 2014, 11:00 am
Came across these kits at ElectroDragon.com http://www.electrodragon.com/product/dot-matrix-chain-display-kit-max7219-v2/  (http://www.electrodragon.com/product/dot-matrix-chain-display-kit-max7219-v2/) that are compatible with the original hardware design.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: bperrybap on Jul 03, 2014, 05:39 pm
Very nice design. It's even a little lower cost than the icstation.
I really like the mounting holes.

Seeing this made me thing up a potential new feature request
if I were to get some of these.

Currently the code is conditionally compiled for a particular module.
I'm wondering if at some point users may want to mix devices at the same time?
Some libraries already allow configuring the orientation on each individual matrix/7219.

An alternative to that might be to allow it to be configured for each library object
which would allow mixing, but only within different "chains".

Either way it would mean shifting the decision from compile time to run time
which might be a slight performance hit.

--- bill

additional note:

The per library object would be nice for when different projects use different
versions of the h/w. Today, even if you don't mix/match h/w types on a project
you would have to edit the library header each time you switched between projects
that use different h/w.
Having the ability to specify the h/w type at the object level would at least
allow the sketch to specify the h/w vs the ifdefs in the library.



Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: nfsaisi on Jul 14, 2014, 03:44 am
Hi everyone  ..i'm new to the Aurduino Forum ,  concept and C++.

First i would like to introduce my self , i start by saying i'm not young any more , been in love with electronics since i was 16 , graduated a technical  high school at the breaking of the 80's major in electric, but always liked building simple electronic circuits from books  or magazines.
one of my big  projects was building  a large scale public size 4 digit led clock with temperature and 24hr format ,( i'm bringing  the clock back to modern age with Arduino (i hope ) in a different thread), at that time didn't know Micro Controllers  ,at late 80's i learned Basic when was the total PC speed 32 or 64 megs with a bulky external 51/4 floppy drive.
late 90's i got interested in Microchip PIC's  and bought a few books and learned to write assembly programs  but  i never mastered  the instructions.
then lost interest because of time consuming process involving the PCB cad design , etching , drilling and learning  programming which i had no time for all of that, as i have projects of other interests.

All this time and i was always interested in moving text on dot matrix displays ,
then one day a  relative of mine in the elevator development industry mentioned something about Arduino Concept and i got interested right the way , couldn't believe the amount of project and software are available on the web and i would like to take the opportunity to thank all individuals made the Arduino hardware and software available to everyone.
so basically i'm  more of a hardware guy , but C++ i'm in first grade day one.

i hope i did not make this reply boring , just wanted give an idea of my background

Now @ Marco  first you did a wonderful job here and i want to thank you,
i did some experimenting  with the Parola Lib  (by the way i downloaded the latest release) on a 8 Dot matrix  modals  the SMD type and i managed to switch the hardware selection in the MD_ MAX72xx.hex to make them work as i see there are 3 different type of setups.
OK i did go through all the thread and documents attached to the Parola  but because me not knowing the C++ i couldn't figure it out.
some of the examples compile OK but others give errors and i'm attaching an image for the Parola FONT example, also i want to bring an old /new reply for one of the persons you helped on this thread which also internist me and i would like to contribute to the Parola if i can , which is the Arabic Font ,
i did a font bit map editing  on a Arabic font utility and found a lot of mistakes on the drawing of the character on the 8x8  DOT Matrix.
but the problem that i have is displaying the font on the matrix  , i did follow all the comments in the thread , (i know that you made the font as a selection in the software but i couldn't figure out the routine .
so lets start step by step first can you explain the errors or how to fix them so i can get the sketch compiled and then we will talk about the Arabic font .

Thank you in advance for a grate project

Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Jul 14, 2014, 05:16 am
What is being reported as an error is something I thought was fixed some time ago, so can you check you have the latest version of FontBuilder and the library files?

Basically the problem is that in C++ is a line ends with '\' the compiler thinks that it continues on the next line.

Looks for a line that looks like this in the font .h file (in the libraries/MD_Parola folder)
Code: [Select]
5, 2, 4, 8, 16, 32, // 92 - \
and change it to this
Code: [Select]
5, 2, 4, 8, 16, 32, // 92 - '\'
By putting the character in single quotes it changes the special meaning of the character at the end of the line.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: nfsaisi on Jul 14, 2014, 08:46 am
Hi Marco   , thanks for replying

I'm positive the error is not in the  Parola_Fonts_Data.h , i checked it many time  Line  after line  and the \ is  like this '\'

i even  re downloaded the library's   MD_ MAX72xx is ver 2.4  &  MD_ Parola ver 2.0.

i still get the same 2 Errors. hop you can get to the bottom of it, thanks
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Jul 14, 2014, 09:58 am
I have tried to compile with the setup I have an cannot get the same result as you do.

The error is what it says it is - a stray \ somewhere.

Try the following:
1. Can you compile and run the MD_MAX72xx example MD_Test? If you can the problem is not in the MD_MAX library.
2. What examples in the Parola library can you compile and run?
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: nfsaisi on Jul 14, 2014, 12:30 pm
I tested   MD_MAX72xx and  all work.

i tested   MD_Parola  all work except for      Parola_ Fonts  and   Parola_Zone_ Timemsg.

Parola_Zone_TimeMsg  make few errors but the first one is " /dht11' doesn't name a type"  i don't know if its related to the Parola error or not but i saw that its #including Parola_Fonts_Data.h in the program.
and by the way i have the MD_DS1307 lib, but i didn't install  the time modal hardware.



I got it to work , the problem was in the first line of the program  , Parola_Fonts ,   it had a" '//  " at the beginning  i removed   the  "  '  " and now it compiled OK...    can you explain..!!! so i can learn.


I did some work on the Arabic Font , i noticed that your using  5x7  is that a preference or it makes  things easier  than 8x8,
anyway check the image that i attached  the Arduino in Arabic looks much better than the one that was chopped up i think i have to edit all the characters in the Font set but something have to be done first,   the blank column between the letters have to be removed and then i will adjust the letters to have the space in the font frame   look at the left 3 letters you will see what i mean. may be you can do some routine that will remove the blank column only when using Arabic Font ..just an idea.!

thanks

Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Jul 15, 2014, 02:30 am
Good that you got it working.

I downloaded the library from the Codeplex site and the '// that you saw is not in the download, so I have no explanation.

The inter character spacing can be adjusted by the method setChararacterSpacing(). It is fully under calling program control and is documented in the library html docs. 5x7 is not a limit and there are many characters defined that are bigger than this. The font builder can handle much bigger matrices.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: nfsaisi on Jul 15, 2014, 06:59 am
Hi , the reason i asked about the 5x7 Font  , because  the Arabic fonts in Font_data  file , if its not within the 5x7 frame  it will not show up the right way on the matrix and they will be wiping  them self's out.

I'm going to try to work on the blank column (space) following your direction with the ChararacterSpacing() call , i'm a Little rusty

even in machine language as i cant remember when was the last time i used Microchip IDE  , and i'm totally new to C++, wish me luck.

i'l be happy if i can accomplish a  hex print call for the Arabic Fonts and not necessary  to have the complex scripts of which character  joins another according to position in the word .by other words just like you used the different language  prints in the Parola Font Example. "\x0bc\x0b6\x0bd\x0e6\x090\x092\x088", but on the same time have the words look right on the Matrix.

Just for the knowledge : the basic principle of  Arabic Fonts are  like this , for example  : ?   pronounced close to    (B)  but in writing  it has three different positions in the Word : Beginning  , Middle and End  like  ??   b+a      ,  middle  ???  a+b+i   ,   ?   at the end like ??  A+b ,  ( which  in Arabic is the name of the month of August).

Thank you
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Jul 15, 2014, 09:55 am
I understand the complexity of the Arabic script and how the letters look different depending on where they are in a word. That is why, with no training and no feel for the language I did not want to even consider any automatic parsing of sentences for adjustment. I hope you can do a good job :)
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: nfsaisi on Jul 16, 2014, 08:15 pm
Hi, Marco 

I'v been going  through the rest of the examples of the PAROLA Lib  and have a question about the Parola_Zone_Time message.
I see no code for  setting  the DS1307  to the correct time and date  , can you give  some hints on how that can be done , since i didn't  do any other Arduino projects and really started on the Parola lib /MAX72xx  because of my previous experience with MC's.
i found the ds1307 article on the Arduino .cc site,  if that what i have to use ,where exactly in your code should the time setting be inserted, and i think the switch's have to be defined too ..right ? (if using external setting).

Have one general question about Arduino if you know the answer , just for my curiosity ,  Arduino is (from my understanding) an Italian concept and Made , what is the reason for using  the COCO islands to host the domain (according to Google search)  is it just a cost factor.!

thank you
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Jul 16, 2014, 08:24 pm
The DS1307 library has an example program where which uses the serial monitor to interact with the RTC. One of the functions is to set the current time and date.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: nfsaisi on Jul 16, 2014, 10:39 pm
Thanks for the reply,   all working good  , i cant believe this , i feel like i'v been programming all my life , what i'm talking about ...
it is the final moment when i finish the project and turn the power on and see everything as expected... what a feeling....
i'v been a prisoner to the  programming  capability for the longest time ... not any more ..when  you guys made it so easy  to just select choices in the program .

i did setup the time, date ,etc. changed to 12h time,  and also changed the date format to USA style    ( Month,Day,year).

All respect goes out to you and all the Arduino Team.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: nfsaisi on Jul 18, 2014, 12:44 am
Hi, Marco   

If the Clock in 12H mode, how can i blank the Hour  Digit if the clock is 1-9  ( example  instead of  06:30   to show  6:30).
i was thinking maybe shutting off the Hour digit  or load  blank to the Hour register. what would be the easiest  way.?

thanks

Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Jul 18, 2014, 12:23 pm
You want to keep the time string the same length so that the time does not jump around in the field. I would define a blank character the same width as zero then use that instead if the leading zero.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: confusered on Jul 23, 2014, 01:43 am
Thanks for the great library.  I am a novice and working had at learning.  I am working to combine and LED matrix and micro SD card into one program for a project.  Basically, a word is read from a text file on the SD card and displayed on the LED matrix.  I have both functions, reading a word from the SD card using the SDFAT library, and writing a word to the matrix using the Parola library working in separate programs.  When I try to combine them it does not work.

Hardware set up is an UNO with the matrix SPI leads connected at the pin 12, 13, header with pin 10 as CS.  The SD card is SPI also and connected to the pins on the ICSP header with pin 4 as CS.

I started combining the programs little by little.  It seems when I try to initiate the SD with sd.begin it all dies.  Each of these programs runs independently on the hardware setup without disconnecting any device.

I am not using the bit that waits for the serial input to start the card reading in the combined program and I am altering variable names as required.

I hope I'm just doing something silly wrong.  Are there any issues with SDFAT working with Parola? 

I will post the code for each program.  I'd appreciate any advise.  Thank you.
CARD READER
Code: [Select]
* SD card attached to SPI bus as follows:
** MOSI - pin 11
** MISO - pin 12
** CLK - pin 13
** CS - pin 4
*/
#include <SdFat.h>
#include <SdFatUtil.h>
SdFat sd;

SdFile myFile;
const int chipSelect = 4;
long index = 0;
char data2;
char data3;
char data4;
char data1;
String datastring;
long randNumber;

void setup() {
  Serial.begin(9600);
  while (!Serial) {}  // wait for Leonardo
  Serial.println("Type any character to start");
  while (Serial.read() <= 0) {}
  delay(400);  // catch Due reset problem
 
  // Initialize SdFat or print a detailed error message and halt
  // Use half speed like the native library.
  // change to SPI_FULL_SPEED for more performance.
sd.begin(chipSelect, SPI_FULL_SPEED); //NO TEST HERE
}
void loop() {

  myFile.open("words.txt", O_READ);  //Open the file for reading

    randNumber = random(3539);    // Pic a random number from 0 to the word count
    index = (randNumber * 4);    // goes to the first letter of the randonm word
    myFile.seekSet(index);  // go to position
    data1 = myFile.read();   // read the letter
       
    myFile.seekSet(index + 1);  //get the next letter
    data2 = myFile.read();
   
    myFile.seekSet(index + 2);  //get the next letter
    data3 = myFile.read();
   
    myFile.seekSet(index + 3);  //get the next letter
    data4 = myFile.read();
                                //Build a string of all the letter data characters
    String datastring = String(data1) + String(data2) + String(data3) + String(data4);
    Serial.print("String = ");
    Serial.println(datastring);  // Print the string to serial
   
    Serial.println();  //print a line feed to serial
    delay(500);
   myFile.close();
}


MATRIX DISPLAY
Code: [Select]
//Converts string to char array for display on matrix
#include <MD_Parola.h>
#include <MD_MAX72xx.h>

// Define the number of devices we have in the chain and the hardware interface
// NOTE: These pin numbers will probably not work with your hardware and may
// need to be adapted
#define MAX_DEVICES 4
#define CLK_PIN 13
#define DATA_PIN 12
#define CS_PIN 10
// Generic output pins
MD_Parola P = MD_Parola(DATA_PIN, CLK_PIN, CS_PIN, MAX_DEVICES);

#define SPEED_TIME 25
#define PAUSE_TIME 2000

String string1 = "TEST";
char datastring[10];

void setup(void)
{
  P.begin();    //starts parola
  P.setInvert(false);    //for red on white - not white on red
  //string1.toCharArray(datastring, 10);
  P.displayText(datastring, CENTER, SPEED_TIME, PAUSE_TIME, SCROLL_LEFT, SCROLL_RIGHT);
}    //writes to the display  **Why is this in setup?

void loop(void)
{
  string1.toCharArray(datastring, 10);
  if (P.displayAnimate()) // animates and returns true when an animation is completed
  {
    P.displayReset();
    delay(1000);
  }
}
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Jul 23, 2014, 02:10 pm
Do you have enough RAM to run both of these? On an Uno there is about 2k or RAM for stack and heap storage. The SD card buffer will already take up about 512 bytes. There is a function that you can add to your programs to display the amount of free RAM (search for it, I forget the name at this stage). Do each program separately and add it up. The actual total will be a little less than the sum of the two because of common elements that will only be counted once when combined, but you should get an impression if this is a problem.

If this is not the case, then you will need to be specific about what 'dies' when sd.begin() is called.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: confusered on Jul 24, 2014, 12:38 am
Thank you for the reply an for teaching me about RAM checking.  I used MemoryFree.h
The matrix program indicates 1647 free memory, and the SD program indicates 1040 free memory.

I will attach the code from my combined program.  When I run it, the serial monitor shows me freeMemory = 909, and words are properly being fetched from the SD card. 

The matrix display does not act correctly.  Typically, the right most unit (1) will be entirely lit, unit 2 is entirely unlit, unit 3 will contain several lit LEDs or change to entirely lit then back to several lit.  Unit 4 will occasionally show some lit LEDs at a lower intensity.  Minor changes occur but not very rapidly.  The words or anything like them is never displayed.

If I comment out the line sd.begin(chipSelect, SPI_FULL_SPEED); the word TEST is properly displayed on the matrix.   The serial monitor still shows freeMemory = 909 and the string displayed if 4Y's with dots over them.

Thanks again.

COMBINED CODE
Code: [Select]
#include <MemoryFree.h>
#include <MD_Parola.h>
#include <MD_MAX72xx.h>

#define MAX_DEVICES 4
#define CLK_PIN 13
#define DATA_PIN 12
#define CS_PIN 10

// Generic output pins
MD_Parola P = MD_Parola(DATA_PIN, CLK_PIN, CS_PIN, MAX_DEVICES);

#define SPEED_TIME 25
#define PAUSE_TIME 2000

String string1 = "TEST";
char datastring[10];
///////////////////////////////////////////////////////////from SD VVVV
#include <SdFat.h>
#include <SdFatUtil.h>
SdFat sd;

SdFile myFile;
const int chipSelect = 4;
long index = 0;
char data2;
char data3;
char data4;
char data1;
long randNumber;
////////////////////////////////////////////////////////////from SD ^^^^

void setup(void)
{
///////////////////////////////////////////////////////////from SD VVVV
//sd.begin(chipSelect, SPI_FULL_SPEED);
  Serial.begin(9600);
////////////////////////////////////////////////////////////from SD ^^^^

  P.begin();    //starts parola
  P.setInvert(false);    //for red on white - not white on red
  P.displayText(datastring, CENTER, SPEED_TIME, PAUSE_TIME, SCROLL_LEFT, SCROLL_LEFT);
}    //writes to the display 

void loop(void)
{
 
  if (P.displayAnimate()) // animates and returns true when an animation is completed
  {
    getword();
    string1.toCharArray(datastring, 10);
    P.displayReset();
    delay(1000);
  }
}

void getword() {

  myFile.open("words.txt", O_READ);  //Open the file for reading

    randNumber = random(3539);    // Pic a random number from 0 to the word count
    index = (randNumber * 4);    // goes to the first letter of the randonm word
    myFile.seekSet(index);  // go to position
    data1 = myFile.read();   // read the letter
       
    myFile.seekSet(index + 1);  //get the next letter
    data2 = myFile.read();
   
    myFile.seekSet(index + 2);  //get the next letter
    data3 = myFile.read();
   
    myFile.seekSet(index + 3);  //get the next letter
    data4 = myFile.read();
                                //Build a string of all the letter data characters
    String string1 = String(data1) + String(data2) + String(data3) + String(data4);
    Serial.print("String = ");
    Serial.println(string1);  // Print the string to serial
   
    Serial.println();  //print a line feed to serial
    delay(500);
   myFile.close();
   
    Serial.print("freeMemory()=");
    Serial.println(freeMemory());
}
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Jul 24, 2014, 05:23 am
Try changing the CS pin to a free pin that is not 10 in the Parola initialiser.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: confusered on Jul 24, 2014, 10:58 pm
Thanks again.

I tried several different pins for CS in the Parola initialiser.  All with the same problem as before.

I did notice one unexpected operation.  Whenever I start the serial monitor to see if the SD card is being read, the same word is displayed each time I start it.  I realize the random function is pseudo random and the cycle of words read will repeat, but I expect to see a different word each time I start the serial monitor.  It's almost as if starting the serial monitor is starting the SD card reading piece of the program.  This happens even if I'm running the original uncombined CARD READER program by itself.

Coincidentally, the first word from my file is always "SAME".....  This chip is a real joker. 
Title: Re: Scrolling LED matrix display Rotate hardware
Post by: nikomaz on Jul 24, 2014, 11:43 pm
Hi Marco! I've been reading all the post and coments and i cant solve my problem with the orientation of my matrix.
I have 5 8x8 matrix, I made the matrixs and the modules with max7219. But when i connect and load the code, the words appears rotated 90°. So is scrolling down one by one matrix. I now that the orientation is the incorrect, but i already make the matrix that way and i cant make another or fix it (320 5mm leds, solder one by one ._.)
Is there a way I can rotate the scrolling 90°?
Regards!
PD: Sorry my english, im spanish.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: nfsaisi on Jul 25, 2014, 03:08 am
Hi, everyone  ...Marco  if you don't mind  i would like to help nikomaz  .

@nikomaz  
Open the MD_MAX72xx folder and then open MD_MAX72xx.h (use notepad)  scroll down to the lines where i'm going to show you in my attachment and change the 0 to 1 at the bottom and 1 to 0 at the top  if I'm getting you confused just copy from my file. then save file and exit.
I'm assuming you have a setup similar to the ICStation boards (the one with SMD chip on the back and use jumpers to attach them together) you probably wired your matrix leds the same way if not use the generic hardware switch which is in the same file but you have to change the upper and lower lines to 0 and the middle to 1,  Hope it works.
if not post a schematic of your Matrix.

after you done run the Parola examples you may  have to flip the whole display 180.  if your wires on the left side.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: nfsaisi on Jul 25, 2014, 03:28 am
Hi   Marco  i just wanted to share what i did  with the Time zone display ,

i was working on writing some kind of control if the hours are 9 or less to only show 1 digit for the Hours, while i'm trying  i found out that if i only change this line,  sprintf(psz, "%02d%c%02d", RTC.h, (f ? ':' : ' '), RTC.m); to sprintf(psz, "%01d%c%02d", RTC.h, (f ? ':' : ' '), RTC.m);
the display will work exactly like i want, single digit hour when 9 or less and two digits when 10 - 12 . simple but works !!!.

The second thing i wanted to ask about  is the DS_1307 serial time adjusting  program , it keeps giving wrong times  and some times not responding , is it written so only the time can be adjusted in 24h mode and then i cans witch to 12h mode.
because  if its in 12H mode  it will not accept the time_date string and gives back (bad (t)) or it will run along line of rubbish characters.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Jul 25, 2014, 09:42 am
Hola nikomaz!

The orientation of the matrix can be adjusted in the software, but you need to do it in the MD_MAX72xx library. What to do is described in the documentation for the library. You will need to set some compile time switches to make it work - afsaisi has already told you a bit but exactly what you need to do will depend on how your matrix is wired up.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Jul 25, 2014, 09:48 am
Quote
i was working on writing some kind of control if the hours are 9 or less to only show 1 digit for the Hours, while i'm trying  i found out that if i only change this line,  sprintf(psz, "%02d%c%02d", RTC.h, (f ? ':' : ' '), RTC.m); to sprintf(psz, "%01d%c%02d", RTC.h, (f ? ':' : ' '), RTC.m); the display will work exactly like i want, single digit hour when 9 or less and two digits when 10 - 12 . simple but works !!!.


A personal preference comes into play for me. This will work well if the date is just scrolled across the screen, but if you are putting the date in a particular field, it will be a different width and will step jump across when the hours change from one digit to two. This is not the behaviour users expect from a clock, as they are used to seeing the digits remain in the same place.

Quote
The second thing i wanted to ask about  is the DS_1307 serial time adjusting  program , it keeps giving wrong times  and some times not responding , is it written so only the time can be adjusted in 24h mode and then i cans witch to 12h mode.
because  if its in 12H mode  it will not accept the time_date string and gives back (bad (t)) or it will run along line of rubbish characters.


Yes. It is just meant to be a utility to get around the issue of setting time accurately. I can live with this.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Jul 25, 2014, 01:09 pm
@confusered

It took a while but the answer is obvious (finally!). The pins you are selecting for the creation of the Parola object are the same pins that are defined for native-SPI hardware control. If you use the type of constructor you did, it defaults to non-native control (using these same pins). SDFat uses the same pins but with hardware controls. This overrides the non-native SPI and a mess results for the display.

Changing the constructor so that only the CS pin is defined works. This is the code that works on my system. I have left all the debug code in and you will see it has a slightly different structure. I believe that the implementation of String is buggy, so it is best to avoid it.

Code: [Select]
#include <MemoryFree.h>
#include <MD_Parola.h>
#include <MD_MAX72xx.h>

#define  USE_SDFAT  1

#define MAX_DEVICES 4
#define CLK_PIN 13
#define DATA_PIN 12
#define CS_PIN 10

// Generic output pins
MD_Parola P = MD_Parola(CS_PIN, MAX_DEVICES);

#define SPEED_TIME 25
#define PAUSE_TIME 2000

char newstring[10] = "1234";
char datastring[10]  = "abcd";

#if  USE_SDFAT
#include <SdFat.h>
SdFat sd;

const int chipSelect = 4;
long index = 0;
#endif

void setup(void)
{
#if  USE_SDFAT
 sd.begin(chipSelect, SPI_FULL_SPEED);
#endif

 P.begin();    //starts parola
//  P.displayScroll(datastring, LEFT, SCROLL_LEFT, SPEED_TIME);
 P.displayText(datastring, CENTER, SPEED_TIME, PAUSE_TIME, SCROLL_LEFT, SCROLL_LEFT);

 Serial.begin(57600);
 Serial.println(F("[SDwithParola]"));
 Serial.print(F("freeMemory()="));
 Serial.println(freeMemory());
}

void loop(void)
{
 if (P.displayAnimate()) // animates and returns true when an animation is completed
 {
   getword();
   strcpy(datastring, newstring);
   Serial.print(F("datastring = "));
   Serial.println(datastring);
   Serial.println();
   P.displayReset();
 }
}

void getword()
{
#if  USE_SDFAT
 SdFile myFile;
 long index;
 
 if (!myFile.open("WORDS.TXT", O_READ))  //Open the file for reading
 {
   strcpy(newstring, "Error");
 }
 else
 {
   index = random(100) * 4;   // offset of a random number from 0 to the word count
   Serial.println(index);
   myFile.seekSet(index);      // go to position
   myFile.read(newstring, 4);  // read the word
   newstring[4] = '\0';
 }

 Serial.print(F("newstring  = "));
 Serial.println(newstring);  // Print the string to serial
 myFile.close();
#endif
}
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: nikomaz on Jul 25, 2014, 11:56 pm

Hi, everyone  ...Marco  if you don't mind  i would like to help nikomaz  .

@nikomaz  
Open the MD_MAX72xx folder and then open MD_MAX72xx.h (use notepad)  scroll down to the lines where i'm going to show you in my attachment and change the 0 to 1 at the bottom and 1 to 0 at the top  if I'm getting you confused just copy from my file. then save file and exit.
I'm assuming you have a setup similar to the ICStation boards (the one with SMD chip on the back and use jumpers to attach them together) you probably wired your matrix leds the same way if not use the generic hardware switch which is in the same file but you have to change the upper and lower lines to 0 and the middle to 1,  Hope it works.
if not post a schematic of your Matrix.

after you done run the Parola examples you may  have to flip the whole display 180.  if your wires on the left side.


Yeap, i know that, I already change that values trying the 3 boards. But only Gereric works but in 90°, ICStation and Parola didn't show anything.



Hola nikomaz!

The orientation of the matrix can be adjusted in the software, but you need to do it in the MD_MAX72xx library. What to do is described in the documentation for the library. You will need to set some compile time switches to make it work - afsaisi has already told you a bit but exactly what you need to do will depend on how your matrix is wired up.


What values do I change? In documentation cant find something about it, only found the modules, but only generic works. So i need to change rows for colums i think. The matrix display is wired anodes in colums to SEG and cathodes in rows to DIG.

I can change the wires DIG and SEG but cant modify the display wired. (anodes colums, cathodes rows)
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Jul 25, 2014, 11:59 pm
Look in the _lib header file. Each of the specifics is converted to a series of other transformations.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: nikomaz on Jul 26, 2014, 03:37 am

Look in the _lib header file. Each of the specifics is converted to a series of other transformations.


Thank you Marco! it worked!!! en the _lib header in fact I fix the problem.
Regards
Long live Parola!
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: confusered on Jul 27, 2014, 04:34 pm
I appreciate all your help and I am learning a lot.

I tried your soltion with no success.  I am a bit confused about the use of generic hardware, and the use of the constructor, and the use of USE_GENERIC_HW in the MD_MAX72xx.h file.

The examples show

Code: [Select]
// Hardware SPI connection
MD_Parola P = MD_Parola(CS_PIN, MAX_DEVICES);
// Generic output pins
// MD_Parola P = MD_Parola(DATA_PIN, CLK_PIN, CS_PIN, MAX_DEVICES);
//
I took this to mean if you are using the generic hardware devices, you needed to use the generic output pins constructor.  Now i'm starting to think the above comments apply only to SPI pins.

I set my MD_MAX72xx.h file to "#define   USE_GENERIC_HW   1" and the other two choices to 0.

Using my first posted code where I use Parola to display the word TEXT only, All works well with the constructor:

Code: [Select]
#define MAX_DEVICES 4
#define CLK_PIN 13
#define DATA_PIN 12
#define CS_PIN 10
// Generic output pins
MD_Parola P = MD_Parola(DATA_PIN, CLK_PIN, CS_PIN, MAX_DEVICES);


In the same example, If I use the constructor with DATA_PIN and CLK_PIN removed, It will not work.  (display is jumbled and static or all on).

I must be missing something.  I'm using the generic eBay displays since I had them already.  I can get some different ones if that's what it takes.  I really want to get this working.  I did order some a couple weeks back that look like the ICSTATION ones. (about 4 weeks delivery to my location)

Can you tell me which HW setup you have this working on and how you have the USE_x_HW switches set in the MD_MAX72xx.h file.

Thanks again
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Jul 27, 2014, 09:40 pm
The USE_HW is used to select the type of hardware module that you have got.

Irrespective of the hardware, the interface to the hardware is the same (SPI). SPI can be implemented in software or you can use the CPU supported hardware implementation. If you specify all the pins, then the library will assume that you are implementing the software version of SPI. If you only specify the CS pin then it defaults to the hardware implementation, where the pins are set by the type of hardware CPU you use.

All of this is in the MD_MAX72xx library documentation.

My setup is for an Arduino Uno and I use the Parola module.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: confusered on Jul 30, 2014, 01:45 am
Thank you Marco,

Still having trouble and don't want to be a pain, but I thought I'd provide the current situation.  Using your example code above with Uno and now ICSTATION displays, I get the following results.  I added in the line for defining generic SPI pins as part of the experiment.  I understand the display choice is independent of the SPI setup.  It appears we are using similar hardware but getting different results.  Since each function (SD and Matrix display) are working under at least one condition, I assume the hardware is all connected up correctly.  It seems mine just does not want to work using the hardware SPI.

Conditions:

"USE_SDFAT 0" & "MD_Parola P = MD_Parola(DATA_PIN, CLK_PIN, CS_PIN, MAX_DEVICES);" = Matrix display WORKING

"USE_SDFAT 0" & "MD_Parola P = MD_Parola(CS_PIN, MAX_DEVICES);" = Matrix display NOT working

"USE_SDFAT 1" & "MD_Parola P = MD_Parola(DATA_PIN, CLK_PIN, CS_PIN, MAX_DEVICES);" = Matrix display NOT working, SD working

"USE_SDFAT 1" & "MD_Parola P = MD_Parola(CS_PIN, MAX_DEVICES);" = Matrix display NOT working, SD working

I am using the following versions downloaded on July 19.
MD_MAX72xx_v2.4_20140406
MD_Parola_v2.0_20140329
and
Arduino 1.0.5-r2
sdfatlib20131225

Thanks and G'day from Virginia USA
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: OSComputing on Jul 30, 2014, 08:39 am
I'm just jumping in right here with my questions about Parola 2.0. I've made a lot of cool little signs with 6 and 8 matrices using Parola 1, they've turned out so cool.  8)

Now I'm hitting a brick wall with 2. I've setup a little test piece: basic ebay 2 max7219 matrix boards wired together with a potentiometer to vary speed. This little setup works perfectly for all my testing with Parola v1. The code I typically use is a variation of Parola_Display. I've made several signs with it and have just added to the curText because that's really all I know how to code  :)!

My problem is this: To setup Parola 2, I remove the folders with the old libraries Max7219 and Parola out of my libraries subfolder. They are called MD_MAX72xx and MD_Parola. I have the two zip files, MD_MAX72xx_v2.4_20140406.zip & MD_MAX72xx_v2.4_20140406.zip. I uncrunch them and copy those folders to the same libraries folder. I run the Arduino IDE for Windows, load an example, change the data pins to how mine is setup, compile and upload, get a normal ending and all I get is all solid lights on all matrices. Some of the example don't compile because I haven't put the keys library in yet.

#define MAX_DEVICES 2
#define CLK_PIN 10
#define CS_PIN        9
#define DATA_PIN 8
&
#define SPEED_IN A0 (A5 in examples)
this is all I change.

Then I reverse the whole thing, put back the old libraries, compile and upload the old program and everything works again.  

Doing the same on Linux (Ubuntu 12 LTS) does exactly the same thing.   :~

Recently upgrading from Ubuntu 12 to 14 has completely destroyed my Arduino IDE because of some strange avrdude bug-this is another issue altogether.

Could my hardware be a problem? Doesn't like 2.0? Am I not getting how to install the new libraries? Head is really hurting.
Thanks for hearing me out!
Richard


UPDATE! 6/14/2015
Parola v2.2 & Max72XX LED Matrix Display Library v2.7 have solved my problems.
These version run perfectly.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Jul 30, 2014, 09:54 am
@confusered

Can you try to test using different SPI pins for the sd and display?
Also, is that the latest version of sdfat? Not near my computer at the moment...

Edit: SDFAT is the same version as mine.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Jul 30, 2014, 12:08 pm
@oscomputing

I have sent you a new version of the library to try. There were a couple of bugs in V2 that have been corrected and this is pre release.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: confusered on Jul 31, 2014, 12:18 am
Marco,  Here are some more test conditions with various CS pins.  Display still never works with hardware SPI.

Conditions 7/30/14
"USE_SDFAT 0" & "MD_Parola P = MD_Parola(DATA_PIN, CLK_PIN, CS_PIN = 10, MAX_DEVICES);" = Matrix display WORKING

"USE_SDFAT 0" & "MD_Parola P = MD_Parola(DATA_PIN, CLK_PIN, CS_PIN = 8, MAX_DEVICES);" = Matrix display WORKING

"USE_SDFAT 0" & "MD_Parola P = MD_Parola(DATA_PIN, CLK_PIN, CS_PIN = 9, MAX_DEVICES);" = Matrix display WORKING

"USE_SDFAT 0" & "MD_Parola P = MD_Parola(CS_PIN = 10, MAX_DEVICES);" = Matrix display NOT working

"USE_SDFAT 0" & "MD_Parola P = MD_Parola(CS_PIN = 8, MAX_DEVICES);" = Matrix display NOT working

"USE_SDFAT 0" & "MD_Parola P = MD_Parola(CS_PIN = 9, MAX_DEVICES);" = Matrix display NOT working

"USE_SDFAT 1" & "MD_Parola P = MD_Parola(CS_PIN = 10, MAX_DEVICES);" = Matrix display NOT working, SD Working w/ CS = 4

"USE_SDFAT 1" & "MD_Parola P = MD_Parola(CS_PIN = 10, MAX_DEVICES);" = Matrix display NOT working, SD Working w/CS = 5

"USE_SDFAT 1" & "MD_Parola P = MD_Parola(CS_PIN = 9, MAX_DEVICES);" = Matrix display NOT working, SD Working w/CS = 5

"USE_SDFAT 1" & "MD_Parola P = MD_Parola(CS_PIN = 8, MAX_DEVICES);" = Matrix display NOT working, SD Working w/CS = 5

"USE_SDFAT 1" & "MD_Parola P = MD_Parola(CS_PIN = 5, MAX_DEVICES);" = Matrix display NOT working, SD Working w/CS = 4

"USE_SDFAT 1" & "MD_Parola P = MD_Parola(CS_PIN = 5, MAX_DEVICES);" = Matrix display NOT working, SD NOT Working w/CS = 1

"USE_SDFAT 1" & "MD_Parola P = MD_Parola(CS_PIN = 5, MAX_DEVICES);" = Matrix display NOT working, SD  Working w/CS = 2

"USE_SDFAT 1" & "MD_Parola P = MD_Parola(DATA_PIN, CLK_PIN, CS_PIN = 5, MAX_DEVICES);" = Matrix display NOT working, SD working W/CS = 2

Thanks again.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Jul 31, 2014, 03:10 am
Sorry, I was not clear. I meant use DATA and CLK pins different from the hardware pins, to avoid any contention issues. With the two different data streams, if the displays still don't work with just software SPI, then you are looking at a fundamentally different problem to chase down.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: confusered on Aug 01, 2014, 01:06 am
Thank you Marco.  I just tried the following setup and the display works and SD card does not.  I can now see the "Error" message on the matrix display.

USE_SDFAT  1 or 0 w/CS = 10 or 7  &  MD_Parola P = MD_Parola(DATA_PIN = 8, CLK_PIN = 9, CS_PIN = 5, MAX_DEVICES);


Regards,
Title: Re: Scrolling LED matrix display - Parola and MD_MAX examples won't compile
Post by: aeonlakes on Sep 14, 2014, 01:50 am
Hi,

I'm a total newb with Arduino, so forgive me if I've done something stupid ...  :smiley-red:

I want to build a weather station for home and learn some electronics and coding skills in the process. I have no skills in that area other than learning some BASIC at school (so that dates me) and being a competent MacOS user. So I have a long way to go ...

I have bought a UNO board and a bunch of sensors and actuators (bought cheaply in bulk from a Chinese website, so no documentation) and I'm currently working through finding code and instructions to make them all work so I can learn by experimenting. So far no major problems, until I tried to use a row of generic MAX7219 and 8x8 LED arrays with Parola.

I have a row of 5 of the generic panels wired up appropriately. I have installed the Parola 2.0 and MD_MAX72xx libraries and I've altered the code in the MD_MAX72xx.h file to:

Code: [Select]
/**
\def USE_PAROLA_HW
Set to 1 (default) to use the Parola hardware modules. The
software was originally designed to operate with this hardware type.
*/
#define USE_PAROLA_HW 0

/**
\def USE_GENERIC_HW
Set to 1 to use 'generic' hardware modules commonly available, with
connectors at the top and bottom of the PCB, available from many sources.
*/
#define USE_GENERIC_HW 1


..to account for my generic panels, but when I try to run any of the examples, they refuse to compile with this error:

Code: [Select]
Arduino: 1.5.7 (Mac OS X), Board: "Arduino Uno"

Build options changed, rebuilding all
In file included from /Users/andrew/Documents/Arduino/libraries/MD_MAX72xx/MD_MAX72xx_font.cpp:25:0:
/Users/andrew/Documents/Arduino/libraries/MD_MAX72xx/MD_MAX72xx_font.cpp:132:24: error: variable '_sysfont_var' must be const in order to be put into read-only section by means of '__attribute__((progmem))'
uint8_t _sysfont_var[] PROGMEM =
                        ^



What am I doing wrong?  There are no hardware issues -- the Adafruit PanelMaster and GLX examples run and display normally, but those libraries don't look as comprehensive as Parola. :~

Thank you

Andrew
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Sep 14, 2014, 03:06 am
It should all work. What is being pointed to as an error is legal syntax as far as I know (It works on Windows for sure).

1. The hardware setting should be correct, but does it compile with no errors if you select something other than the GENERIC_HW? Should make no difference but worth checking.

2. From the Arduino website:

Quote
Note that because PROGMEM is a variable modifier, there is no hard and fast rule about where it should go, so the Arduino compiler accepts all of the definitions below, which are also synonymous. However experiments have indicated that, in various versions of Arduino (having to do with GCC version), PROGMEM may work in one location and not in another. The "string table" example below has been tested to work with Arduino 13. Earlier versions of the IDE may work better if PROGMEM is included after the variable name.

dataType variableName[] PROGMEM = {};   // use this form
dataType PROGMEM variableName[] = {};   // not this one
PROGMEM  dataType  variableName[] = {}; // use this form


Maybe try changing the position of the PROGMEM modifier to see if this removes the error.  Let me know if this works as it probably means that I need to change the definition in the next release.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: bperrybap on Sep 14, 2014, 05:00 am
marco,
Go get the latest IDE. and you will see the issue.
The AVR progmem stuff has changed.
The older compiler was a bit loose on what it allowed.
(It allowed improper usages).
The new compiler is much more strict and so you must declare progmem
references properly.
This is affecting many libraries.
The references on the Arduino page for the AVR progmem stuff is wrong
and should not be used as a model.

All progmem declarations need to be const.

--- bill

Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: aeonlakes on Sep 14, 2014, 05:17 am
Marco, I can confirm that it is an issue with the IDE as Bill suggests.

I tried the syntax changes you suggested and it made no difference when using MacOS IDE 1.5.7b or the nightly build. But when I dropped back to IDE 1.0.5 it compiled just fine. Which is a bit of a shame because while my Robotale Uno R3 board is OK with 1.0.5, I also have a temperamental Makerduino Uno that just won't talk to 1.0.5 ...

Now I have other problems, but there's plenty of documentation so I'll try and fix them on my own first.

Thank you both for the quick replies.

Andrew
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: bperrybap on Sep 14, 2014, 05:36 am

I tried the syntax changes you suggested and it made no difference when using MacOS IDE 1.5.7b or the nightly build

Which changes?
When the PROGMEM declarations are all corrected it will compile.
There are several.
You must correct the _sysfont_var[] declarations in MD_MAX72xx_lib.h and MD_MAX72xx_font.cpp
as well as the fontType_t typedef in MD_MAX72xx.h

marco, there are also some other examples that don't compile.
The best thing will be to go get the 1.5.7 IDE, which uses the newer gcc compiler
and then compile all the examples with verbose enabled.

--- bill
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Sep 14, 2014, 09:16 am
The IDE v1.5.7 PROGMEM issue has been fixed in both MD_MAX72xx and MD_Parola libraries. It should still work for IDE 1.0.5, but I have not tested this.

Code is uploaded to the Source Code section of the Codeplex website (ie, where the files are listed individually). The Downloads section contains the last official release as a zip file and will be updated with these changes at the next full release.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: bperrybap on Sep 14, 2014, 10:54 am
marco,
There are some other errors in the examples, like Parola_Test  doesn't compile.
It is looking for MD_KeySswitch.h which doesn't seem to exist.

Also looks like is are some kind of issue with Parola_Fonts.ino
That one is REALLY strange.
Here is the error where things start to go down hill (there are many more errors
but these are the issue:)
Code: [Select]
Parola_Fonts.ino:1:1: error: stray '\' in program
Parola_Fonts.ino:1:2: error: 'ufeff' does not name a type


And now here is the top of the .ccp file the IDE created from your .ino file:
Code: [Select]
#line 1 "Parola_Fonts.ino"
#include "Arduino.h"
void setup(void);
void loop(void);
#line 1
\ufeff
#include <MD_Parola.h>
#include <MD_MAX72xx.h>

#include "Parola_Fonts_data.h"


If I look at the hex dump of the .ino file it looks like there is some kind
of extended character (utf8 perhaps) that is in the source module right at the
beginning of the file.
I can't see anything in my editors nor can I remove it.
Here is a hex dump from the first part of the .ino file:
Code: [Select]
00000000  ef bb bf 2f 2f 20 50 72  6f 67 72 61 6d 20 74 6f  |...// Program to|
00000010  20 65 78 65 72 63 69 73  65 20 74 68 65 20 4d 44  | exercise the MD|
00000020  5f 50 61 72 6f 6c 61 20  6c 69 62 72 61 72 79 0a  |_Parola library.|
00000030  0a 23 69 6e 63 6c 75 64  65 20 3c 4d 44 5f 50 61  |.#include <MD_Pa|





--- bill
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Sep 14, 2014, 11:43 am
Hmmm. It all worked compile and tested here before I put it on  the Git server.  Could it be something to do with the upload?

No longer at the computer, so will need to get to it later.

Keyswitch is a library on the repository. I assuming the double s is a typo?
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: trogalko on Sep 15, 2014, 04:28 am
Hi Marco,
Great library, I have tested it, and its works on Teensy 3.1 with soft mode SPI
For those who have error about MD_KeySwitch doesn't exist, You shoud download it first, rename the zip as, i.e. : MD_keyswitch.zip, then add to the library.
The link for MD_KeySwitch library is here : http://arduinocode.codeplex.com/downloads/get/816718 (http://arduinocode.codeplex.com/downloads/get/816718)
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: Piethon on Sep 18, 2014, 01:36 am
First - thank you so much, Parola is awesome! I have been able to get it to work with one 8x8 LED matrix (http://www.amazon.com/Sunkee-MAX7219-control-Display-Arduino/dp/B00AYAPB9Q).  It was so fun I ordered three more, so I can have 4 of them.

I am not quite sure how to hook up two, but following the directions here (http://www.instructables.com/id/Multiple-LED-Matrixes-with-Arduino/?ALLSTEPS) I have been able to get 3 matrices to light up.  (Note, I am using the Parola example, "Parola_Scrolling", not the code from that tutorial - I only referenced that for how to link them). ...except, the text is 'upside down'. 

I have attached a picture so you can see what I mean - is there a way via the code to 'flip' it?  I know I could re-wire the whole thing, but I was curious (and to learn) if there's a way to just flip the text over (mirror it?). 

Thanks so much for any advice/help!
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Sep 18, 2014, 07:28 am
Hardware type is done through changing the MD_MAX72xx library to suit. Your modules are the generic ones. Read the doc that come with the lib.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: Piethon on Sep 19, 2014, 12:39 am

Hardware type is we through changing the MD_MAX72xx library to suit. Your modules are the generic ones. Read the doc tha come with the lib.


I looked through it, but I'm new to Arduino - especially libraries and .h files.  What would I be looking for? From what I am understanding, I need to edit something in the MD_MAX72xx_lib.h file?  Searching for "generic" I see that I need to put the MAX7219 on the top....but is there no way to flip the letters via the code (instead of a hardware flip)?

Since I have a generic one, I am now using the GENERIC code:

Code: [Select]

// HARDWARE SPI
//MD_Parola P = MD_Parola(CS_PIN, MAX_DEVICES);
// GENERIC SPI
MD_Parola P = MD_Parola(DATA_PIN, CLK_PIN, CS_PIN, MAX_DEVICES);

...but that's just editing the Parola_Scrolling.ino , not a library edit.

I also checked the MD_MAX72xx.h and it's set to:
Code: [Select]
\def USE_GENERIC_HW
Set to 1 to use 'generic' hardware modules commonly available, with
connectors at the top and bottom of the PCB, available from many sources.
*/
#define USE_GENERIC_HW 1


So basically, it doesn't seem there is a way to just flip/mirror the text. I need to actually flip the LEDs on the breadboard?

If you can code/program it, what would I be looking for?  :smiley-red:

Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: wabbitguy on Sep 19, 2014, 05:10 pm
Your displays look like the standard ones off eBay, but it looks like the displays are upside down. The wiring for Parola feeds from the right most display, to the left. Not left to right like we normally read.

This is how I use my eBay ones. From the Arduino to the extreme right hand display. Then daisy chain the remaining ones to it.

(http://www.wabbitwanch.net/sgphotos/eBay_LED_Matrix.png)

I soldered pins that go straight out the back of the displays.

I also bought some different ones off eBay that designed to be wired together with jumper pins because the board pins align with each other. However with the LED libraries I couldn't use them that way so I just rotated them and used wired jumpers. The blue matrix ones are significantly smaller PCB's than the previous set and again are wired right to left as well:

(http://www.wabbitwanch.net/sgphotos/LED_Matrix.png)
(http://www.wabbitwanch.net/sgphotos/LED_Matrix_Rear.png)

So just flip that whole breadboard upside down and you're good to go... :D

Mel
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Sep 19, 2014, 10:13 pm
Wabbit guy has covered the obvious - flip the matrices over.

Generic matrices does not mean that you have to use the 'generic' SPI interface - you can use the hardware SPI and I would encourage that as it is much faster. The hardware setting USE_GENERIC_HW is the right setting to use.

The documentation I referred to is in the doc\html folder (open index.html). The extract that is relevant for you is
Quote

Module Interconnections
-----------------------
Generic modules need to be oriented with the MAX7219 IC at the top and connected using
short patch cables in a spiral pattern. The display is oriented with the IC at the top.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: Piethon on Sep 20, 2014, 10:05 pm
Thanks to WabbitGuy and Marco_c for your help!  I went ahead and flipped them over and it works wonderfully.  :smiley-mr-green:

I will also probably take WabbitGuy's idea of soldering and do that in the future.

But, just for knowledge, it looks like trying to 'invert' the text via the code would be WAY much more trouble than just flipping the LEDs, yeah? (In other words, it's not just I would do something like make a variable negative to flip the text...it would be more of a rewriting the library?)

Anyways, thanks again, and thanks a TON for Parola, it's awesome.  XD
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: Piethon on Sep 21, 2014, 07:01 am
An additional question -

I am trying to get a distance, as read from the PING Ultrasonic distance sensor, to be sent to the LCDs.  However, I can't figure out how to get the INT received from my function to scroll by.  Since the new message is determined by an entry to the Serial monitor, followed by a newline, I thought "Serial.println()" would work, but it doesn't seem to.

Here's my function, and the print function:

Code: [Select]

void measureDistance()
{
  // set pin as output so we can send a pulse
  pinMode(signal, OUTPUT);
  digitalWrite(signal, LOW);
  delayMicroseconds(5);
  digitalWrite(signal, HIGH);
  delayMicroseconds(5);
  digitalWrite(signal, LOW);
  pinMode(signal, INPUT);
  pulseduration=pulseIn(signal, HIGH) / 2;
  distance = int(pulseduration/29);
  indistance = distance*.39; 
 
}


void printDistances(){            // This is placed in loop()

//  Serial.print(indistance);
  static uint8_t putIndex = 0;
  if ((indistance + 10) <= curdistance || (indistance - 5) >= curdistance)
    {curdistance = indistance;   
      Serial.print("Distance - ");
      Serial.println(curdistance);     // <<<<<<<< I'm trying to get this value printed to the LCD, with the above "Distance - "
    }
}


I've looked around, and it looks like I need to change the int to something else - but doing something like

Code: [Select]
String myString = String(curvalue) isn't working.  I need to do something with 'char'?

Thanks for any help. Again, I'm new so sorry if I'm missing something obvious.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: wabbitguy on Sep 21, 2014, 09:37 am
The obvious would be that you assumed Serial.print has something to do with a scrolling LED matrix. Not sure how you arrived at that, but as you found out, it doesn't... :~ Serial.print is strictly for serial, like data down the USB cable to your computer.

To display things with Parola, there are numerous example files included when you installed the MD_Parola library. Have you looked at the examples to see how the scrolling messages are implemented?

For the INT to char, look up sprintf. Very useful to know.

Mel
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: Piethon on Sep 21, 2014, 07:03 pm

The obvious would be that you assumed Serial.print has something to do with a scrolling LED matrix. Not sure how you arrived at that, but as you found out, it doesn't... :~ Serial.print is strictly for serial, like data down the USB cable to your computer.

To display things with Parola, there are numerous example files included when you installed the MD_Parola library. Have you looked at the examples to see how the scrolling messages are implemented?

For the INT to char, look up sprintf. Very useful to know.

Mel


Thanks for the info - I'll look into sprintf.  As for how I arrived at thinking that Serial.print had something to do with what showed on the LCD, I thought so because of this part (or Parola_Scrolling.ino):

Code: [Select]
void readSerial(void)
{
  static uint8_t putIndex = 0;

  while (Serial.available())
  {
    newMessage[putIndex] = (char)Serial.read(); // <<<<<< RIGHT HERE, I thought it is reading what's in SERIAL ...so, what is that doing?
    if ((newMessage[putIndex] == '\n') || (putIndex >= BUF_SIZE-2)) // end of message character or full buffer
    {
      // put in a message separator and end the string
      newMessage[putIndex] = '\0';
      // restart the index for next filling spree and flag we have a message waiting
      putIndex = 0;
      newMessageAvailable = true;
    }
      else
      // Just save the next char in next location
      newMessage[putIndex++];
  }
}
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: Piethon on Sep 22, 2014, 04:33 am
(First, if I should make a new thread about this - let me know, it's not my intention to 'hijack' this thread)

I looked at Sprintf but am having trouble figuring out how to use it with the larger Parola code.  Here's what I have, but I am thinking it's not exactly how to do it.

Code: [Select]

void measureDistance()
{
  // set pin as output so we can send a pulse
  pinMode(signal, OUTPUT);
  digitalWrite(signal, LOW);
  delayMicroseconds(5);
  digitalWrite(signal, HIGH);
  delayMicroseconds(5);
  digitalWrite(signal, LOW);
  pinMode(signal, INPUT);
  pulseduration=pulseIn(signal, HIGH) / 2;
  distance = int(pulseduration/29);
  indistance = distance*.39;   //<<<<<<<<<<< note, indistance is a FLOAT


}

void printDistances(){

//  Serial.print(indistance);
  static uint8_t putIndex = 0;
  if ((indistance + 10) <= curdistance || (indistance - 5) >= curdistance)
    {curdistance = indistance;   // <<<<<<<<<<  I am trying to get the LCD matrix to scroll the curdistance number
      Serial.print("Distance - ");
      Serial.println(curdistance);
     String myString = sprintf(stringNum,"%d",curdistance);  //<<<< This gives me an error, see below for error
      newMessage[putIndex] = myString;
      newMessage = myString;

      // put in a message separator and end the string
      newMessage[putIndex] = '\0';
      // restart the index for next filling spree and flag we have a message waiting
      putIndex = 0;
      newMessageAvailable = true;

    }
}


The error I get is 'invalid conversion from 'int' to 'const char*'". 

Am I at least correct in thinking that I need to set whatever I want the LCD to display, to be the 'newMessage[]' and then flag 'newMessageAvailable' as TRUE, so the loop sees I have a new message, and uses what's in the 'newMessage[]' array to display that?

Thanks again for your help, and patience as I try to learn this!  :)
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: wabbitguy on Sep 22, 2014, 08:53 am
Code: [Select]
while (Serial.available())

In your example code is from the Parola example where you type in a line in the Arudino IDE serial monitor that then sends via USB (serial) to the Arduino, and the stuff you type in is displayed on the Parola. Serial still has zip to do with the Parola display/library.

This line builds the Parola display array by taking that serial data and putting it into the newMessage[] array.

Code: [Select]
// put in a message separator and end the string
      newMessage[putIndex] = '\0';


To use sprintf, something like this (this does't work with floating point; that's your exercise to figure out):

Code: [Select]
sprintf(newMessage, "The temperature is: %3d\0", temp);

Mel
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: Piethon on Sep 23, 2014, 05:31 am

Code: [Select]
while (Serial.available())
To use sprintf, something like this (this does't work with floating point; that's your exercise to figure out):

Code: [Select]
sprintf(newMessage, "The temperature is: %3d\0", temp);

Mel


Ahhh, thanks! Before going through the figuring out how to use FLOAT with it, I went ahead and changed the FLOAT back to an INT and used the below code - which works!
Code: [Select]
void printDistances(){

//  Serial.print(indistance);
  static uint8_t putIndex = 0;
  if ((indistance + 5) <= curdistance || (indistance - 5) >= curdistance)
    {curdistance = indistance;
      Serial.print("Distance - ");
      Serial.print(distance);
      Serial.print(" cm / ");
      Serial.println(curdistance);
     
      newMessage[putIndex] = sprintf(newMessage, " Dist: %3d inches\0", curdistance);

      // put in a message separator and end the string
      // restart the index for next filling spree and flag we have a message waiting
      putIndex = 0;
      newMessageAvailable = true;

    }
}


Note: without the space before "dist", it only prints "ist: x inches" for some reason.  Also, this works but now my PING sensor is getting really unstable, errant values (I have it facing the ceiling, and it goes from like 30 inches to showing 5 inches and anywhere in between).  But, I'm at least able to get the distance to get sent to the LCD.  :D   

Is that possibly because I'm drawing too much power? ...or is it because I'm no longer using FLOAT  :~

Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: wabbitguy on Sep 23, 2014, 05:54 am
Since you're not building an array in newMessage, you probably want it to look more like this:

Code: [Select]
sprintf(newMessage, "Dist: %3d inches\0", curdistance);

Look up how sprintf works and all the different formatting you can do with it.

Mel
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: Piethon on Sep 23, 2014, 06:47 am
I looked up using float and found that you should use dtostrf, but when I do this I get an error:
Code: [Select]
newMessage[putIndex] = dtostrf(curdistance,4,2,newMessage);
Error: Invalid conversion from 'char*' to 'char'


I'll look up the sprintf in more detail - but I can't really see what the difference is in what you recommended and what I had?


Since you're not building an array in newMessage, you probably want it to look more like this:

Code: [Select]
sprintf(newMessage, "Dist: %3d inches\0", curdistance);



and

Quote from: Piethon
Code: [Select]
...
newMessage[putIndex] = sprintf(newMessage, " Dist: %3d inches\0", curdistance);

aside from the space at the beginning of "dist" - as I mentioned, if I don't have it, the 'd' gets cut off.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: wabbitguy on Sep 23, 2014, 07:24 am
So...these two lines look identical to you? Because they are significantly different and the second example is wrong.

Code: [Select]
sprintf(newMessage, "Dist: %3d inches\0", curdistance);

and

Code: [Select]
newMessage[putIndex] = sprintf(newMessage, " Dist: %3d inches\0", curdistance);

The sprintf command already puts the formatted message in the "newMessage" char array for you. Thus, what purpose does "newMessage[putIndex]=" serve? The correct answer is "none".  Which is why I suggested you look up sprintf to see what the syntax is and how it is used.

Just writing code in the hope something will work is like doing the same thing wrong a number of times but expecting a different result.

And you're using dtostrf incorrectly in the same way. On the positive side, at least you're consistent... :smiley-eek:

I think you should continue the thread in a beginner section though, it's kind of gotten away from the Parola theme herein.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: Piethon on Sep 23, 2014, 07:50 am

So...these two lines look identical to you? Because they are significantly different and the second example is wrong.

Code: [Select]
sprintf(newMessage, "Dist: %3d inches\0", curdistance);

and

Code: [Select]
newMessage[putIndex] = sprintf(newMessage, " Dist: %3d inches\0", curdistance);

The sprintf command already puts the formatted message in the "newMessage" char array for you. Thus, what purpose does "newMessage[putIndex]=" serve? The correct answer is "none".  Which is why I suggested you look up sprintf to see what the syntax is and how it is used.

Just writing code in the hope something will work is like doing the same thing wrong a number of times but expecting a different result.

And you're using dtostrf incorrectly in the same way. On the positive side, at least you're consistent... :smiley-eek:

I think you should continue the thread in a beginner section though, it's kind of gotten away from the Parola theme herein.


Noted - any posts, after this one, I'll put in a new thread/forum.  And thanks for clearing that up regarding the two statements.  I now realize that the sprintf formats it without having to set a new variable.  (Also, found this documentation (http://linux.die.net/man/3/sprintf) which helped.)

Quote from: wabbitguy
Just writing code in the hope something will work is like doing the same thing wrong a number of times but expecting a different result.

I believe that's the definition of insanity  :P

Thanks a ton for helping me out and being patient wabbitguy  :smiley-mr-green: :smiley-mr-green:
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: wabbitguy on Sep 23, 2014, 09:38 am
Check your private messages...might help you out a bit.

Mel
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: 12vunion on Oct 16, 2014, 04:26 am
How large can this scale? Let's say I were to get 100 of these (http://www.icstation.com/product_info.php?products_id=2609#.VD8sCNTF9rx) and make a display 50x2. What issues would I run in to? Could any arduino event drive that many leds?
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Oct 16, 2014, 05:17 am
I have heard of up to 40 displays being run without too many issues.

1. There may not be enough memory (RAM) to run that many displays. This will depend on the processor being used.
2. Communications overhead will slow down the possible update rate.
3. Sufficient power for the displays. It may pay to 'inject' power in different places along the chain.
4. Signal degradation along the length of the display string. There has been some discussion of this in this forum.
5. Physically supporting so many displays so that they don't flop around and disconnect.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: wabbitguy on Oct 16, 2014, 09:36 am

How large can this scale? Let's say I were to get 100 of these (http://www.icstation.com/product_info.php?products_id=2609#.VD8sCNTF9rx) and make a display 50x2. What issues would I run in to? Could any arduino event drive that many leds?

Considering the ICStation says they are using "STM8S003F3" to run these modules and it has 8K of flash and 1K of RAM and that "modules can be extended without limitation", plus the pix only show a max of 12 modules interconnected, I'm not sure I'd want all the eggs in their basket.

Don't know about anyone else, but I've ran 40 Parola modules on a MEGA 2560. With 40 connected, I ran power leads in each end. I also looked at the signal on a DS scope to see how much it degraded in that chain. Actually not as a bad as I had thought it might be.

Having said that, 100 modules I'd think would be a stretch for the 7219's. As Macro said, there's going to be some latency for the signal to get down the line, ram limitations, and there will be some noise. Maybe some buffers along the way might help with the signal. I never checked the ram usage for 40 modules on the Mega.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: Jeff_Haas on Oct 22, 2014, 09:54 am
How much of the Arduino's processor speed is taken up by the Parola library?
I have a project that uses a Parola display, running in a state machine.  The state machine waits for a button to be pressed, then changes the state to the next one, which shows text on the display.  What I'm seeing is that there is sometimes as much as a three second delay from the button being pressed to the Parola responding, and the rest of the sketch proceeding.  I'm happy to post the code if people are willing to go through it.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: wabbitguy on Oct 22, 2014, 07:48 pm
How much of the Arduino's processor speed is taken up by the Parola library?
I have a project that uses a Parola display, running in a state machine.  The state machine waits for a button to be pressed, then changes the state to the next one, which shows text on the display.  What I'm seeing is that there is sometimes as much as a three second delay from the button being pressed to the Parola responding, and the rest of the sketch proceeding.  I'm happy to post the code if people are willing to go through it.
Three seconds to update after a button press? Sum Ting Wong. Big time. On my MEGA's, with 21 modules connected, when I enter a new "message" via Bluetooth (9600 baud), 400ms later I have a new message scrolling in the display.

I'd be looking at what exactly you're doing AFTER the button press since that's where the slow down is. Plus it really shouldn't be variable delay either so I'd be looking at whatever the "state machine" is doing and why it's taking so long to do it.

You want to do a  quick test, skip the state machine calc's and just display a message after the button press. That'll narrow it down I would think.

Mel
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Oct 23, 2014, 07:28 am
Quote
How much of the Arduino's processor speed is taken up by the Parola library?
Very little most of the time. On my Uno, when the display needs updating it takes about 3 milliseconds overhead + 1 milliseconds per module (roughly). 3 seconds delay is not in the Parola library...
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: E40racer on Nov 01, 2014, 07:41 pm
After playing with 8 small modules I bought from China I wanted something a little bigger. I redesigned the Big Parola design that can be found on Codeplex so I could use jumpers to connect them together. The PCB's arrived this week, soldered 10 modules yesterday and they work :)

http://www.youtube.com/watch?v=jNi-GaSY_sA (http://www.youtube.com/watch?v=jNi-GaSY_sA)
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: gzip on Nov 06, 2014, 05:43 am
Hi Marco,

Great work here. I'm using my own board design with the 1088AS and am wondering if there's a bug with the following configuration. It looks like it's never been tested. All the existing configs give me legible output in various orientations so I figure this should as well, but the only output I get is in the last column on the first module.

Code: [Select]
#define HW_DIG_ROWS 1
#define HW_REV_ROWS 0
#define HW_REV_COLS 0


The USE_ICSTATION_HW config works but the text is completely flipped around. With the orientation of my boards I would prefer to have data in and column 0 on the left rather than the right.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: vansart1 on Nov 06, 2014, 05:01 pm
Hi Marco,

Thank you so much for your work on the parola library! I have been trying to get some text to scroll across a 64x8 LED matrix and been having some problems getting the text to scroll or even display correctly. Whenever I try displaying static text, or scrolling a message, it seems that each module acts as its own "zone" as the word scrolls on each module independently instead of going from module to module. The link to the youtube video should help show my problem and have attached my code(modified from the example). I have tried changing various settings for quite awhile, but haven't gotten it working correctly. Could it be that my LED modules aren't compatible with the library? Any help would be greatly appreciated as I am starting to pull my hair out! Thank you very much!

Victor

Link to video: http://youtu.be/8tWankj_6hU

Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: bad_crc on Nov 06, 2014, 10:49 pm
 In the video it looks as if they're connected together "backwards",  that is the text does scroll off the rightmost matrix, and on to the one to its right, however, the scrolling looks to be in the wrong direction, right to left rather than left to right.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Nov 07, 2014, 10:17 am
@vansart1. What modules are you using?
@gzip. You will need to check the docs if you have your own hardware to see if it is wired like an existing config. Not all combinations have been tested - only those for which I have hardware. Zero on the left is not possible as all mappings are to map physical coordinates to the same Cartesian coordinates.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: vansart1 on Nov 07, 2014, 04:17 pm
@bad_crc. Even when you change the scrolling direction, there is the same problem, just in the opposite direction. When the direction is reversed, it still seems that the modules are "backwards" :(

@marco_c. I am using the modules from https://www.tindie.com/products/FriedCircuits/led-matrix-link/
They use the the AS1107 chip which is advertised as having the same functionality as the MAX7219.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Nov 07, 2014, 07:32 pm
Just in case you have not done this, there is a utility called MD_MAX72xx_HW_Mapper in the MD_MAX72xx library examples. This will step through the matrix and tell you on the serial monitor which row/column it thinks it is showing. By observation you should be able to work out the right combination of #defines to get it working correctly.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: vansart1 on Nov 07, 2014, 11:11 pm
I have run the MD_Max72XXHW_Mapper example sketch, and it seems that my rows and columns are inverted. However, I am not sure what #define to modify. This example sketch doesn't use the MD_Max72XX library to run, so changing the #define related to HW_DIG_ROWS, HW_REV_COLS, and HW_REV_ROWS in the library didn't have any impact. Should I modify the #defines in the ino sketch? If so do you have any guidance for that as I am having trouble finding documentation related to the opcode related #defines at the top of the MD_Max72XX_HW_Mapper example sketch.

Here is also attached a youtube video of the sketch running on a LED module in case it helps to clarify things:
http://youtu.be/0tJoBNT_uPs

Thanks you very much for your help!
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Nov 08, 2014, 07:47 am
Good video.

The mapper code does not use the library because you need to be certain what you are looking at. If it was using the library you would have it translated into cartesian coordinates, which would defeat the purpose. Once you have worked out how the matrix is wired using the mapper, you can decide which how the library defines need to be set.

There is a fairly long section for mapping new hardware in the MD_MAX72xx library documentation. Can you confirm that you have read this and followed those instructions? I can seen them in the background in the video.

The basis of making decisions on which defines to change in the library (from the document):
Quote
HW_DIG_ROWS - MAX72xx digits are mapped to rows in on the matrix. If digits are not rows then they are columns!
HW_REV_COLS - Normal column coordinates orientation is 0 col is on the right side of the display. Set to 1 to reverse this (0 on left).
HW_REV_ROWS - Normal row coordinates orientation is 0 row is at top of the display. Set to 1 to reverse this (0 at bottom).
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Nov 09, 2014, 08:13 am
I have updated the HW_Mapper utility with instructions built-in on what to do and look for. This should help clear up the confusion that sometimes happens at the mapping stage. It will be in the next release but in the meantime is available from the code repository source code section for direct download.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: vansart1 on Nov 10, 2014, 08:38 pm
Thank you very much for updating the instruction for the HW_mapper utility! It made it a lot clearer! So according to the mapper, it seems that my grid looks like this:

    DP  A  B  C  D  E  F  G
D0
D1
D2
D3
D4
D5
D6
D7

So if I understood everything correctly:
DIG_ROWS should be set to 1 as digits map to rows
REV_COLS should be set to 0 as col G is already at the right
REV_ROWS should be set to 0 as D0 is already at the top

According to the instructions, these settings have not been tested yet and might yield to unpredictable results. What I found when I make these changes, and send some scrolling text to the display, was that only the last column on the last module is displaying any text. This last column is the only column on the entire matrix to be active. Does this mean that these modules aren't supported by the parola library? Thanks!

Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Nov 11, 2014, 05:28 am
All it means it that the configuration has not been tested and you are getting strange results. I generally need 4 modules to be able to test the correctness of the library for a configuration, and none of the modules I have are wired like yours.

Just for clarity, Parola library does not know about the hardware, that is handled by the MD_MAX72xx. So if the MD_MAX72xx library can be made to work, then Parola library will work as well.

Try running the MD_MAX72XX library test example. That exercises the library and may give some clues.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: vansart1 on Nov 12, 2014, 04:51 pm
I unfortunately have the same problem with the MD_MAX72XX library, so I'm guessing my LED modules are not compatible with this library.

In case anyone is curious, I was able to get text correctly scrolling across the display by modifying some code that relied on the much less powerful LEDControl library. Here is a link to the code: http://forum.arduino.cc/index.php?action=dlattach;topic=218249.0;attach=69652
The user in the forum (http://forum.arduino.cc/index.php/topic,218249.0.html) was having trouble where the text was scrolling in the wrong direction for him, but for me it scrolled correctly. I did modify his code so that it would be more efficient memory wise and it seems to work fine. Unfortunately, the scrolling speed cannot be adjusted much when 8 matrices are connected together.

And thank you very much for your help marco_c! I really appreciate it! :)
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: rlogiacco on Nov 16, 2014, 01:44 am
I'm not sure if this is the right place for my question.... I usually prefer to start a different topic, nonetheless...

I've managed to use Parola with my own hardware setup and after playing with the definitions in MAX&2xxx_lib I've got a working setup... well, not completely working...

I've the following defines producing the output in the attached picture
Code: [Select]
#define HW_DIG_ROWS 0
#define HW_REV_ROWS 1
#define HW_REV_COLS 1


The problem, I believe, relies in my wiring in which SEG A identifies first row and SEG DP the last one. Is there a way to fix this in software without de-soldering my entire setup?
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Nov 16, 2014, 06:15 am
If you are just wanting to do text, then you can change the font file so that the bits are mapped to suit your application.

In all honesty, depending on how many modules you have, it may be quicker to shift 8 wires.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: rlogiacco on Nov 16, 2014, 10:58 am
Marco are you the library author? Reason for my question is I wish to know if I should wait a little longer for other answers and I wish to discuss some potential contributions/changes.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Nov 17, 2014, 03:24 am
Yes I am responsible
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: Clement04 on Nov 28, 2014, 10:38 am
Hi Marco,

Thank you for your very good library.

I just spent a few hours trying to make it work with the LED matrices I bought on ebay. I made it work, eventually, and I'd like to suggest a bugfix.

The problem is in the MD_MAX72xx library. My LED matrices are a bit different than the preconfigured ones since they require the following values:
Code: [Select]
#define HW_DIG_ROWS 1
#define HW_REV_ROWS 0
#define HW_REV_COLS 0


But with these values, the text does not scroll correctly: only the right-most column is lit. I managed to fix the problem by editing the MD_MAX72XX::transformBuffer function.
I replace the following code:
Code: [Select]
#if HW_REV_COL
        _matrix[buf].dig[i] <<= 1;
#else
        _matrix[buf].dig[i] >>= 1;
#endif


by this single line:
Code: [Select]
_matrix[buf].dig[i] <<= 1;

And the same fix is needed for the TSR case.

Do you agree with those fixes?

Cheers,
Clément
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Nov 29, 2014, 08:13 am
Hi Clement,

Glad to see that you were able to get the untested configuration working. I'll look at this in due course when I start work again on the library in the future - I just need to make sure that the change is compatible with the other possible configurations.

Thanks for working this out.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: elektrax on Nov 30, 2014, 08:39 am
hello

Marco and Clement  you are great

first sorry for my basic school english

with this  very cheap matrix :

(http://forum.arduino.cc/index.php?action=dlattach;topic=278787.0;attach=102637;image)

they work with use generic hw set to1, but not in OUT IN configuration edge to edge like lego  with jumper for pin header to connect , i need to use wires : IN bottom down to OUT above

with the correction of Clement, i set up the matrix like lego and my sketch, based on parola_test exemple,  run like i want

i try too "md 72xx_test" exemple with this configuration and it's running

thanks a lot for your work



 

Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: Clement04 on Nov 30, 2014, 10:48 pm
Hi elektrax,

I'm using the same LED matrices, and using my patch, I could chain 9 of them without any problem.

By the way, Marco, I've got a question : when scrolling a text with Parola, I noticed that the movement slows down at the end of the sentence. I couldn't find anything about this in the doc, so what am I missing? I don't have the same issue if I use the MD_MAX72xx library directly.

Cheers
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Dec 01, 2014, 05:36 am
Quote
when scrolling a text with Parola, I noticed that the movement slows down at the end of the sentence
Any specific example or code that you are using for this? A video showing what you mean would be useful as this is not something I have noticed in my setup.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: li_fai on Jan 04, 2015, 03:58 pm
Hi Marco,
When I try to run the parola_scrolling.
It show the following error.
MD_Parola.cpp:104: undefined reference to `MD_PZone::zoneAnimate()'
MD_Parola.cpp:71: undefined reference to `MD_PZone::~MD_PZone()'
MD_Parola.cpp:46: undefined reference to `MD_PZone::MD_PZone()'
MD_Parola.cpp:51: undefined reference to `MD_PZone::begin(MD_MAX72XX*)'

How can I fix it?
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Jan 05, 2015, 05:13 am
Make sure that you have the latest copies of Parola and MD_MAX72XX libraries, and they are installed correctly.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: tpycack on Jan 09, 2015, 09:12 am
finally made it with Generic Module! ;D
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: tpycack on Jan 11, 2015, 05:26 am
finally made it with Generic Module! ;D
It works in 10 matrix(Arduino UNO R3),

but it won't work in Arduino MEGA 2560?
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: li_fai on Jan 11, 2015, 04:56 pm
Make sure that you have the latest copies of Parola and MD_MAX72XX libraries, and they are installed correctly.
Could you tell me which date and version is the latest?
I have try the latest copies of Parola and MD_MAX72XX libraries in
https://parola.codeplex.com/SourceControl/latest#MD_Parola.cpp
https://parola.codeplex.com/SourceControl/latest#MD_Parola.h
http://arduinocode.codeplex.com/SourceControl/latest#MD_MAX72xx.h
http://arduinocode.codeplex.com/SourceControl/latest#MD_MAX72xx.cpp

Thanks for your help.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Jan 12, 2015, 04:49 am
If you have obtained the code from the codeplex repository, then they should be the latest.


The error message is probably related to not being able to find the MD_MAX72xx library.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: li_fai on Jan 12, 2015, 04:12 pm
OK now, I have download all the library in parola and MD_MAX72XX, then it works.
I think the parola_Scrolling need the MD_MAX72xx_lib.h as well. I have miss this library before.
Because I  copy MD_Parola.h .cpp and MD_MAX72XX.h .cpp only. I have not download the zip file
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: foxsam on Jan 16, 2015, 03:28 am
Hi all and thanks for these great libraries.

Is there a way to stack the matrixes on top of each other besides for side by side to create a taller and wider array. so having 8 matrixes can be 16x32 matrix instead of now being 8x64.

Please let me know what  is a way to do this
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Jan 16, 2015, 04:44 am
Quote
Is there a way to stack the matrixes on top of each other besides for side by side to create a taller and wider array. so having 8 matrixes can be 16x32 matrix instead of now being 8x64.
If you want to use the MD_MAX72xx library and map pixels, than that will not work, but it should be ok for text effects as it is just a matter of placement of the modules. For Parola you can define each 'line' of text as different zones and animate them separately.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: foxsam on Jan 16, 2015, 03:08 pm
For Parola you can define each 'line' of text as different zones and animate them separately.
If i would want it to be one line of text with the top half in one display and bottom half in second display they would need to be one zone and animated together I think. Basically I want to have 16 rows instead of 8 but all in the same zone.

Also how can I create a font that is bigger than the 5x7 font we have now? Something like 10x14.
Thanks again.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Jan 16, 2015, 07:50 pm
Quote
Basically I want to have 16 rows instead of 8 but all in the same zone.
Libraries as they are now will not support the configuration you have expressed. It will need to be programmed that way by you.

The documentation with the MD_MAX72xx library shows how to create a new font. Font characters at the moment can be as wide as necessary but only 8 bits high, so a 16 high font will need to be defined in a top and bottom half.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: li_fai on Jan 17, 2015, 05:35 am
When I run the program to my 8x8 LED matrix, the text scrolls up to down. How can I change it from right to left? Also, I would like to know how to control more than one MAX7219 to display other text? Becasue one MAX7219 can only control 8 LED matrix
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Jan 17, 2015, 06:56 am
Most of what you are asking is in the documentation that comes with the Md_max72xx library. Have you read this? What modules are you using?
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: li_fai on Jan 17, 2015, 07:20 am
YES. I have tried textEffect_t to scroll up it can from right to left and displayScroll() but it scroll something wrong text.(not a word). MY led module is HS-1588BS
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Jan 17, 2015, 07:24 am
So what hardware settings did you pick for the library?

Please confirm that when you read the documentation you read the html file in the doc folder of the libraries? Sorry to insist, but most of the questions come because people do not read the doc.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: li_fai on Jan 17, 2015, 07:41 am
I have read the html folder. Do you mean the Connections to the Arduino Board?
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Jan 17, 2015, 07:46 am
If you designed your own display module then you will need to read and understand the section on how the modules are wired and how the library can be set for different configurations using the appropriate #defines in the lib header.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: li_fai on Jan 18, 2015, 06:55 am
Can I rotate the text clockwise 90 degrees by changing the library?
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Jan 18, 2015, 09:38 pm
You can change the text by changing the font definition.

Be aware that if you are doing this thinking that changing the text and then sending it in a different direction will fix a scrolling problem, you will not. The text will not scroll off the 'end' of one module and into the other as logically (in the software) they are not connected properly. You really need to address the way the matrix is wired and tell the software what your configuration is so that it can adapt to the hardware setup.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: li_fai on Jan 25, 2015, 06:05 am
I have adapt to the hardware setup. But how can I control 16x64 scrolling text? I have just control 8x64 only now.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: subcamera on Jan 27, 2015, 03:51 pm
Trying to compile Parola_test I´ll get following errors:


In file included from C:\tools\arduino-1.5.7\libraries\MD_MAX72xx\MD_MAX72xx_font.cpp:25:0:
C:\tools\arduino-1.5.7\libraries\MD_MAX72xx\MD_MAX72xx_font.cpp:133:31: error: conflicting declaration 'const uint8_t _sysfont_var []'
  const uint8_t _sysfont_var[] PROGMEM=
                               ^
In file included from C:\tools\arduino-1.5.7\libraries\MD_MAX72xx\MD_MAX72xx_font.cpp:27:0:
C:\tools\arduino-1.5.7\libraries\MD_MAX72xx\MD_MAX72xx_lib.h:76:16: error: '_sysfont_var' has a previous declaration as 'uint8_t _sysfont_var []'
 extern uint8_t _sysfont_var[];  ///< System variable pitch font table

Is there any hint, what to do?

regards
Joachim
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Jan 27, 2015, 09:12 pm
Sounds like you are using IDE version 1.5x. You should get the library from the source code tab of the codeplex site rather than the zip file. There have been changes made to allow for the new way of handling PROGMEM in the newer IDE.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: joe11 on Jan 28, 2015, 05:12 pm
Hi Marco,
I've got my Parola matrix up and running with the Parola_Display sketch. Thank you for your great work. I have two questions though:

1. Is there a way to increase the speed of the SLICE effect. I would like to see this effect go a bit faster, but from the sketch only (without any external input from a variable resistor)?

2. Also, how do you modify the Parola_Display sketch to turn off the inverse scrolling function, it's when the whole background of the Parola LED matrix light up to contrast words that you want to scroll.

The Parola_Display sketch I am using came from the examples folder within the MD_Parola_v2.0 zipfile. I'll include it below for you to see. Thanks again marco.


-------------------------------------


#include <MD_Parola.h>
#include <MD_Parola_lib.h>

#include <MD_MAX72xx.h>
#include <MD_MAX72xx_lib.h>

// Program to demonstrate the MD_Parola library
//
// For every string defined by pc[] iterate through all combinations
// of entry and exit effects.
//
// Animation speed can be controlled using a pot on pin SPEED_IN

#include <MD_Parola.h>
#include <MD_MAX72xx.h>

// Define the number of devices we have in the chain and the hardware interface
// NOTE: These pin numbers will probably not work with your hardware and may
// need to be adapted
#define MAX_DEVICES 6
#define CLK_PIN 13
#define DATA_PIN 11
#define CS_PIN 10

// set to 1 if we are implementing the user interface pot
#define USE_UI_CONTROL 1

#if USE_UI_CONTROL
#define SPEED_IN A5
uint8_t frameDelay = 25; // default frame delay value
#endif // USE_UI_CONTROL

// Hardware SPI connection
MD_Parola P = MD_Parola(CS_PIN, MAX_DEVICES);
// Generic output pins
// MD_Parola P = MD_Parola(DATA_PIN, CLK_PIN, CS_PIN, MAX_DEVICES);

#define SPEED_TIME 25
#define PAUSE_TIME 1000

// Turn on debug statements to the serial output
#define  DEBUG  0

#if  DEBUG
#define PRINT(s, x) { Serial.print(F(s)); Serial.print(x); }
#define PRINTS(x) Serial.print(F(x))
#define PRINTX(x) Serial.println(x, HEX)
#else
#define PRINT(s, x)
#define PRINTS(x)
#define PRINTX(x)
#endif

// Global variables
uint8_t  curText;
char *pc[] =
{
 "Parola for",
 "Arduino",
};

uint8_t  inFX, outFX;
textEffect_t effect[] =
{
PRINT,
SCAN_HORIZ,
SCROLL_LEFT,
WIPE,
SCROLL_UP_LEFT,
SCROLL_UP,
OPENING_CURSOR,
GROW_UP,
SCROLL_UP_RIGHT,
BLINDS,
CLOSING,
GROW_DOWN,
SCAN_VERT,
SCROLL_DOWN_LEFT,
WIPE_CURSOR,
DISSOLVE,
OPENING,
CLOSING_CURSOR,
SCROLL_DOWN_RIGHT,
SCROLL_RIGHT,
SLICE,
SCROLL_DOWN,
};

#if USE_UI_CONTROL
void doUI(void)
{
 // set the speed if it has changed
 {
   int16_t speed = map(analogRead(SPEED_IN), 0, 1023, 0, 250);

   if (speed != (int16_t)P.getSpeed())
   {
     P.setSpeed(speed);
     P.setPause(speed);
     frameDelay = speed;
     PRINT("\nChanged speed to ", P.getSpeed());
   }
 }
}
#endif // USE_UI_CONTROL

void setup(void)
{
 Serial.begin(57600);
 PRINTS("[Parola Demo]");

#if USE_UI_CONTROL
 pinMode(SPEED_IN, INPUT);
 doUI();
#endif // USE_UI_CONTROL

 P.begin();
 P.setInvert(false);
 P.displayText(pc[curText], CENTER, SPEED_TIME, PAUSE_TIME, effect[inFX], effect[outFX]);
}

void loop(void)
{
#if USE_UI_CONTROL
doUI();
#endif // USE_UI_CONTROL

 if (P.displayAnimate()) // animates and returns true when an animation is completed
 {
   // Set the display for the next string.
   curText = (++curText) % ARRAY_SIZE(pc);
   P.setTextBuffer(pc[curText]);

   // When we have gone back to the first string, set a new exit effect
   // and when we have done all those set a new entry effect.
   if (curText == 0)
   {
     outFX = (++outFX) % ARRAY_SIZE(effect);
     if (outFX == 0)
     {
       inFX = (++inFX) % ARRAY_SIZE(effect);
       if (inFX == 0)
         P.setInvert(!P.getInvert());
     }
       
     P.setTextEffect(effect[inFX], effect[outFX]);
   }

   // Tell Parola we have a new animation
   P.displayReset();
 }
}
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Jan 29, 2015, 12:08 am
Quote
1. Is there a way to increase the speed of the SLICE effect. I would like to see this effect go a bit faster, but from the sketch only (without any external input from a variable resistor)?
Sure, you just need to change the speed with the class method provided. The variable resistor (pot) is used to set a value remotely, but the setting is all done under program control.
Code: [Select]
P.setSpeed(speed);
You may want to modify the list of effects to include pairs of values. The first is the effect and the second is the speed. I think one of the other examples uses this. Clearly the speed for a SLICE should be faster than for other effects or you die of boredom!

Code: [Select]
2. Also, how do you modify the Parola_Display sketch to turn off the inverse scrolling function, it's when the whole background of the Parola LED matrix light up to contrast words that you want to scroll.
Inverse scrolling is only on as long as you want it to be. The call to turn it on and off uses the method
Code: [Select]
P.setInvert();
The example code flips the inverse setting once it has been through all the animations. The place to call it is the same - once the animation has stopped (P.displayAnimate() returns true) set or reset the inverse. What is on the display stays inverted and new characters will not be.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: joe11 on Jan 29, 2015, 05:29 am
Thank you so much marco. Both of your suggestions worked like a charm, and I really like the new SLICE effect. Only problem is that all other effects now also are speeding up. I have looked in both the MD_MAX72xx_v2.4 and the MD_Parola_v2.0 libraries, but couldn't find the example for pairs of values coding you mentioned. If you can give me a pointer as to how it's done, I'd greatly appreciate. Thanks again and God bless.    





Sure, you just need to change the speed with the class method provided. The variable resistor (pot) is used to set a value remotely, but the setting is all done under program control.
Code: [Select]
P.setSpeed(speed);
You may want to modify the list of effects to include pairs of values. The first is the effect and the second is the speed. I think one of the other examples uses this. Clearly the speed for a SLICE should be faster than for other effects or you die of boredom!

Code: [Select]
2. Also, how do you modify the Parola_Display sketch to turn off the inverse scrolling function, it's when the whole background of the Parola LED matrix light up to contrast words that you want to scroll.
Inverse scrolling is only on as long as you want it to be. The call to turn it on and off uses the method
Code: [Select]
P.setInvert();
The example code flips the inverse setting once it has been through all the animations. The place to call it is the same - once the animation has stopped (P.displayAnimate() returns true) set or reset the inverse. What is on the display stays inverted and new characters will not be.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Jan 30, 2015, 04:39 am
Look at the Parola_Fonts example. The way that the font name, text direction and message to display are stored and used will be the same technique that you use for the animation type and speed.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: joe11 on Jan 30, 2015, 10:41 am
Hi marco,
I try to follow your suggestion, but being so suck at C, I didn't get anywhere tweaking with the code. That's alright though, this Parola matrix is just awesome, and I am so glad I had built it. (it's actually looks better at high scrolling speed, lol). Thanks marco, ur the man.


Look at the Parola_Fonts example. The way that the font name, text direction and message to display are stored and used will be the same technique that you use for the animation type and speed.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: li_fai on Jan 31, 2015, 08:23 am
Marco:

When I input a text on serial monitor, it will show the words on matrix. Can you explain which part of the program that sent the inputed text to the matrix in the program? And, how can the program find the correct font on the MD_MAX72xx_font?
thanks!

Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Jan 31, 2015, 12:19 pm
Quote
Can you explain which part of the program that sent the inputed text to the matrix in the program? And, how can the program find the correct font on the MD_MAX72xx_font?
If I understand this question correctly you are asking me how the libraries work? That is a big question and really something that you can look for yourself in the source code.

If your question is more specific about a specific program, then you will need to explain the question better for me, please.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: li_fai on Feb 01, 2015, 08:24 am
If I understand this question correctly you are asking me how the libraries work? That is a big question and really something that you can look for yourself in the source code.

If your question is more specific about a specific program, then you will need to explain the question better for me, please.
How can the TEXT sent from serial monitor to the LED matrix?
Also, how can the program load the font?

So that I can modify the program myself.
Thanks
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Feb 01, 2015, 08:31 am
Have you looked at any of the example programs?

Quote
How can the TEXT sent from serial monitor to the LED matrix?
Example program Parola_Scrolling

Quote
Also, how can the program load the font?
The program automatically uses the supplied font. If you want to define and supply your own then example program Parola_Fonts and read the documentation in the doc folder of the library release.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: li_fai on Feb 01, 2015, 02:36 pm
Marco,
I am using the Parola_Scrolling but I don't understand the program of void readSerial(void) part.
Can you explain that?

Oh.. the Parola_Scrolling example is not using MD_MAX72xx_font.h??
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Feb 02, 2015, 07:17 am
Code: [Select]
void readSerial(void)
{
  static uint8_t    putIndex = 0;

  while (Serial.available())
  {
    newMessage[putIndex] = (char)Serial.read();
    if ((newMessage[putIndex] == '\n') || (putIndex >= BUF_SIZE-2))    // end of message character or full buffer
    {
      // put in a message separator and end the string
      newMessage[putIndex] = '\0';
      // restart the index for next filling spree and flag we have a message waiting
      putIndex = 0;
      newMessageAvailable = true;
    }
      else
      // Just save the next char in next location
      newMessage[putIndex++];
  }
}


It takes the characters from the serial input port and puts them in a character array string. When that string is complete (the input character is '\n' or newline), it terminates the string with a null character and reset the string counters for the next input string. The function has a lot of comments that should be self explaining.

Note that the string is stored in a temporary variable newMessage while the current animation is still running. Once the animation is complete, the loop() function check the boolean newMessageAvailable. If the message is available it will copy the new message before the next animation, otherwise it uses the existing (old) string.

Quote
Oh.. the Parola_Scrolling example is not using MD_MAX72xx_font.h??
You need to be clear about the role of the MD_Parola and MD_MAX72xx libraries. Parola implements the high level animation handling for the scrolling display. MD_MAX72xx implements the required functionality to use the hardware. The fonts.h file will never be used in the Parola library as it is internal to the MD_MAX72xx library only.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: louwin on Feb 05, 2015, 01:53 pm
Thank you for your marvelous library, Marco   :D

I bought 2 of these beautiful 4 by 8X8 LED modules....

http://www.ebay.com.au/itm/301410736248?ssPageName=STRK:MEWAX:IT&_trksid=p3984.m1423.l2649

I'm sorry, I tried to insert an image but am too much of a noob to work out how to.  :(

I set the #defines as such....

#define HW_DIG_ROWS 1
#define HW_REV_COLS 1
#define HW_REV_ROWS 1

as I want (0,0) to be on the bottom left.

I have 2 lots of four modules so eight altogether. I am using SW SPI with pins 12,11 & 10 correctly.

I have tried running the "Parola_Scrolling" example. It appears to scroll the message in EACH of the 8 modules.

I will try to explain, "Hello" starts in module 0 then "Hello" starts in module 1 then "Hello" in module 2 etc until "Hello",
at various stages, is on ALL 8 modules. The whole message scrolls in EACH module ending with module 7 last.

I HAVE read the "html" docs but am completely befuddled.  I suspect I haven't set another #define somewhere.

I think my modules are the same as the one elektrax showed in message #349 except mine are 4 of them still connected.

Could someone please point me in the right direction?

Thanks in anticipation  :)
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Feb 05, 2015, 09:56 pm
Quote
as I want (0,0) to be on the bottom left.
No, (0,0) is always at the top right. You need to map the hardware so that this is the result. Nothing will work as expected otherwise.

Quote
I have tried running the "Parola_Scrolling" example. It appears to scroll the message in EACH of the 8 modules.
You need to get the coordinates correct as per comment above before you proceed further.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: louwin on Feb 06, 2015, 02:15 am
Thanks for your response Marco   :D

First and foremost I read (many times) "New Hardware Types" with particular attention to the "Determining the type of mapping". Then I ran the HW_Mapper.

I started with the modules in, what I thought to be, a logical orientation. So I had the "<-IN      OUT->" visible (and correct way up) on the PCB(s). Where (0,0) is/was is moot  :)

The HW_Mapper (I couldn't disconnect any modules (to leave one) as they appear to be hardwired connected?) didn't spell out my exact situation.  Rows up was okay but pixels went left to right not right to left  :(

I changed ROW_SIZE from 8 to 64 as it seemed logical? (but had no effect). I assumed my modules were most like the ICSTATION_HW ones with IN on the left and OUT on the right. I got the best results with 1 1 1 (as per ICSTATION_HW).

I expected the scrolling to start on the right and scroll off on the left (as per your YouTube video) but it starts on the left and builds to the right dropping off on the right. So the first module on is the left most and the last is the right most. And, as before, EACH of the 8 modules scrolls the entire message at various stages.

Is

#define HW_DIG_ROWS 1
#define HW_REV_COLS 1
#define HW_REV_ROWS 1

the only elements that control the mapping? Or are there other defines I am not setting correctly?

My modules (with the PCB writing legible) have IN on the left. As in my first message I see the leftmost module as zero(?).

Again, thanks for your response  :D

Any further help would be most welcome  :D
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Feb 06, 2015, 03:38 am
Quote
Where (0,0) is/was is moot
Not at all, (0,0) is critical to all the other steps.

Quote
ROW_SIZE from 8 to 64 as it seemed logical
Again, not correct. There are only 8 rows, even in your configuration.

Quote
#define HW_DIG_ROWS 1
#define HW_REV_COLS 1
#define HW_REV_ROWS 1
Are the only elements that control the mapping., You should not need to change anything else.

The first (zero) module will be the one nearest to the IN, so ignore all the other 3 in your device. Normally they will show what is in the first module, delayed by one step. Focus on one module only (cover the others over if they confuse you) and make sure you get the right mapping.

Quote
My modules (with the PCB writing legible) have IN on the left. As in my first message I see the leftmost module as zero(?).
And if you flip it 180 degrees it will be on the right. Don't look at the writing on the PCB to work out which is up - run HW_Mapper and follow the instructions.

Scrolling direction has nothing to do with the modules and everything to do with the logic in the software. Unless you tell it the hardware configuration, it cannot logically do anything. Expecting (0,0) in the bottom right when the documentation says the top left is never going to work.

Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: louwin on Feb 06, 2015, 06:49 am
Thanks Marco.  :)

I'm not home ATM (babysitting a 2.5 year old. About MY mental age). :D

I'm on my iPad. Pity I can't get the Docs on it. :(     It would be nice to access them away from my desktop.

Even though my current setup shows the text upright I will flip it when I get home as you suggest.

I won't swear to it but I think I HAVE tried all combinations of the 3 elements, 000, 001, 010, 011, 100, 110 & 111. The last, 111, gave (IMO) the best results. Two of them were obviously wrong as the gave either ONE row or column of blinking LEDs.

When I get home I will invert the array so the writing on the PCB is upside down and run the Mapper and try to make sense of it.  I will start with a clean slate. I really want this 2 by 4 by 8X8 array to work as I will eventually buy 5 more sets.  I have ordered 4 individual 8X8s modules of the same type, 2 due NOW and 2 more due in a month (coming from China). :(  I also have 12 generic modules. So I am serious about getting things to work.

Thanks for ALL your very welcome help, Marco.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Feb 06, 2015, 07:24 am
Quote
I also have 12 generic modules.
It may be easier to get familiar with getting it to work with these as we know it should work.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: louwin on Feb 06, 2015, 01:12 pm
Just to give you the results of the Mapper.

IN to the right of the array and lettering on the PCB upside down.

** DIGITS MAPPING (rows) **
D0 etc

Showed rows starting on the top moving down.

** SEGMENT MAPPING (columns) **
seg G etc

Showed a pixel on the top row stepping from the right to the left.

I let this run for 8 pages of A4 and the results repeated till I stopped the sketch.

I read this to be 1 1 1. Right?    :smiley-eek:

Curiously I wrote a sketch using the LedControl library. The sketch draws all sorts of patterns on each module (at random), numbers, my name LOUIS and so on.

I developed the sketch using 5 generic modules. Which (inverted to my current test) shows everything perfectly as I expected.

The sketch also includes this bit of logic....

 for(addr=0; addr<5; addr++) {
   lc.setLed(addr,addr,addr,true);
   delay(100);
 }

When I run my sketch on my 2 by 4 8X8 array, my name starts on the right but the letters go downwards to the left (as expected). The sketch shows (0,0,0,true) as the top LEFT of the rightmost module. Does this help?

Again, thanks for all your help. It is much appreciated   :D

I saw your suggestion about trying with the generic modules but, like a dog with a bone, I would like to keep gnawing the problem I have till I get a solution  :)

I am considering changing from software SPI to hardware SPI? Would there be an advantage to this?

Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Feb 06, 2015, 07:39 pm
Quote
I saw your suggestion about trying with the generic modules but, like a dog with a bone, I would like to keep gnawing the problem I have till I get a solution
Sometimes switching bone refreshes the palate.

Quote
I developed the sketch using 5 generic modules. Which (inverted to my current test) shows everything perfectly as I expected.
So why not do the same for the MD_MAX72xx and the generic modules? If you can get it to work for separate generic modules at least it would give you (and me) confidence that you are understanding the HW_Mapper properly. :)

Quote
When I run my sketch on my 2 by 4 8X8 array, my name starts on the right but the letters go downwards to the left (as expected). The sketch shows (0,0,0,true) as the top LEFT of the rightmost module. Does this help?
Not if you are using LedControl.


Quote
I am considering changing from software SPI to hardware SPI? Would there be an advantage to this?
Not for this problem. The only difference will be that animation it will be much faster with MD_MAX72xx but no difference with LedControl.

Code: [Select]
  Serial.print(F("\n\nThere are three hardware setting that describe your hardware configuration:"));
  Serial.print(F("\n- HW_DIG_ROWS - HardWare DIGits are ROWS. Set to 1 if the digits map to the rows"));
  Serial.print(F("\n                of the matrix, 0 otherwise"));
  Serial.print(F("\n- HW_REV_COLS - HardWare REVerse COLumnS. The normal column coordinates orientation"));
  Serial.print(F("\n                is 0 col on the right side of the display. Set to 1 to reverse this"));
  Serial.print(F("\n                (ie, hardware 0 is on the left)."));
  Serial.print(F("\n- HW_REV_ROWS - HardWare REVerse ROWS. The normal row coordinates orientation is 0"));
  Serial.print(F("\n                row at top of the display. Set to 1 to reverse this (ie, hardware 0"));
  Serial.print(F("\n                is at the bottom)."));


Remember (0,0) is the TOP RIGHT.

Quote
Showed rows starting on the top moving down.
Code: [Select]
  Serial.print(F("\n->If you see ROWS animated then set HW_DIG_ROWS to 1."));
  Serial.print(F("\n->If you saw BARS scanning right to left (or bottom to top if"));
  Serial.print(F("\n  HW_DIG_ROWS) then set HW_REV_ROWS to 1."));

HW_DIG_ROWS = 1 as the rows are being illuminated.
Counting from 0 the rows are counting TOP to BOTTOM for an increase in the number of rows, so HW_REV_ROWS is 0.

Quote
Showed a pixel on the top row stepping from the right to the left.
Code: [Select]
  Serial.print(F("\n-> If you saw LEDS scanning bottom to top (or right"));
  Serial.print(F("\n   to left if HW_DIG_ROWS) then set HW_REV_COLS to 1."));

So HW_REV_COLS = 1 as they are already counting right to left and HW_DIG_ROWS=1.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: louwin on Feb 07, 2015, 02:25 am
Sorry Marco....

I typed a response and tried to send a video but "The connection got reset" and I lost the whole message and the attempt to upload a video.  :(

Serves me right not to copy the message first  :(

I set the #defines such (as suggested by your response)

#define   HW_DIG_ROWS   1
#define   HW_REV_COLS   1
#define   HW_REV_ROWS   0

The display is much as before.  :(

Letters right way up but inverted. Starts rightmost - eH  then next module eHll then next eHllo! etc....
Ends with "?" in the leftmost module.

I could still be doing something wrong? Misrepresenting the results of the Mapper?

Could the pins be wrong?  Defined right but plugged in wrong? I HAVE checked but I am almost 70 so could be wrong!?

#define   DATA       12
#define   CS      10
#define   CLK      11

Has anyone else used these modules successfully?

Could the modules be wired completely differently?

I will try to send a picture of the modules (won't try video as I suspect it killed the last reply)!


As always, thanks for your continuing help Marco....   :D
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Feb 07, 2015, 02:34 am
Quote
Could the pins be wrong?
Unlikely as you would be getting nothing intelligible.

Quote
Has anyone else used these modules successfully?
Never been asked about these before. Doesn't mean they have not been connected successfully, as there are a few thousand downloads of the library.

Quote
Could the modules be wired completely differently?
Possible but you say that they work with LedControl, so they are consistent amongst themselves at least.

Quote
Letters right way up but inverted
Do you mean right way up but back to front or that the letters appear in reverse order?

I go back to asking you to please try the generic modules first and then come back to this. I KNOW the generic modules work and you should be able to get them to work as well.

It may also be useful to leave the Parola library aside for the moment and just run the MD_MAX72xx_Test example program. It tells you where it thinks zero is.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: louwin on Feb 07, 2015, 02:40 am
 Tried to resend the video (18.9Mb) but failed again. Took another smaller one.... 8.4Mb....
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: louwin on Feb 07, 2015, 02:52 am
8.4Mb failed.  Trying 2.5Mb
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: louwin on Feb 07, 2015, 02:55 am
Just told that limit is 1.2Mb....

Trying another....
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: louwin on Feb 07, 2015, 03:01 am
Sorry....

Can't take a movie small enough!  :(  Cheap camera and I don't know how to take stills with it   :(

Told you I was a dog with a bone, didn't I....

Will now try "It may also be useful to leave the Parola library aside for the moment and just run the MD_MAX72xx_Test example program. It tells you where it thinks zero is."
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Feb 07, 2015, 03:19 am
Put the video on YouTube and post a link.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: louwin on Feb 07, 2015, 03:45 am
Zero point highlight

........
..
. .
.  .
.   .
.    .
.     .
.      .

Patterns are reasonable.

Spirals are just rows with the occasional column

Bullseyes are inverted U until 4 pixels in the centre

There are VERY long delays as if some tests are NOT displaying?

Text scrolling are as I described before

Numbers are 1 2 3 4 5 6 <- flipped horizontally with a quick blink correctly displayed 1 2 3 4 5 6

E is

.....
   .
.....
   .
   .
.....

Rows 0->7 - top to bottom 64 LEDs lit
Cols 0->max - leftmost column of each module towards the left
Moving cross - seems okay
Each individually by row then col - diagonal plus going from top left to bottom right (NOT
                                               just a diagonal. Appears to start painting from top left
                                               then moving towards bottom right
Bullseye - inverted U shrinking to 4 dots in the middle
Bouncing ball - 3 or 4 LED blinks in the rightmost module and 1 blink in the second to the left?
Spiral in - basically rows moving downwards with the occasional column thrown in
Scrolling text - as before but with ...G couldn't read it
Vary intensity - seemed constant?
Scan Limit - seemed okay
Blinking - all 512 LEDs blinking on and off (used 0.59A of current - impressive)
Scrolling text - as before
Transformation1 - arrows(?) left - right - up - down?

M W M W M W M W displays going in all directions....

The LONG delays with a blank display were particularly noticeable....

Any help?

Thanks again....

Totally new hardware response????   :D
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: louwin on Feb 07, 2015, 03:49 am
Okay....

Video uploading to YouTube....

Hope it is okay as I have never done it before  :D

VERY slowly....

WILL be link....   http://youtu.be/1sCPZo6Kt2k
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Feb 07, 2015, 03:50 am
Quote
........
..
. .
.  .
.   .
.    .
.     .
.      .
Should be pointing to the other side. Your HW OPTIONS setup is not correct.

I would REALLY prefer that you drop this bone and come back to it later. Get a know configuration working so that we are starting from a good base.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: louwin on Feb 07, 2015, 04:17 am
Okay, uploaded and published....

http://youtu.be/1sCPZo6Kt2k

On babysitting duties so no access to my desktop. Will have my iPad though  :D
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: louwin on Feb 07, 2015, 04:28 am
Okay....

I will start with the generic modules when I get home.

Was the YouTube any help?  :)

I always had it the other way but you suggested "input on the right"?

Input on the left was how my LedControl sketch with the gen modules worked.

Anyway, tonight with the generic modules  :D

Thanks again  :D
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Feb 07, 2015, 05:46 am
I think from the video and from the zero point problem above that HW_REV_COLS is not correct. If you are set to 1 it should be zero (or the opposite).

The modules are scrolling from col 7 to col 0 (module 0), then from col 15 to col 8 (module 1), etc.

I guess I also have the question about where you are changing these to you configuration as the library header file is only using values identified by USE_PAROLA_HW, USW_GENERIC_HW and USE_ICSTATION_HW? Please explain what you are editing?
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: louwin on Feb 07, 2015, 07:07 am
On my daughter's system so no access to my Arduino Nano or my libraries or anything. I have downloaded the libraries just to answer your question.  :D

I made changes in MD_MAX72xx_lib.h (after I confirmed the #define   USE_PAROLA_HW   1 in MD_MAX72xx.h and the other USE_*_HW are 0)

#if USE_PAROLA_HW      // tested MC 8 March 2014
#define   HW_DIG_ROWS   1 ///< MAX72xx digits are mapped to rows in on the matrix
#define   HW_REV_COLS   1 ///< Normal orientation is col 0 on the right. Set to 1 to reverse this
#define   HW_REV_ROWS   0 ///< Normal orientation is row 0 at the top. Set to 1 to reverse this
#endif

This is the original setting but, I suspect, it IS my current setting at home.

I did a global search in the library and these variables are used only in these "*.h" files and the "/doc/..." files.

Thanks again....   :)

When I get home I will setup ANOTHER Nano to test the generic modules so the currently setup Nano will remain the same. Obviously, I will change the MD_MAX72xx.h to de-activate the PAROLA_HW and activate the GENERIC_HW #define.  I expect THAT should work straight "out of the box" :)

I regret I didn't setup hardware SPI right at the start but, as you suggested, it would have made no difference to LedControl  :(

Now that I have the avenue of YouTube I CAN easily send you videos of my results....   :D
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Feb 07, 2015, 08:40 am
I have reworked the HW_Mapper to be a bit more robust in its suggestions, maybe try this version when you get a chance.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: li_fai on Feb 07, 2015, 08:51 am
Code: [Select]

#include <MD_Parola.h>
#include <MD_MAX72xx.h>

// Define the number of devices we have in the chain and the hardware interface
#define    MAX_DEVICES     1
#define    CLK_PIN         12
#define    DATA_PIN        11
#define    CS_PIN_1        10
#define    CS_PIN_2        9

// GENERIC SPI
MD_Parola P1 = MD_Parola(DATA_PIN, CLK_PIN, CS_PIN_1, MAX_DEVICES);
MD_Parola P2 = MD_Parola(DATA_PIN, CLK_PIN, CS_PIN_2, MAX_DEVICES);

uint8_t    frameDelay = 100;    // default frame delay value
textEffect_t    scrollEffect = SCROLL_LEFT;

// Global message buffers shared by Serial and Scrolling functions
#define    BUF_SIZE    10
char curMessage1[BUF_SIZE];
char newMessage1[BUF_SIZE];
bool newMessageAvailable1 = false;

char curMessage2[BUF_SIZE];
char newMessage2[BUF_SIZE];
bool newMessageAvailable2 = false;

void readSerial(void)
{
  static uint8_t    putIndex1 = 0;
  static uint8_t    putIndex2 = 0;

  while (Serial.available())
  {
   
    newMessage1[putIndex1] = (char)Serial.read();
    newMessage2[putIndex2] = (char)Serial.read();
    if ((newMessage1[putIndex1] == '\n') || (putIndex1 >= BUF_SIZE-2))    // end of message character or full buffer
    if ((newMessage2[putIndex2] == '\n') || (putIndex2 >= BUF_SIZE-2))
    {
      // put in a message separator and end the string
      newMessage1[putIndex1] = '\0';
      newMessage2[putIndex2] = '\0';
      // restart the index for next filling spree and flag we have a message waiting
      putIndex1 = 0;
      putIndex2 = 0;
      newMessageAvailable1 = true;
      newMessageAvailable2 = true;
      Serial.println(newMessage1);
      Serial.println(newMessage2);
    }

    else
      // Just save the next char in next location
      newMessage1[putIndex1++];
      newMessage2[putIndex2++];
     
     
 }

}


void setup()
{
  Serial.begin(9600);

  P1.begin();
  P2.begin();
  P1.displayClear();
  P2.displayClear(); 
  P1.displaySuspend(false);
  P2.displaySuspend(false);
  P1.displayScroll(curMessage1, LEFT, scrollEffect, frameDelay);
  P2.displayScroll(curMessage2, LEFT, scrollEffect, frameDelay);

  newMessage1[0] = '\0';
  newMessage2[0] = '\0';
}

void loop()
{

  readSerial();
  if (P1.displayAnimate())
  if (P2.displayAnimate())
  {
    if (newMessageAvailable1)
    {
      strcpy(curMessage1, newMessage1);
      newMessageAvailable1 = false;
     
    }
    if(newMessageAvailable2)
    {
      strcpy(curMessage2, newMessage2);
      newMessageAvailable2 = false;
     
    }
    P1.displayReset();
    P2.displayReset();
  }
}



Why I cannot scrolling 2 rows in this program?
I am trying to scrolling 2 8x8 LED matrix separately.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Feb 07, 2015, 09:56 am
Quote
#define    CS_PIN_1        10
#define    CS_PIN_2        9
Try changing Pin 10 to something different to start with. I have run 3 different display at once, so it does work.

What are you expecting to see and what are you actually seeing happening?
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: li_fai on Feb 07, 2015, 10:48 am
Try changing Pin 10 to something different to start with. I have run 3 different display at once, so it does work.

What are you expecting to see and what are you actually seeing happening?
I want to see 2 rows scrolling with 16x8 LED matrix (1 row means the first 8x8 LED matrix another row means the other 8x8 matrix) by input text in serial monitor to control 2 MAX7219 and 2 LED matrix

In the above program, I am now nothing to see in LED matrix. Just have signal in my Arduino UNO

Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: louwin on Feb 07, 2015, 12:31 pm
WOW! We're ALMOST there!!!!

The new Mapper suggested 1 0 0  :D

I edited the *lib.h file and ran Parola_Scrolling. All I got was the rightmost COLUMN random (?) blinking.

So I loaded MD_MAX72xx_Test!   Yeah!  :D

Got the random(?) blinking COLUMN again but I left it AND!!!!!!!!!!

A ZERO and an arrow pointing to the TOP RIGHT   :D  :D  :D  :D  :D  :D  :D 

ANY scrolling TEXT gets mangled to rightmost random blinking COLUMN....

Still some VERY long delays.  :(

The bouncing ball works.  :)

The spiral over ALL 8 modules works.  :)

The arrowheads seem to scroll OFF (to the right) quickly.  :(  Before they did a merry dance right, left, up and down....

The numbers display correctly but do NOT rebuild after they scroll right  :(

The display of the font (2 hex digits and the font character) works   :)

WOW! Almost there....    :D

Will make a video and upload and send you the link....

Uploading (246Mb)....   http://youtu.be/1Omq33e7-ro

The YouTube is available  :D
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Feb 07, 2015, 11:28 pm
Quote
I want to see 2 rows scrolling with 16x8 LED matrix (1 row means the first 8x8 LED matrix another row means the other 8x8 matrix) by input text in serial monitor to control 2 MAX7219 and 2 LED matrix
Unless you have another reason to have 2 separate objects to control the display(s), an easier option is to have 2 zones on one display, using only one connection. This is probably more flexible as you can vary the zone sizes easily through software.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Feb 07, 2015, 11:32 pm
Quote
WOW! We're ALMOST there!!!!
Look at post #347 in this forum. Looks like there is a bug in the code. Now that I know where to to get the hardware I should be able to fix the it in the library. You can make the suggested changes to your code in the interim.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: louwin on Feb 08, 2015, 03:34 am
Thanks Marco....   :D

That fixed the text scrolling problem.   8)

Believe it or not I HAD considered that but because #347 was over 5 weeks ago I assumed the problem was fixed in the end of year library update.  :(

I'm also sorry to suggest there are still other problems  :(  I think in the "Transformation" routines.

The "use the arrow bitmap" scrolls to the left perfectly then it reverses direction but, instead of scrolling to the right, it scrolls to the left and disappears. This is followed by a LONG delay with a blank screen(array). I suspect the "fix" has caused other problems????

This is shown in my second YT video. It is better NOW as the arrow left scroll is perfect but the right scroll doesn't work at all.

As always, Thanks   :D

SORRY....    I didn't make the same change in the TSR routine....

Sorry for the false alarm  :(

As far as I can see - MD_MAX72xx_Test works completely (and perfectly) with my modules :D  :D  :D  :D

THANKS....  THANKS....  THANKS....  THANKS....  THANKS....  THANKS....  :D

Parola_Scrolling works perfectly too  :D
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: li_fai on Feb 08, 2015, 01:04 pm
Unless you have another reason to have 2 separate objects to control the display(s), an easier option is to have 2 zones on one display, using only one connection. This is probably more flexible as you can vary the zone sizes easily through software.
No, I want to test 2 LED matrix first. if success, I will make 16x64 LED matrix(16 LED matrix). The clock and Datain PIN are connected to arduino UNO pin 12 and 11 respectively. The first 8x64 is using arduino pin 10 (CS_PIN1) to control and the second 8x64 is using arduino pin 9(CS_PIN2) to control. 
So, How can I change the program?
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Feb 08, 2015, 09:56 pm
Quote
So, How can I change the program?
As I suggested earlier you should try and use a pin that is different from pin 10 for the select line and see if that work better (maybe use 8?).

I am also not understanding why your display does nothing. Does it work if you are using the displays independently (ie, one at a time only)? Have you tried that?

If each works by itself then they will work together (there is no interaction in the library if you create 2 Parola objects).
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: louwin on Feb 09, 2015, 01:00 am
Thanks for all your help, Marco.

I have deleted the non working videos off YouTube.

I am uploading a new video with everything working....  :D

http://youtu.be/N0L0AFqTkEs

If you (or anybody else) is interested.  It will be about an hour (from now) before it is available though.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Feb 09, 2015, 08:43 am
Just for the record on the bug reported in #347 of this forum.

It was caused by a faulty #define for the affected code
Code: [Select]
#if HW_REV_COL
instead of
Code: [Select]
#if HW_REV_COLS
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: li_fai on Feb 09, 2015, 09:19 am
When 1 display is connected. it can work!
But I add 1 more display , it cannot work ...
I have tried pin 10 to pin 8. It is the same. I  think it is not a hardware problem. Because I can display different words when serial monitor is not used.

How can I solve it?
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: louwin on Feb 10, 2015, 01:06 am
For anyone who maybe interested....

I changed the "Arbitrary pins" setup to the "SPI hardware interface" setup, swapped constructors and the cycle lapsed time went from 155 seconds to 124 seconds....   :D

A 25% improvement in timing.    :D

Sorry Mario. I made the change BACK as per your last message and the scrolling problem came back. I added an "S" after "COL" in both routines. ALL scrolling (and some other formations?) went back to the rightmost random blinking LEDs.

I killed the IDE, edited the change and reloaded the IDE, reuploaded the sketch each time. Scrolling text scrambled.

Re-applied the change and all is well again. I DON'T think I did it wrong????

SORRY   :(
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Feb 10, 2015, 02:25 am
@louwin - No problems. I think the actual code needs to be swapped as well ('<<' line swapped with '>>' line), as the previous error masked the problems.

Once I get the compliant hardware I will retest and recertify all the combinations. On a slow boat from China (HK) and should arrive at the end of the month.

Quote
A 25% improvement in timing
I am surprised that the speed improvement is so small, but it does show that the interface is running longer than the speed setting. At a given setting, especially when it is relatively slow, it should take the same time no matter which interface is used. You should retry the same test with the fastest possible speed setting to give a true indication of the difference.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: louwin on Feb 10, 2015, 06:11 am
Once I work out how to set/change the speed. I removed the UI as I never expected to use it.  ;)

I am working with the "Test" sketch....

I ordered 20 more modules now that I know the library works PERFECTLY....  :)    They are on the next "slow" boat from China....  12/03/15.  :(
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Feb 10, 2015, 11:24 am
@li_fai - the attached example program works fine for 2 separate lines. Easy to add more if needed.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: louwin on Feb 13, 2015, 02:30 am
Hi Marco, Me again....   :)

I have tried ALL the examples in your most excellent MD_MAX72xx library and thought I would move onto the ones in MD_Parola. I tried to find another thread but the search sent me back to this thread.  :(

I have a DS1307 RTC so I thought I would try Parola_Zone_TimeMsg.  My compile of the sketch failed because of the temperature sensor(?). So I changed that to (USE 0) then it failed because it couldn't find Font_Data.h.  I googled for this and the best I found was for Apple and Android.

So I commented out the #define of the library and the setFont reference and the compile/upload succeeded but presented me with a blank display.  :(

Could I please trouble you for a link to the Font_Data.h library? SHOULD it have worked without the font library? Probably not as there wouldn't be a font!?

Oh yes, I changed MAX_DEVICES from 10 to 8 too (all I have at the moment)  :(  (I have 24 more coming over the next month????)

As always, thanks for your beautiful libraries  :D
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Feb 13, 2015, 03:10 am
The new IDE version 1.6 right?

I saw the same problem with the font file error message the other day and will need to spend some time to work out why this is a difference between 1.56 and 1.6. No idea why this is happening at this stage, it was working fine before I upgraded the IDE.

Quote
So I commented out the #define of the library and the setFont reference and the compile/upload succeeded but presented me with a blank display.
Parola does not work too well without fonts!
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: louwin on Feb 13, 2015, 03:55 am
Yeah, suspected that but I was hoping there was a default font or something loaded (?)  :D

No, it WAS with 1.5 but I have updated to 1.6 and the error persists....  :(

*******
Parola_Zone_TimeMsg.ino:31:23: fatal error: Font_Data.h: No such file or directory
compilation terminated.
Error compiling.
********
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Feb 13, 2015, 08:23 am
Quote
Could I please trouble you for a link to the Font_Data.h library?
The file was omitted from the last release (v2.1). Now updated, so you can either

Sorry for the inconvenience.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: louwin on Feb 13, 2015, 09:01 am
No problem.  :D

Thanks Marco. :)
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: louwin on Feb 13, 2015, 02:17 pm
Tried all the examples in the MD_Parola library.

Very satisfying....

Did you realise the Parola_Zone_TimeMsg sketch doesn't work if you change the MAX_DEVICES from 10 to 8? With only 8 modules my display had no "HH" just "MM"  :(

Hopefully I will get a couple more modules in the next week?  :(

Anyway, thanks again for your marvelous libraries....   :D

I am now going to change all my sketches that use other libraries to use the MD_Parola library   :D
 
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: acestu on Feb 13, 2015, 06:54 pm
Hi,

I have bought 20 of the modules from Electro Dragon, however I can't find any info on the controller board with a pot that is in the video, on youtube, does anybody know anything about it ?

thanks
Acestu
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Feb 14, 2015, 03:23 am
Quote
I can't find any info on the controller board with a pot that is in the video
There is not much to this 'controller'. I have attached photos for your information.

The controller is basically a testing tool that I use for Parola/MD_MAX72XX where I need a few buttons and/or an analog value. The Arduino shield has momentary tact switches connected to DI 4, 5, 6, 7, 8, 9 (6 switches) and one pot connected to A5. The switches are all connected to be used with the INPUT_PULLUP specified for in the software. All the software examples using these inputs consistently.

The outputs for the matrix displays comes out to a 5 pin header. I have them hardwired to the Arduino hardware SPI interface, GND and +5V.

I also created short perfboard 'bridges' for labeling the buttons - see the photos. This is just simply because I can never remember what the buttons do!

Making it is really straightforward as it is just connections between pins and switches, header, etc. Nothing special.

Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: li_fai on Feb 15, 2015, 06:56 am
Hi, Marco

If I don't want to use End message line with a newline function, just print the words in the serial monitor. How should I change the program? If I delete (c == '\n') and choose no line ending, it cannot work.

struct LineDefinition  Line[] =
{
  { MD_Parola(11, 12, 10, MAX_DEVICES), "abc", false },
  { MD_Parola(11, 12,  9, MAX_DEVICES), "def", false }
};

On the above progam, what is "" "abc", false and "def", false ""means?

Also,I want to knows how many bits is send to the arduino? I have tested the "#define   BUF_SIZE   75" to "#define   BUF_SIZE   8" and delete the -2 (putIndex >= BUF_SIZE-2) to (putIndex >= BUF_SIZE). After that, I input "1234567890" in serial monitor, the  digital "9" will disappear. Why it will become it?
Thanks for your help :)
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Feb 15, 2015, 07:25 am
How does the program know when you have finished typing your message? At the moment that is when you type a new line. If you want some other condition then work out what it is an use that instead of looking for new line.

The data you are asking about is a static initializer for the Lindedefinition structure that is defined in the program. Look at the fields of the structure and you will match to ethe data one the same order.

The rest of your question does not make any sense. If you allow only 8 characters then how do you expect 9 to be shown. Please read about C++ character array strings on the Internet as you seem not to know about these.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: li_fai on Feb 15, 2015, 08:27 am
The rest of your question does not make any sense. If you allow only 8 characters then how do you expect 9 to be shown. Please read about C++ character array strings on the Internet as you seem not to know about these.
I am talking about I type 1234567890 then the serial monitor will show 12345678 on the first line and 0 on the second line the digital "9" is appeared.

May I know why the baud rate should set to 57600 this time?

But, why curMessage[BUF_SIZE] is defined as "abc" and "def"?
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Feb 15, 2015, 10:19 am
As you have changed the code I cannot tell you why the display is this way.

The values of the buffer need to be initialized to something. It could be anything you like.

Baud rate is set to be what it is. Change it if you want, it really does not matter.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Feb 19, 2015, 12:44 pm
Frequenters of this topic may be interested in this post (http://forum.arduino.cc/index.php?topic=301955). I did an experiment on current consumption for one of the Parola modules - uses much mess than I expected.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: li_fai on Feb 22, 2015, 04:28 pm
I have attached a video to you. I have load the scrolling_text_ML program and it scrolling like the video. How can I change the program scrolling from right to left?
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Feb 22, 2015, 10:00 pm
Quote
How can I change the program scrolling from right to left?
Here, we are back to a topic that has been covered many times in this thread and it relates to the type of modules you are using. You need to match the 'hardware' configuration of your library to the modules by setting the correct #define in the MD_MAX72XX.h file.

There is extensive documentation for this as part of the MD_MAX72XX library and a lot of discussion in this thread.

Looking back at this thread, you never told me what type of module you are using (NOT the LED display, but where did you buy/get the whole circuit board). This will help to understand what type of configuration you need to select. The video you posted does not allow me to see this.

You can also use the hardware configuration example program in MD_MAX72XX to try and help. Please use the latest of this as it is much better than the previous version.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Feb 23, 2015, 12:39 pm
Released version 2.6 of the MD_MAX72xx library. Now supports the hardware louwin highlighted in earlier posts (designated FC-16).

Changes from previous version:
- Improvements to HW_Mapper utility
- Added USE_FC16_HW for FC-16 display modules
- Added USE_OTHER_HW for user defined hardware configuration
- Fixed incorrect spelling for HW_REV_COLS in transformbuffer() & corresponding bug
- Added PrintText_ML example

Any problems please let me know.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: DanielIt on Feb 23, 2015, 01:00 pm
Hy Marco.Thnak you for such a great work you have done.I have used by now the version 2.5 and i just downloaded the last version,but as someone sad in an earlyer post i cannot find the Font_Data.h file in the example sketch.Neither this later version does not have it.Where can i get if from please?
Thank you very much.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: DanielIt on Feb 23, 2015, 03:19 pm
So sorry for the misunderstanding,i found the file now in the Parola library.I was looking into MD_MAX72xx library. It works ok with DS3231 chip,just have to buy an DHT11 chip now. Thank you Marco.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: louwin on Feb 24, 2015, 12:08 am
Hi Marco, Just a quick question about left scrolling (SCROLL_LEFT).

Is there anyway to continue the scroll until the last character of the message scrolls off the left hand side? In my sketch, the scroll ends when the last character (of the message) is visible on the right hand side.

I can achieve this effect by padding the message with 21 spaces on an 8 module display. I am now going to play with a 12 module display so I imagine the padding will have to be 32 space characters!?

If I ever get to a 16 module display the padding will be 42 characters   :(

Can you achieve this any other way? Or could you program  SCROLL_LEFT_OFF or something?  :D

I haven't updated to the latest version (yet) so maybe you have already addressed this?

As always, Thanks  :D
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Feb 24, 2015, 12:17 am
There should be no need to pad with characters. Left and right scrolling always roll off the display. The code knows that the scroll is completed when the display is 'empty'. You can see this happening on the YouTube video on my channel.

Latest update does not change any of this behaviour as it has been functional from the very first release.

Do you see this behaviour in the example programs as well or just in your code?
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: louwin on Feb 24, 2015, 06:28 am
Oh, okay....   Forgot to mention this behaviour is in displayText SCROLL_LEFT inFX  :)

I'd forget my head if it wasn't screwed on!?

Maybe I SHOULD use the scroll function instead if the displayText function!?   :smiley-eek:

Is this functionality intentional in displayText?

Thanks.  :)
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Feb 24, 2015, 07:07 pm
Quote
Is this functionality intentional in displayText?
Quoting from the documentation:
Quote
displayScroll: Easy start for a scrolling text display.
displayText: Easy start for a non-scrolling text display.
The reason that you are seeing scrolling with displayText is that you are putting spaces on the end. All the display functions need to take into account that you may be trying to display more text that will fit on the display (eg, you only have 2 matrix modules). For the scrolling function this is no problem, but for the 'print' type function what it does is display the initial text and then scroll across to display the rest and stop when that is on the display. If you add spaces to the end it will stop when all the spaces are displayed.

Bottom line is that if you want to scroll, use the displayScroll method, not a side effect of the displayText method.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: louwin on Feb 24, 2015, 11:49 pm
Thanks   :)

 I've replaced all the "displayText" with "displayScroll" except where I want the text to remain on screen while the pattern shows.

JFYI I fired up 12 modules (3 X 4 matrices) (after removing all patterns with ALL LEDs lit), I commented out any demo that lights all LEDs (768 in my case). I also reduced the intensity to 1 throughout. The current drawn PEAKS at 250ma (during Transformations) so it runs happily on USB power. This is on the MD_MAX72xx_Test sketch with a few of my patterns added.

The ONLY problem is switch on.  11 of the 12 matrices are fully lit and it peaks at about 600ma for a few seconds. I suppose nothing can be done about this?  :(  It has to be a design flaw!?

I tried to run with a USB 1A charger plugged into the 5V pin (on a Nano) but, I must have done something wrong, as it didn't run. I will try again during the weekend when I have more time  :D

Thanks Marco  :D
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Feb 25, 2015, 12:31 am
Quote
The ONLY problem is switch on.  11 of the 12 matrices are fully lit and it peaks at about 600ma for a few seconds. I suppose nothing can be done about this?
Expected. Imagine that you have a dam that has to fill up a irrigation channels (wires) and smaller reservoirs (capacitors) with water (energy). Once you open the floodgates there will be a rush that will settle down once the right levels are achieved through the system. The more storage you have the longer it takes and/or the higher the initial flow. In electrical terms it is called (I think) inrush current.

If you only have one 'entrance' then there will be a point at which the size of the channel (wire resistance) becomes a limiting factor. You can help alleviate this by providing more points of entry for flow. In your case, connecting the power pins at the 'other' end of the display to the power source may help.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: louwin on Feb 25, 2015, 01:04 am
Just quickly Marco....

Just updated the library to 2.6 and the TEXT is somewhat screwed....

ALL letters and numbers are inverted left to right.  In fact everything is inverted but, like in the arrow head display, it is NOT immediately obvious.

Sorry, back to the drawing board   :(

Connecting power to the other side will take a little time as I have 5 pin connector housings with all my connections to LED matrices but will try it the next time I can scratch myself  (rofl)

(Edited) Reverted to OLD version and everything is right again   :D

(Comment) I read somewhere that the MAX7219 should handle this by coming up in a startup mode???? but obviously NOT the fault of the library  :)

I was commenting on the fact that 11 of the 12 modules powered on FULLY lit not on the 600ma surge   :D

I suspect you have gone to bed....   :D

Panic over....   I updated the library and recompiled/reuploaded WITHOUT making ANY changes anywhere....  I suspect I have to change the USE_ options   :D

Will do so late tonight - badminton and babysitting before then....   :D

Goodnight.....    :D
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Feb 25, 2015, 01:32 am
Have you edited the new library header file to for your hardware config?
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: louwin on Feb 25, 2015, 09:05 am
Not yet....   Will do so later tonight.  :D

Out of curiousity I reread the MAX7219 spec sheet....  It says "Display Blanked on Power-Up"....  Maybe this applies to the original MAXs not the Chinese clones????   ;)

From spec....

Initial Power-Up
On initial power-up, all control registers are reset, the display is blanked, and the MAX7219/MAX7221 enter shutdown mode. Program the display driver prior to display use. Otherwise, it will initially be set to scan one digit, it will not decode data in the data registers, and the intensity register will be set to its minimum value.

Only applies to 7segment????
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Feb 25, 2015, 10:43 am
Display is blanked, but there are still a number of capacitors to charge up and the circuits need to be energised.

As far as I am concerned, the clone chips work just as well as the genuine article for the hobby purposes we put them to. There is a lot of elitism in the discussion about the MAX7219 but none of it seems to be founded in much fact.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: louwin on Feb 26, 2015, 12:50 am
In NO way am I suggesting anything, I am just trying to understand the claimed "blanking of the display on initial power up"?

I generally switch on my desktop and when it is up and I have logged in, I plug in my Nano with the 12 module display. The display (Nano) powers up with 9 or 11 or 12 modules fully lit.  How come the display isn't "blanked on power up"?

I am asking you as you have a LOT more experience in LED matrices than I have (probably more than anyone else has)! My desktop has powered USB ports (even when the desktop is switched off) hence I have to UNPLUG the Nano when I switch off the system.

I take your point "a number of capacitors to charge up and the circuits need to be energised" but why is (my) display NOT blanked on power up?  Am I doing something wrong?  Can I do things differently? Is this normal behavior?

Again I ask because I HAVE burnt out one Nano trying to drive an 8 module generic (faulty?) display  :(

My current setup with 12 modules and intensity set at 1 runs at a max 250ma (on my modified MD_MAX72xx_Test sketch) but peaks at 600ma on power on. Having burnt one I would hate to burn out any more :(

ALL my devices are clones so I cannot buy into the comparison of genuine and clones  :)

As always, Thanks Marco  :D
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Feb 26, 2015, 01:26 am
No explanation for what you see other than the modules are probably not getting enough power to properly initialise.

Mine come up 'dark' when they are powered up, but I use an external power supply (powered USB hub) and I hardly ever have more than 8 modules connected. I would consider that you have a power supply problem if the problem goes away if you use fewer modules, or if you add external power it goes away, or if you just power the modules with no Nano connected they come up blank.

Also bear in mind that the computer's USB power supply is only meant to provide about 200-250mA. Do the Nano specs allow for 600mA power supplied through the Nano, even if externally powered. Can't remember if the Nano has a voltage regulator on the board.

Honestly, these problems don't seem to be related to the Parola or MD_MAX libraries so it may be better to deal with them in a separate thread (as you have already).
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: wolverine270023 on Feb 28, 2015, 05:53 pm
// Mode keyswitch parameters and object
#define MODE_SWITCH 9 // Digital Pin
MD_KeySwitch  ks = MD_KeySwitch(MODE_SWITCH, LOW);
do doe sthe above two lines mean that initial state of switch is low that means it uses a pull down resistor???
can anyone explainn

http://arduinocode.codeplex.com/releases/view/120493
http://arduinocode.codeplex.com/releases/view/119934

link to sample sketch
https://drive.google.com/file/d/0BwYFcnabUdURWHUwZTJqZUp5c3M/view?usp=sharing
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: louwin on Mar 01, 2015, 04:13 am
The bad penny has turned up again....   ;)

I played with your example "MD_MAX72xx_Test", added other patterns etc. Very good place to start with the pleasures of diverse scrolling methods.  :D

After being suitably impressed I decided to make it 2 zones  :)  So I copied stuff off  "Parola_Zone_TimeMsg" and changed setup() to....

  P.begin(2);
  P.setInvert(false);
  P.setIntensity(1);
  P.setZone(0, 0, 7);//Don't need variability
  P.setZone(1, 8, 11);//so I hardwired....
  P.setFont(0, numeric7Seg);
  P.setFont(1, numeric7Seg);
  P.displayClear();
  P.displaySuspend(false);
  P.displayScroll("MD_MAX72xx library Test & Demo", LEFT, SCROLL_LEFT, 1);
  while (!P.displayAnimate()) delay(100);

I didn't change the displayScroll as the doc file suggests it will (should) work with Zone 0....  Correct?

I replaced ALL the "displayText(" with "displayZoneText(0,". I wasn't ready to do anything with zone 1 so didn't.

The "displayScroll " didn't work and none of the "displayZoneText" worked either.  :(

Have I over simplified the alteration or have I missed something?

Sorry to keep pestering you Marco  :(

BTW, I put a 4th zone into "Parola_Zone_Display" - no problems  :D
(******* impressive demo with 4 zones all doing their own things!)

Okay....   MUCH playing around arrives at....

"displayZoneText" WORKS with inFX "PRINT" and outFX "NO_EFFECT" ONLY (in MY modified sketch)....   Which is funny as ALL inFXs work in the "Parola_Zone_Display" example.   :o   So it MUST be something I am doing (or NOT doing!).  Sorry, also removed the setFont methods....   :D

MORE head scratching!   :smiley-roll-blue:

Is it something about P.displayAnimate() & P.displayReset()?

Forgive me....   C++ newbie
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Mar 01, 2015, 06:36 am
@wolverine
The initialiser for the library object says that the switch is considered ON (or pressed) when it is LOW. This means that it will have a PULL UP resistor. The library will already initialise the input using the INPUT_PULL_UP specifier when setting the pinMode. So all you need to do is wire a switch that connects to ground when pressed.

If you are going to be doing much in Arduino-land I would suggest that you should work out how to wire switches to the Arduino inputs. Lots of stuff on the web for this (simple Google), but here is a link to a reasonable tutorial Arduino Tutorial (http://thearduinoguy.org/?page_id=100)

I have also modified the Daft Punk example so that it can run without the switch. This will be in the code section of the codeplex site. It will be included in the zip file until the next full release.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Mar 01, 2015, 06:43 am
@louwin
Please see the documentation for displayScroll()
Quote
This method is a convenient way to set up a scrolling display. All the data necessary for setup is passed through as parameters and the display animation is started. Assumes one zone only (zone 0).
This function is really only there for backward compatibility.

Please use the displayZoneText() method as this replace both displayScroll() and displayText().

If you have code that does not work please post this code so I can see the entire piece.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: li_fai on Mar 01, 2015, 10:13 am
Thanks Marco.
When I load  the program, it will show strcpy(Line.curMessage, "Hello! Enter new message?");
If I enter number to the serial monitor, the led matrix display cannot update the message immediately. I see that    the LED display need to wait the strcpy message scroll to the end and then the new message would be updated.
When I enter number in the serial monitor, can it update the display immediately?
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Mar 01, 2015, 10:23 am
 The message gets updated when the program updates it. There is nothing automatic or magical. You should make an effort to understand the code and modify it. The change is not big so you should be able to do this.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: li_fai on Mar 01, 2015, 12:47 pm
I don't know how to understand your program :|
Which part is control the display font? How can the message sent to the serial monitor and then change to the font and display it on the LED display?
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: louwin on Mar 01, 2015, 03:00 pm
Code: [Select]
// Program to exercise the MD_MAX72XX library
//
// Uses most of the functions in the library
//

#include <MD_MAX72xx.h>
#include <MD_Parola.h>

// Define the number of devices we have in the chain and the hardware interface
#define modules         12
#define CS 10  // or SS

// SPI hardware interface
MD_MAX72XX mx = MD_MAX72XX(CS, modules);
MD_Parola P = MD_Parola(CS, modules);

#define DELAYTIME 50// in milliseconds
unsigned long lapsetime;
char curMessage [40];
uint8_t DC;// Store "mx.getDeviceCount"
uint8_t CC;// Store "mx.getColumnCount"
byte pattern;//Built up pattern area
int x; int y; int row; int rowp; int col; int r; int c; int z;
int point; int rc; int points[64];

#define Speed 25
#define Paws 100

textEffect_t effect[] =
{
PRINT,
SCAN_HORIZ,
SCROLL_LEFT,
WIPE,
SCROLL_UP_LEFT,
SCROLL_UP,
OPENING_CURSOR,
GROW_UP,
SCROLL_UP_RIGHT,
BLINDS,
CLOSING,
GROW_DOWN,
SCAN_VERT,
SCROLL_DOWN_LEFT,
WIPE_CURSOR,
DISSOLVE,
OPENING,
CLOSING_CURSOR,
SCROLL_DOWN_RIGHT,
SCROLL_RIGHT,
SLICE,
SCROLL_DOWN, };

void swon(int r, int c) {//Switch on LED @ (r,c) and save point
  mx.setPoint(r,c,true);
  if(point<64) {
    rc=r<<3; rc=rc|c; points[point++]=rc;
  }
  delay(5);
}

void swoff(int r, int c) {//Switch off LED @ (r,c)
  mx.setPoint(r,c,false); // turns off LED at col, row
  delay(5);
}

void ForwardWipe() {//Forward Wipe
  for(x=0; x<point; x++) {
    rc=points[x]; r=rc>>3; c=rc&0x7;
    swoff(r,c); delay(20);
  }
}

void ReverseWipe() {//Reverse Wipe
  for(x=point-1; x>=0; x--) {
    rc=points[x]; r=rc>>3; c=rc&0x7;
    swoff(r,c); delay(20);
   }
}

void Repeat() {
  for(x=0; x<point; x++) {
    rc=points[x]; r=rc>>3; c=rc&0x7; swon(r,c);
  }
}

void Reverse() {//Reverse Paint from memory
 for(x=point-1; x>=0; x--) {
   rc=points[x]; r=rc>>3; c=rc&0x7;
    swon(c,r); delay(10);
 }
}

void FlipRepeat() {//Flip row and col
  for(x=0; x<point; x++) {
    rc=points[x]; r=rc>>3; c=rc&0x7; swon(c,r);
  }
}

void FlipWipe() {//Forward Wipe
  for(x=0; x<point; x++) {
    rc=points[x]; r=rc>>3; c=rc&0x7;
    swoff(c,r); delay(20);
  }
}

void FlipReverseWipe() {//Reverse Wipe
  for(x=point-1; x>=0; x--) {
    rc=points[x]; r=rc>>3; c=rc&0x7;
    swoff(c,r); delay(20);
   }
}

void zigzag() {
  point=0; //clear save pointer
  for(row=0; row<8; row=row+2)
  {
    for(col=0; col<8; col++) swon(col,row);
    rowp=row+1;
    for(col=7; col>-1; col--) swon(col,rowp);
  }
  ForwardWipe();
  Repeat();
  ReverseWipe();
  FlipRepeat();
  FlipWipe();
  FlipRepeat();
  FlipReverseWipe();
}

//Double Xs
void XX() {
  point=0; //addr=random(nod);
  for(x=0; x<4; x++) {
    swon(x,x+1); swon(x+1,x);
    swon(x,6-x); swon(x+1,7-x);
    swon(7-x,6-x); swon(6-x,7-x);
    swon(6-x,x); swon(7-x,x+1);
  }
   
  ForwardWipe();
  Repeat();
  ReverseWipe();
}

//Diagonal fill towards the middle
void DiagFill() {
  point=0; //addr=random(nod);
  for(x=0; x<4; x++) {
    swon(x,x); swon(x,7-x); swon(7-x,7-x); swon(7-x,x);
    for(y=x+1; y<4; y++) {
      swon(y,x); swon(x,y);//First Quadrant
      swon(x,7-y); swon(y,7-x);//Second Quadrant
      swon(7-y,7-x); swon(7-x,7-y);//Third Quadrant
      swon(7-x,y); swon(7-y,x);//Fourth Quadrant
    }
  }
  ForwardWipe();
  Repeat();
  ReverseWipe();
}

void setup() {
  mx.begin();
  DC = mx.getDeviceCount();
  CC = mx.getColumnCount();

  P.begin(2);
  mx.setPoint(0, 0, true); delay(200);
  P.setInvert(false);
  mx.setPoint(1, 1, true); delay(200);
  P.setZone(0, 0, 7);
  P.setZone(1, 8, 11);
  mx.setPoint(2, 2, true); delay(200);
  P.setIntensity(0,1);
  P.setIntensity(1,1);
  mx.setPoint(3, 3, true); delay(200);
  P.displaySuspend(false);
  mx.setPoint(4, 4, true); delay(200);
}

void loop() {
  lapsetime=millis();
  mx.clear();

  P.displayZoneText(1,"HH:MM", LEFT, Speed, Paws, PRINT, NO_EFFECT);//Works!
  while (!P.displayAnimate()) delay(100);

  P.displayZoneText(0,"PRINT", LEFT, Speed, Paws, PRINT, NO_EFFECT);//Works!
  while (!P.displayAnimate()) delay(100);
  delay(1000);
 
  P.displayZoneText(0,"SCAN_HORIZ", LEFT, Speed, Paws, SCAN_HORIZ, NO_EFFECT);//Doesn't Work!
  while (!P.displayAnimate()) delay(100);
  delay(1000);

  P.displayZoneText(0,"@(0,0)", LEFT, Speed, Paws, SCROLL_LEFT, NO_EFFECT);
  while (!P.displayAnimate()) delay(100);
  delay(1000);
 
  // Demonstrates the use of setPoint and show where the (0,0) is in the display
  for (uint8_t i=0; i<ROW_SIZE; i++) {
    mx.setPoint(i, i, true);
    mx.setPoint(0, i, true);
    mx.setPoint(i, 0, true);
  }
  delay(DELAYTIME*5);
 
  P.displayZoneText(0,"ZigZags", LEFT, Speed, Paws, WIPE, NO_EFFECT);
  while (!P.displayAnimate()) delay(100);
  zigzag();
 
  P.displayZoneText(0,"Double X", LEFT, Speed, Paws, SCROLL_UP_LEFT, NO_EFFECT);
  while (!P.displayAnimate()) delay(100);
  XX();
 
  P.displayZoneText(0,"Diagonal", LEFT, Speed, Paws, SCROLL_UP, NO_EFFECT);
  while (!P.displayAnimate()) delay(100);
  DiagFill();
 
  P.displayZoneText(0,"Sml Spiral", LEFT, Speed, Paws, OPENING_CURSOR, NO_EFFECT);
  while (!P.displayAnimate()) delay(100);
  point=0; //clear save pointer
  for(x=0; x<4; x++) {
    row=7-x;
    for(col=x; col<8-x; col++) swon(col,row);//Top
    col=7-x;
    for(row=6-x; row>=x; row--) swon(col,row);//Right Side
    row=x;
    for(col=6-x; col>=x; col--) swon(col,row);//Bottom
    col=x;
    for(row=x+1; row<7-x; row++) swon(col,row);//Left
  }
  ReverseWipe();
  Repeat();
  ForwardWipe();
  Reverse();
  ReverseWipe();
  Reverse();
  ForwardWipe();

  lapsetime=millis()-lapsetime;
  sprintf (curMessage, "Lapsed Time %ld Seconds", lapsetime/1000);
  P.displayZoneText(0,curMessage, LEFT, Speed, Paws, SCROLL_LEFT, NO_EFFECT);
  while (!P.displayAnimate()) delay(100);
  delay(2000);
}


Okay....   Worked out how to include a code bubble(?)

If you run this code NONE of the "P.displayZoneText(0,..." methods work! The ONLY one that works is the first one to Zone 1. NONE of then to Zone 0 work!

If you go through and change ALL the inFXs ( SCAN_HORIZ, SCROLL_LEFT,  WIPE etc) to "PRINTs" then they will ALL work.

What am I doing wrong?  :(

Okay....   A ray of sunshine....   If I change the Paws value to 1000 the inFXs START to happen.  I'll try much higher values....  At 10000 most inFXs will happen but the PRINT one, for instance, "hangs" around for the 10 seconds.  Does this mean different Paws values for each inFX?  Speed doesn't appear to matter? ? ? ?  EVERY inFX has its' own Paws value(?) and they are VERY variable? ? ? ?

Okay, time for some shut-eye  :D 22:40 here down under  :D
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: wolverine270023 on Mar 01, 2015, 05:23 pm
@wolverine
The initialiser for the library object says that the switch is considered ON (or pressed) when it is LOW. This means that it will have a PULL UP resistor. The library will already initialise the input using the INPUT_PULL_UP specifier when setting the pinMode. So all you need to do is wire a switch that connects to ground when pressed.

If you are going to be doing much in Arduino-land I would suggest that you should work out how to wire switches to the Arduino inputs. Lots of stuff on the web for this (simple Google), but here is a link to a reasonable tutorial Arduino Tutorial (http://thearduinoguy.org/?page_id=100)
hey just wanted to say that i am doing arduino only for this project :D
so is it like this ?
[link] http://www.raywenderlich.com/?attachment_id=37942 [/link]

+5v-------(resisitor)(wire spilt into two)|-------- to virtual pin
                                                        |--------- to switch-------- gnd
image 2 of my understanding
https://drive.google.com/file/d/0BwYFcnabUdURR3B4cDgzeVgtMlk/view?usp=sharing
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: wolverine270023 on Mar 01, 2015, 05:40 pm
@wolverine

I have also modified the Daft Punk example so that it can run without the switch. This will be in the code section of the codeplex site. It will be included in the zip file until the next full release.
could u post it here or upload in a text ?? i can use it if the switch fails for me :/

and @marco_c Thank you for being helpful it means alot :D :)
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Mar 01, 2015, 10:24 pm
@wolverine
You can download from the codeplex site. Look in the source code section.

On the switch - if the Arduino internally sets PULL_UP (which the library does) then there is no need to add in a resistor. The resistor is already done by the microprocessor chip. Just wire up a switch that pulls the signal to ground.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Mar 01, 2015, 10:39 pm
The Parola library has been entered in a competition at ICStation - winner will be by popular vote. There are a number of other cool Arduino projects entered as well.

If you are interested in checking out the entries and/or voting, here is the link. The competition is open from 1st March to 31st March.

ICStation Forum Competition (http://www.icstation.com/competition/vote.php)
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Mar 01, 2015, 10:44 pm
@li-fai
Please see PM.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: wolverine270023 on Mar 02, 2015, 08:40 am
 https://drive.google.com/file/d/0BwYFcnabUdURR3B4cDgzeVgtMlk/view?usp=sharing  (https://drive.google.com/file/d/0BwYFcnabUdURR3B4cDgzeVgtMlk/view?usp=sharing)

So basically this diagram without the resistor everything else is fine ??
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: wolverine270023 on Mar 02, 2015, 08:43 am
The Parola a library has been entered in a competition at ICStation - winner will be by popular vote. There are a number of other cool Arduino projects entered as well.

If you are interested in checking out the entries and/or voting, here is the link. The competition is open from 1st March to 31st March.

ICStation Forum Competition (http://www.icstation.com/competition/vote.php)
will be voting it till 31st xD
thanks for helping me
Will give the credits when done with the project on youtube :D
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Mar 02, 2015, 09:12 am
Quote
So basically this diagram without the resistor everything else is fine ??
Yes correct. The resistor part is built into the microprocessor circuitry.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: louwin on Mar 02, 2015, 12:57 pm
Any thoughts on my modified sketch?  I've continued experimenting but can't get the displayZoneText to work reliably.

I've changed the PAUSE time to 10000, speed to zero, scattered a few "displayReset" and "getZoneStatus" methods around but can't get any inFXs apart from PRINT to work reliably.....   :(
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: wolverine270023 on Mar 02, 2015, 01:24 pm
Yes correct. The resistor part is built into the microprocessor circuitry.

thank you marco_c to update the max72xx library :D
i will keep voting your project till the competition ends :)
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Mar 02, 2015, 09:43 pm
Quote
Any thoughts on my modified sketch?
Busy at work so won't get to it any time soon.

Couple of things to note:
1. You declare 2 zones but seem to be using the first LED module for graphics while text is being displayed? This does not seem like a good idea. Better to declare 3 zones with the first being the single module you use for scribbling.
2. There is no need for all the delays in the code. While you are waiting for the animation to finish you may as well be waiting in an empty (nothing executing) rather than delay. The delay causes the processor to do nothing at all. Your animation timer is less tan the delay so you are effectively slowing the animation down for no reason.

I would also be trying to isolate the problem to the minimal set of code that causes the issue. All the other stuff in there takes time (which I don't have at the moment) for me to wade through to get to the problem.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: wolverine270023 on Mar 03, 2015, 04:23 am
Hey just onenlast thing
if u connect to max chips in series
like dout of one to din of other etc
then animations are transferred from one matrix to another
what if i connect them in parrallel ?
Both having common input from arduino
any suggestions in wiring and powering them ?
does parola work with any other size of matrices other than an 8x8 ???
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Mar 03, 2015, 05:37 am
Quote
what if i connect them in parallel ?
They all get the same message at the same time. You can connect different LD signals to the chips to discriminate between the different 'parallel' streams. Only the one with LD active will load. Just need to be aware that there may be a limit on the fan-out from the Arduino (ie one output has a limit on how many inputs it can feed). This will depend on current requirement for the input pins.

No difference in powering them and wiring should be the same as for normal inputs except you connect many of them.

Only works on 8x8 (MD_MAX72xx chips).
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: louwin on Mar 03, 2015, 06:37 am
Thanks for your comments Marco.

The graphics in the first module are just incidental. :). I translated them from setLED method in the LedControl library.  They're just a programming exercise I may use in a display to soothe my youngest grandson for his afternoon maps?

I've got most of the animations to work with a pause of 15000, I even got the displayScroll to work. :). But not reliably.  :(

For instance the first animation will work and the second not....  Then I play around add another animation maybe then the first wont work and the second will?  Even if I only actaully play with the 6th animation.

The code is unblocking right?  Hence I am waiting for completion as all my expected messages are sequential. :)

I notice your examples use ONE main process with sub processes controlled by "Switch" statements?

Mainly, I want to scroll a message and do something then scroll another message and do something else etc.  I am happy to wait for completion of each animation.  Is there a more reliable way to do this?

And work must always come first, been there, done that.  :D
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Mar 03, 2015, 11:38 am
@louwin
The displayAnimate() method will return
Quote
A 'true' value when one or more zones have completed their animation.
Zones that are not animated are, technically, completed and waiting for another animation to be started. So simply using the displayAnimate() loop when you have a number of zones is not the right way to test for animation completion. The construct has to be
Code: [Select]
  P.displayZoneText(zone, <other parameters>);
  while (!P.getZoneStatus(zone))
    P.displayAnimate();
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: louwin on Mar 03, 2015, 03:47 pm
Thanks, I'll try that tomorrow   :D

When you are awake, we're going to sleep (approximately)   :smiley-cool:

Been voting for Parola on ICStation (when I remember)  :)

Wednesday morning....

******* marvellous!  Pardon my French   :D  Works perfectly....   Will try the other inFXs now....   Changed my PAUSE 15000 back to 1000   :D

ALL inFXs perfect....   :D

SLICE WAS a bit slow (at 25) but when I changed the speed to zero....   Beautiful    :D

Thank you Mario....   :D
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: Pedro147 on Mar 03, 2015, 08:18 pm
The Parola library has been entered in a competition at ICStation - winner will be by popular vote. There are a number of other cool Arduino projects entered as well.

If you are interested in checking out the entries and/or voting, here is the link. The competition is open from 1st March to 31st March.

ICStation Forum Competition (http://www.icstation.com/competition/vote.php)
How about a big vote for Marco here. He has devoted a lot of time developing and improving Parola for us all to use. I's a great piece of software and Marco always goes above and beyond the call of duty to help us with any problems we have. The entry that is leading has 249 votes so we have a bit of catching up to do but it is possible with your help. Vote for Parola to win and vote often  8)
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: louwin on Mar 04, 2015, 12:15 am
In case you didn't notice - I edited my previous post - #477

ALL tests worked PERFECTLY   :D
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: Pedro147 on Mar 04, 2015, 03:23 am
Thank you Mario....   :D

I think that you will find it's Marco not Mario   :smiley-mr-green:
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: louwin on Mar 04, 2015, 11:22 am
Oops, sorry Marco....  It's this iPad, it can't spell....    :smiley-mr-green:
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: louwin on Mar 05, 2015, 09:41 am
Just in the last couple of days, when I plug my Nano on, the display (fully) lights 8, 10, 11 or 12 modules then switches on (7,7) and (6,6) then goes blank. No scrolling messages - nothing.I can upload the sketch 4 or five times with the same results. This is the setup routine....

Code: [Select]


void setup() {
  mx.begin();
  mx.setPoint(7, 7, true); delay(500);//DOES THIS
  DC = mx.getDeviceCount();
  CC = mx.getColumnCount();
  mx.setPoint(6, 6, true); delay(500);//DOES THIS

  P.begin(2);//SO STOPS SOMEWHERE IN HERE THIS METHOD<<<<<<<<<<
  mx.setPoint(0, 0, true); delay(500);//NEVER DOES THIS
  P.setInvert(false);
  mx.setPoint(1, 1, true); delay(500);
  P.setZone(0, 0, 7);
  P.setZone(1, 8, 11);
  mx.setPoint(2, 2, true); delay(500);
  mx.setPoint(3, 3, true); delay(500);
  P.setIntensity(0,1);
  P.setIntensity(1,1);
  mx.setPoint(4, 4, true); delay(500);
  P.displayClear();
  mx.setPoint(5, 5, true); delay(500);
  P.displaySuspend(false);
  mx.setPoint(6, 6, true); delay(500);
  P.displayScroll("MD_MAX72xx library Test & Demo", LEFT, SCROLL_LEFT, Speed);
  while (!P.getZoneStatus(0)) P.displayAnimate();
  mx.setPoint(7, 7, true); delay(500);

  //RTC.Control(DS1307_CLOCK_HALT, DS1307_OFF);
  //RTC.Control(DS1307_12H, DS1307_OFF);
  getTime(szTime);
  P.displayZoneText(1,szTime, CENTER, Speed, Paws, PRINT, NO_EFFECT);
}


Is there a problem with mx.begin() AND P.begin(2) together?

If I comment out the "P.displayScroll" and the following "while" and reupload, the sketch will work.  While it is working if I UNcomment those 2 lines and reupload the sketch keeps working.

If I switch off the desktop and unplug the Nano and then replug it then it blinks the 2 LEDs and stops again! Strange or what!?

Any ideas, Marco?

My understanding is sketches should work after unplugging and replugging!?
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Mar 05, 2015, 10:09 am
Quote
Is there a problem with mx.begin() AND P.begin(2) together?
YES

Can't mix Parola and MD_MAX72xx with the current version of the libraries.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: louwin on Mar 05, 2015, 03:17 pm
Oh!  That explains that then....   :)

So you can't use setColumn, setRow and setPoint etc when using Parola????

Wow! I HAVE been using them both extensively (as you can see in my "setup") and this "hang" was the effect....

Need a displayClear(uint8_t    z)  method or is there another way to clear a zone?

As always - thanks  :D
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Mar 05, 2015, 09:52 pm
Quote
So you can't use setColumn, setRow and setPoint etc when using Parola?
No. Parola is likely to rewrite the entire display, depending on the animation used. So the safest is to assume that Parola has complete access. If you want to mix text and graphics, you need to manage it all yourself and you can do that through just using the MD_MAX72xx libraries. There is an example of scrolling text display for that library.

Quote
Need a displayClear(uint8_t    z)  method or is there another way to clear a zone?
I thought there was. If there isn't there should be as an overloaded displayClear(). Will check over the week end. In the meantime just clear it by providing an exit animation from the zone - that will leave it clear.

EDIT: overloaded displayClear() has been added and will be in the next release. The method is available in the source code section for download now - MD_Parola.h is the only file affected.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: louwin on Mar 07, 2015, 03:44 am
I implemented the new source MD_Parola.h. It seems to highlight the non mixture of mx. and P. libraries. Whereas the only problem was a "hang" on startup, it now produces a lot of artifacts. I suppose your statement NOT to mix the libraries takes precedence so I'll drop it.

I started writing my Clock sketch. I have two zones setup, 4 modules and 8 modules. The time (HH:MM) on the left and the right is for scrolling messages.

When trying to display a LONG message (in my case more than can fit on 8 modules), the ONLY InFX that works properly is SCROLL_LEFT.

I tried SCAN_HORIZ, SCAN_VERT, SCROLL_UP_LEFT, OPENING_CURSOR and DISSOLVE, they ALL just display the first part of the message. This happens with NO_EFFECT as OutFX or with the InFX repeated as the OutFX.

I used "It's Mummy's Birthday today" as my test message. Only SCROLL_LEFT showed the whole message. All the others (that I tested) just show "It's Mummy's".

Oh yes! SLICE goes into an endless loop  :(

It displays the first part of the message then appears to clear the WHOLE display (including zone 1) and loops forever(?) showing the moving columns scan.

Sorry, the Parola library only seems to work with short messages? Unless (as usual) I'm doing something wrong?

As I see it, my option is to further develop the "scrollText" routine from the "MD_MAX72xx_Test" example. The development would be to cause the routine to complete the scroll off.

Oh yes, SCROLL_RIGHT also fully works but is impractical as you cannot read the message when the end of the message scrolls off  :(

Sorry to say, the only things I can use of the Parola library is the Zones logic and the SCROLL_LEFT effect  :(

Also, not using Parola and only using MD_MAX72xx, brings back the graphics functionality.

Sorry, Marco  :(
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Mar 07, 2015, 04:53 am
Quote
I tried SCAN_HORIZ, SCAN_VERT, SCROLL_UP_LEFT, OPENING_CURSOR and DISSOLVE, they ALL just display the first part of the message. This happens with NO_EFFECT as OutFX or with the InFX repeated as the OutFX.
So what other behaviour do you expect when the message does not fit the display? As far as I can see they behave logically - display what you can see and discard the rest.

Quote
Oh yes! SLICE goes into an endless loop
It shouldn't and program logic means that there is no way it could happen, but this may be a bug given the excess of text.
Edit: Bug fixed.

Quote
Sorry to say, the only things I can use of the Parola library is the Zones logic and the SCROLL_LEFT effect
I guess that you may be trying to do things that it is not meant for. You can always go back to first principles and use the MD_MAX72xx or even program the hardware directly. That gives you total flexibility.

Quote
Also, not using Parola and only using MD_MAX72xx, brings back the graphics functionality.
No surprise for me. Not meant to be used together.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: louwin on Mar 07, 2015, 04:03 pm
Don't get me wrong....

I WANT to use Parola but the messages I need to use are longer than Parola can handle with the other fancy effects so I will be confined to SCROLL_LEFT as In and Out Effects.

Alternatively, how difficult would it be to implement Zones and displayZoneText with ONLY SCROLL_LEFT effects in the MD_MAX72xx library?

Strangely, my Clock sketch uses ONLY Parola (with SCROLL_LEFT) and it doesn't run after uploading.  It ran when I first created it but, since switch off, it no longer runs   :(  I've commented out the mx.begin (//) and "/*...*/" the scrollText routine.  It compiles and uploads but doesn't run. I'll have to try Serial Monitor to see where it stops....
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Mar 07, 2015, 08:17 pm
Quote
Alternatively, how difficult would it be to implement Zones and displayZoneText with ONLY SCROLL_LEFT effects in the MD_MAX72xx library?
There are already examples for scrolling in MD_MAX72xx and zones are supported at this level as well.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: DanielIt on Mar 10, 2015, 10:20 am
Hey guys! I received my other 16 matrices from china some days ago and i had some fun playing with them.The longest chain i made was from 16 pieces and using for them a 47k resistor for current set.If i use more than 10 modules i always have to push the reset button on arduino after power up or i get garbage on all of them.Overall for the price it is ok,all working. I have 2 questions that i have trouble with.

1: i use the Parola_Zone_Time_Msg example on 10 matrices and is working fine,however i run into problems with the DHT11 sensor.Using the library for the sensor with some demo code it is working ok,using it with the entire parola code after i upload the code it is always working ok,after an power reset the DHT11  get into timeout error always.After long web researches i found that there is a problem with this sensor because of timing,you have 100us to reread the sensor,otherwise it goes into timeout.The code whe i upload it says almost 29kB,close to the arduino limit,so i suspect the entire code is taking too long to run,am i right?

2:I would like to try to put 8 blocks on top of another 8 and run parola on double hight fonts,is that possible? Anyone have any kind of example code i can look at to get me starting?

Thank you
Bless

Daniel.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Mar 11, 2015, 08:12 am
Quote
2:I would like to try to put 8 blocks on top of another 8 and run parola on double hight fonts,is that possible? Anyone have any kind of example code i can look at to get me starting?
Yes it is possible technically but I have not seen anyone do it yet. There has been some discussion in this thread and in other places about this but I have not seen any conclusion yet.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: louwin on Mar 12, 2015, 11:39 am
JFYI Marco,

I used the MD_MAX72xx library only to display hours and minutes in the left 4 modules (zone 1) and a scrolling message in the right 8 modules (zone 0).

I added....

  for(i=0; i<64; i++) {
    mx.transform(0, 7, MD_MAX72XX::TSL);
    delay(25);
  }

to the end of "scrollText(..) " (from MD_MAX72xx_Test) to completely scroll off the left hand side (as per your suggestion). Thanks....

Parola functionality without using the Parola library.

Thanks  :D
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: sausiang89 on Mar 13, 2015, 06:37 am
Hi,
i have a matter that my 8x8 modules should be like "1,2,3,4" , but it become "4,3,2,1" when i join it by mini jumper , i have to rearrange by using long jumper , is it any option to fix it instead of rearrange the cube manually

I have tried to modified in md_max72xx_lib.h but still can't get it
Code: [Select]
#define HW_DIG_ROWS 0
#define HW_REV_ROWS 1
#define HW_REV_COLS 1



Sorry for my bad english
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Mar 13, 2015, 10:22 am
Please post link to where you bought the modules so I can see what they are.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: sausiang89 on Mar 13, 2015, 11:30 am
Please post link to where you bought the modules so I can see what they are.
i bought from here, thanks in advance

http://item.taobao.com/item.htm?spm=a1z09.2.9.53.Eu0UCU&id=41066306557&_u=do1dfsu35d0
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Mar 13, 2015, 11:33 am
So flip the line of modules 1234 to be 4321 and change the mapping in the header file so it works correctly.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: Clement04 on Mar 18, 2015, 06:02 pm
Released version 2.6 of the MD_MAX72xx library. Now supports the hardware louwin highlighted in earlier posts (designated FC-16).

Changes from previous version:
- Improvements to HW_Mapper utility
- Added USE_FC16_HW for FC-16 display modules
- Added USE_OTHER_HW for user defined hardware configuration
- Fixed incorrect spelling for HW_REV_COLS in transformbuffer() & corresponding bug
- Added PrintText_ML example

Any problems please let me know.
I just tried the new version of the library, and I confirm the bug I reported in #347 seems to be fixed. Thanks Marco!
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: Clement04 on Mar 19, 2015, 08:15 am
Also, I don't have the problem of the text slowing down anymore, so maybe it was a power supply-related issue or something like that.

EDIT: This problem occurs when MAX_DEBUG is set to 1 in MD_MAX72xx_lib.h. I guess this is normal somehow.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Mar 19, 2015, 11:15 am
MAX_DEBUG turns on lots of messages on the serial port so it would slow it down a lot.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: Clement04 on Mar 19, 2015, 11:17 am
Yes, I saw that. I had set it to 1 when debugging the initial bug. And the old library was still loaded in my environment, instead of the new one. Anyway, everything works fine now, thank you.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: Clement04 on Mar 20, 2015, 02:55 pm
Marco, is the problem with Arduino IDE 1.6 solved or not yet?
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Mar 20, 2015, 11:07 pm
Quote
Marco, is the problem with Arduino IDE 1.6 solved or not yet?
What problem?
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: Clement04 on Mar 21, 2015, 08:26 am
The problem you refer to in post #425.
I didn't try it, but I was wondering if I should wait a bit before upgrading or not.
Thanks
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Mar 21, 2015, 09:00 am
That was an error of a header file missing in the example. Not related to the IDE version.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: Clement04 on Mar 21, 2015, 10:32 am
Ok, perfect, then. Thanks.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: li_fai on Mar 28, 2015, 08:46 am
Where is the Line.P.displayScroll function in library?
I can't find it
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Apr 01, 2015, 12:45 am
Just uploaded the latest version of the library (v2.2), consolidating recent changes:

Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: sausiang89 on Apr 16, 2015, 01:42 pm
Please post link to where you bought the modules so I can see what they are.
Hi , i am making a countdown timer with your library in 4pcs max7219 modules, i have a question  how to duplicate the same display to another 4pcs max7219 modules ?
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: Clement04 on Apr 16, 2015, 07:21 pm
Hi , i am making a countdown timer with your library in 4pcs max7219 modules, i have a question  how to duplicate the same display to another 4pcs max7219 modules ?
Hi,
Did you try wiring it in parallel?
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Apr 16, 2015, 09:41 pm
Quote
how to duplicate the same display to another 4pcs max7219 modules
You will need to explain this as clearly duplicating means that you just repeat everything for the second display, which does not need a question.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: sausiang89 on Apr 17, 2015, 07:14 am
You will need to explain this as clearly duplicating means that you just repeat everything for the second display, which does not need a question.
Yes , just repeat everything for second display, what to do ? i am new in arduino , seems cant connect 2 set of display in the same pin right ? sorry for noob question
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: sausiang89 on Apr 17, 2015, 07:16 am
Hi,
Did you try wiring it in parallel?
i googled it last night, parallel mean connect the second display to the last module of first display ?
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: CrossRoads on Apr 17, 2015, 07:24 am
Parallel would be connecting the clock pins of both groups together, and the serial data, and the chip select, and power, and gnd. Then both groups receive the same data at the same time and both outputs update at the same time.

You could also do it serially, connecting the second display to the last module of first display, and then send out the same data twice. Overall update speed is then slower as twice as much data goes out. Whether that matters or not depends on the application. 
Updating a display once a second? Not a problem.
Updating a moving display? The refresh rate would drop in half, which would likely be noticeable.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: sausiang89 on Apr 17, 2015, 08:00 am
Parallel would be connecting the clock pins of both groups together, and the serial data, and the chip select, and power, and gnd. Then both groups receive the same data at the same time and both outputs update at the same time.

You could also do it serially, connecting the second display to the last module of first display, and then send out the same data twice. Overall update speed is then slower as twice as much data goes out. Whether that matters or not depends on the application. 
Updating a display once a second? Not a problem.
Updating a moving display? The refresh rate would drop in half, which would likely be noticeable.
i will try this later, thanks in advance
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: sausiang89 on Apr 17, 2015, 09:15 am
You will need to explain this as clearly duplicating means that you just repeat everything for the second display, which does not need a question.
i solved it by using parellel two display in same pin from begin , the issue is jumper cable problem, i change new one and it work, thanks for helping
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: louwin on Apr 28, 2015, 02:09 am
Hi Marco JFYI  :)

I bought a 4 modules by 4 modules display (i.e. 32 LEDs by 32 LEDs) off eBay (just as a programming exercise). The 16 displays are wired sequentially, 128 columns and 8 rows. I suppose they couldn't be wired otherwise.  ;)

I wrote a "wrapper" to setPoint to work in 32X32 mode okay. I needed a drawLine routine for my configuration so I copied your routine out of the MD_MAX72xx library.

The following code (in the routine) is unnecessary

Code: [Select]

  if (r1 >= ROW_SIZE || r2 >= ROW_SIZE || c1 >= (COL_SIZE*_maxDevices) || c2 >= (COL_SIZE*_maxDevices))
    return(false);

  if (c1 > c2)
  {
  uint16_t t;
  t = c1;   c1 = c2;   c2 = t; // swap c1/c2
  t = r1;   r1 = r2;   r2 = t; // swap r1/r2
  }



In fact it makes the point with the higher column co-ordinate the "starting" of the line.

Bresentham's line algorithm (correctly) allows for any positions of the "starting" and "ending" points so there is no need to swap the points.  :D

Anyway, like I said, JFYI  :)

As always, thank you for your library.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Apr 28, 2015, 02:27 am
Can you post a link to the 32x32 display on eBay? Could be an interesting application of the library for others as well.

I don't expect that the Parola library works too well with the text as it would scroll in a strange order, though.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: louwin on Apr 28, 2015, 10:56 am
Here you are Marco.  :D

http://www.ebay.com.au/itm/291318806032?_trksid=p2060353.m1438.l2649&ssPageName=STRK%3AMEBIDX%3AIT

The MAX72xx library works well with the display, once you amend the addressing mechanism. I haven't tried Parola as, like you say, the scrolling would be a bit hectic....

As I said, I wrote a wrapper that addresses (0,0) to (31,31), has an optional argument which an optional delay and another that is true or false so the wrapper can switch ON or OFF the LED at (row,col).
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: wabbitguy on Apr 28, 2015, 05:02 pm
I have some of those modules from G&C but I use them in a single line (8 x 128) with the Parola library.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: louwin on Apr 29, 2015, 02:20 am
I also have 20 modules (5 groups of 4) setup where I use both libraries together - Parola AND MD_MAX72xx. I know, not recommended! but works fine for me.

Then I have 3 clocks with 12 modules (3 groups of 4) each running just the MD_MAX72xx library. I expect to build 6 clocks as each grandchild's birthday approaches   :)

I also have 4 single FC16's and 4 single NEW modules with yellow connectors ready to play with. I am thinking of building a 40X40 display  :(

Finally I have 20 old generic modules. These seem to use MUCH more current so I tend not to play with them.  They burnt out one of my Nano MCs by drawing too much current.  :(

And in case anyone is interested, the burnt Nano works fine with external power   :D
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: wabbitguy on Apr 29, 2015, 06:50 am
I have 22 or 24 of the Parola modules, about 8 or 10 of the G&C and a few others of similar design. I built a few clocks for family from the Parola ones that double as message boards (connected via Bluetooth):

Parola Clock (http://www.wabbitwanch.net/blog/?p=890)

But I've never tried to make a huge matrix of those 8x8 displays. They're pretty legible at the 32mm size from 20-40 feet...I think if I wanted to go big, then I'd probably use something like WS2812's because I have a box full of them... :)

Even the last clock I built was a word clock and in that I used a 112 WS2812's for the words.

The Parola modules I have on hand here I put together when there's sports play off games on TV so we can "heckle" the rest of the family that comes over for the game... :smiley-twist:
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: cumali_04 on May 04, 2015, 10:17 am
hello marcelo.I'm a university student.my project:To create a scrolling text and animations with DOTMATRIX 7219.I'm stuck in some places to help you excuse me I'm new in the arduino.my first question :Ğ,Ş,ğ,ş How do I add letters.Thank you :)
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: cumali_04 on May 04, 2015, 10:19 am
hello marcelo.I'm a university student.my project:To create a scrolling text and animations with DOTMATRIX 7219.I'm stuck in some places to help you excuse me I'm new in the arduino.my first question :Ğ,Ş,ğ,ş How do I add letters.Thank you :)
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on May 04, 2015, 01:54 pm
Look at the entry #98 in this forum.

Read the documentation for MD_MAX72xx library and use the SetFont utility that is in the distribution.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: louwin on May 10, 2015, 03:08 am
Hi Marco, I have a question that I hope, with all your experience with LED modules, you may have come across.

At the moment I have three projects running with the MD_MAX7219 and Parola libraries. A 12 module clock(running the MAX library only), a 24 module scroller(running both libraries together) and a 16 module(4 by 4) display running only the MAX library.

They are all plugged into a hub connected to a 2A USB wall charger (no connection to my desktop).  Power is connected directly to the 5V pins (and GND to GND). All run on Nanos. All FC-16 modules. Total draw is 600mA (well within acceptable limits)  :)

On mains switch on the clock and scroller initialize and run perfectly. The 4 by 4 always has an artifact on the display   :(

For instance, at the moment, the bottom left 3 modules are FULL on. 96 LEDs on full intensity. Messages scroll, patterns are displayed, display cleared etc but those 96 LEDs remain lit.

Pressing the "Reset" button very occasionally does clear the display but usually doesn't. Re-uploading the sketch always clears the artifacts. This is my setup method....

Code: [Select]
void setup() {
  mx.begin();
  mx.control(MX::INTENSITY,0);//Zero works  :)
  mx.clear();//DOESN'T clear the "switch on" artifacts
}


Is there anything I can program to clear the artifacts?  A "Hard Reset" to the MAX chip(s)? As you can see, "begin & clear" don't clear them.  :(

I don't do anything different with the clock and the scroller and they don't have "set" artifacts  :)  Well! nothing that the "mx.clear" doesn't clear.

What does re-uploading the sketch do that the "Reset" button doesn't?

I think I asked a similar question earlier.  ;)
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on May 10, 2015, 03:20 am
Aside from the bug in the initialisation code (which was fixed some time ago), errors like this are usually power problems that I have seen happen when there is insufficient capacitance on the boards to provide smooth power to the displays (eg, someone wires a breadboard and takes shortcuts by leaving out caps).

Do the 4x4 modules have capacitors on the boards? Can't tell from the eBay pictures.

Things to try -
- Are the 7219 chips socketed? If so, remove and push the chips back in.
- Do the the same problems persist when you disconnect 1, 2, 3 of the displays in the 4x4? looks like they are standard FC16 with jumpers between that can be removed.
- If you just run the matrix off the hub, does the problem persist?
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: louwin on May 11, 2015, 02:39 am
Just quickly as on my way to the panelbeaters. :(

The 7219 appears surface mounted and there are SMD R1 and C1 on the board. Basically the display is 4 lots of 1X4 on one still connected PCB. They are arranged so

3 2 1 0
7 6 5 4
1110 9 8
15141312

3 connected to 4, 7 to 8 and 11 to 12 from factory.  The main IN pins were not supplied nor connected.  I had to solder them myself. Also there are NO intermediate micro jumpers as the connection lines span each module.

I think the 4 by 4 displays are an after thought not a design?  I think someone on the production line said "let's leave 16 of them connected and see if they will sell!?"

I like the 4 by 4, pity the artefact problem. :(    Connecting 16 modules into a 4 by 4 display would have been a nightmare.

I'm reading up on "setBuffer" to see if I can clear the display by setting all the buffers to zeroes????  I suspect not though....

Thanks for your response. :)

I haven't tried breaking the connections etc
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on May 11, 2015, 03:13 am
In other words they do not look like the link you supplied earlier :(
http://www.ebay.com.au/itm/291318806032?_trksid=p2060353.m1438.l2649&ssPageName=STRK%3AMEBIDX%3AIT (http://www.ebay.com.au/itm/291318806032?_trksid=p2060353.m1438.l2649&ssPageName=STRK%3AMEBIDX%3AIT)
because with that setup you could at least isolate the rows.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: louwin on May 11, 2015, 04:18 am
Sorry, I misled you.  EXACTLY like the link just NO micro connectors between the internal modules. You know, the 12 banks of 5 connectors between modules.

I have 12 groups of 4 modules, 2 groups have micro connectors and 10 groups don't....  And the 4 by 4 doesn't.

After my message yesterday I actually got artifacts from uploading the sketch a couple of times. :(

I modified your demo and added LOTS of patterns.  My sketch now uses about 27Kb so only have about 3Kb left.  Might have to replace the Nano with a Mega to add more patterns.  The sketch runs for about 6 minutes now.

The artifacts on the clock and scroller are generally a few (to all) consecutive modules being fully lit at full intensity and they get cleared okay. I worry because, the clock for instance, uses about 200mA normally but could use 6 times that (1200mA) on switch on.   :(   Enough to burn out a Nano....   :(

But on the 4 by 4, the artifacts are set various patterns like squares of fully lit LEDs that survive 'clears' and the LEDs in the artifacts do NOT turn on or off....   :(

I'll try the "arrow" transformations to clear the display when I get home, using "setBuffer"????
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: li_fai on May 11, 2015, 06:59 am
What should I input to show Full Block to the display if I use your system font?
5, 255, 255, 255, 255, 255, // 255 - 'Full Block'
Do you have a program which is display the font only? This means I don't want any effect to the font, just display the font steadily.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on May 11, 2015, 08:33 am
@li_fai - the MD_MAX72xx test example shows all the characters in the font as the last item of the test cycle.

Full block is ASCII character 0xff or 255.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: louwin on May 11, 2015, 02:33 pm
JFYI, I just plugged the 4 by 4 into a USB port on my desktop and the bottom 4 modules and the 2 left ones on the third row came full on. While the desktop was loading Windows 8.1 etc a dozen patterns with as many "mx.clears's" were actioned by the sketch with the artifacts remaining on the screen.

Windows MUST do something on loading as the display froze and reset....   ALL artifacts cleared  :)

I wonder what Windows does?       :o   to clear the artifacts?

With the artifacts on the screen, 370mA was used.  Normal running peaks at 150mA with ALL (1024) LEDs lit at intensity zero.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: li_fai on May 16, 2015, 08:29 am
Marco, do you have a program that display scrolling text in first line and display the temperature and time in second line program?

Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on May 16, 2015, 09:46 am
No. Someone else may have one or you could adapt one of the other examples.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: li_fai on May 17, 2015, 10:05 am
Marco, Why I set the Date to 17 May 2015 and Sunday. The Matrix display will scrolling 17 May 2015 and Saturday ? What's wrong with it?
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on May 17, 2015, 01:48 pm
As you have not provided software I really can't comment except to say that the Parola display is clearly working so this problem may be better shared in the programming forum.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: carlosdefreitas on May 20, 2015, 03:38 pm
Parola_Zone_Mesg.ino:7:23: warning: MD_Parola.h: No such file or directory
In file included from Parola_Zone_Mesg.ino:8:
C:\Program Files (x86)\Arduino\libraries\MD_MAX72xx/MD_MAX72xx.h: In member function 'bool MD_MAX72XX::update(MD_MAX72XX::controlValue_t)':
C:\Program Files (x86)\Arduino\libraries\MD_MAX72xx/MD_MAX72xx.h:630: warning: no return statement in function returning non-void
C:\Program Files (x86)\Arduino\libraries\MD_MAX72xx/MD_MAX72xx.h: In member function 'bool MD_MAX72XX::wraparound(MD_MAX72XX::controlValue_t)':
C:\Program Files (x86)\Arduino\libraries\MD_MAX72xx/MD_MAX72xx.h:655: warning: no return statement in function returning non-void
C:\Program Files (x86)\Arduino\libraries\MD_MAX72xx/MD_MAX72xx.h: In member function 'bool MD_MAX72XX::update(uint8_t)':
C:\Program Files (x86)\Arduino\libraries\MD_MAX72xx/MD_MAX72xx.h:748: warning: no return statement in function returning non-void
Parola_Zone_Mesg.ino: At global scope:
Parola_Zone_Mesg:22: error: 'MD_Parola' does not name a type
Parola_Zone_Mesg.ino:51: warning: deprecated conversion from string constant to 'char*'
Parola_Zone_Mesg.ino:51: warning: deprecated conversion from string constant to 'char*'
Parola_Zone_Mesg.ino:51: warning: deprecated conversion from string constant to 'char*'
Parola_Zone_Mesg.ino:51: warning: deprecated conversion from string constant to 'char*'
Parola_Zone_Mesg.ino:51: warning: deprecated conversion from string constant to 'char*'
Parola_Zone_Mesg:55: error: 'textEffect_t' does not name a type
Parola_Zone_Mesg.ino: In function 'void setup()':
Parola_Zone_Mesg:88: error: 'P' was not declared in this scope
Parola_Zone_Mesg.ino: In function 'void loop()':
Parola_Zone_Mesg:103: error: 'effect' was not declared in this scope
Parola_Zone_Mesg:103: error: 'ARRAY_SIZE' was not declared in this scope
Parola_Zone_Mesg:109: error: 'P' was not declared in this scope
Parola_Zone_Mesg:109: error: 'LEFT' was not declared in this scope
Parola_Zone_Mesg.ino:119: warning: operation on 'curZone' may be undefined
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on May 20, 2015, 10:53 pm
@ carlosdefreitas - There is no question in your post but I assume that you have problems getting the library to compile.

Instructions for installing the library are where you got the libraries (https://arduinocode.codeplex.com/).
 
Make sure that your IDE is the latest (1.6.x) and for the Arduino IDE to be able to find and use them, these libraries should be uncompressed and placed in a libraries subfolder of your sketchbook folder.

To manually install the libraries:
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: Herone on May 23, 2015, 11:16 am
Hi Marco! First of all I want to thank you for all your work. This library is awesome!

I want to use a led matrix to make a simple user interface to give feedback to user in a project that I'm working on. It's based on a rotary encoder. When the encoder is turned right, it must show + on the led matrix, when turned left, -.

I've made a couple of functions to handle animation, but with function 1 the encoder value doesn't increase/decrease and both animations are shown, so I think it won't work. With function 2 the animation doesn't display but the encoder value works right.

Function1 is:

void anim() {

  do {
    P.displayAnimate();
  } while (!P.displayAnimate());
  P.displayReset();
}

Function 2 is:

void anim1(){
  P.displayAnimate();
 
  if (P.displayAnimate()){
    P.displayReset();
  }
}


Also, I've previously set what will be animated. i.e: for turning right:

    P.displayText("+", CENTER, SPEED_TIME, PAUSE_TIME, effect[WIPE], effect[WIPE] );

Right now I've set SPEED_TIME = PAUSE_TIME = 50 as global variables.

So, my question is: How can I make it to work right? I was thinking about using an attiny45 or 85 to handle animation, but when I try to compile the sketch it show compilation errors ( you can check them in this file: https://gist.github.com/LuisDiazUgena/8641a18cb7960208874f ).

Is there any way that I can make it work with Attiny or make it work with my current board ( uno ) ?

You can view my code at https://github.com/LuisDiazUgena/Oh-Controller

Thanks so much!

Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on May 24, 2015, 11:15 pm
@Herone - You seem to want to just display a + or - on one matrix module. Parola is not the right tool for this because the code needed for the animations is not used and is taking up valuable code memory. You should just use the MD_MAX72xx library and a variation of the ASCII display test in the example code. You solution using a different library is basically the same idea.

Good luck with your project.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: Herone on May 26, 2015, 11:16 am
Thanks Marco. I've tried Led_Control library and works well.

Also, I'll keep using Parola to run custom animations in others project.

Will be great if we can be able to use Parola with Attinys, would you add support sometime for them?
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on May 26, 2015, 11:18 am
I don't think that the ATTiny needs any special support. What do you think is missing?
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: roamer on Jun 05, 2015, 03:35 pm
Hi Marco, I have a strange problem with Parola hardware. When I run the exampel code all leds on the matrix lights up like this.
I have no idea of what is going wrong. Any clue ?

Regards Ronny
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Jun 05, 2015, 08:30 pm
The dropbox link is not working. You need to generate a link rather than copy the URL from the browser. Or just attach the image as a file to the post.

Check that the connections between Arduino and the display are correct. Check that the software setup matches the pin numbers you are using.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: roamer on Jun 06, 2015, 04:57 pm
Ok. I hope this vill work.
Hi Marco, I have a strange problem with Parola hardware. When I run the exampel code all leds on the matrix lights up like this.
(http://i304.photobucket.com/albums/nn169/roamerP/Parola_zps5ehybwv3.jpg) (http://[URL=http://s304.photobucket.com/user/roamerP/media/Parola_zps5ehybwv3.jpg.html)]Parola Matrix[/url]
I have no idea of what is going wrong. Any clue ?

Regards Ronny
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Jun 07, 2015, 01:54 am
Matrices the correct type and/ or plugged in correctly?
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: roamer on Jun 07, 2015, 09:14 am
Yes  common anode and yes they are plugged in correctly. When I run the scrolling examle the leds turns on as in the picture but I can see that there is a scrolling motion in the leds but I can't see what it is. I hope you can understand what I mean.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Jun 07, 2015, 10:04 am
Have you checked connections as suggested earlier?

Does it work with fewer boards (just 1?) and if there is a different configuration as the first board?

Sure there are no manufacturing defects in the boards - shorts or other circuit bridging? This is unlikely but with checking.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: roamer on Jun 10, 2015, 07:46 am
Hi again Marco, I was wrong with the dot matrix  :( . They are common cathode. Can I use them with Parola HW?

Regards Ronny
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Jun 10, 2015, 08:30 am
Quote
They are common cathode. Can I use them with Parola HW?
Not with the way the hardware setup/wiring is configured on the PCB. You need common anode.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: wabbitguy on Jun 10, 2015, 09:04 am
Vancouver BC just finished it's 2015 Maker Faire (June 6 & 7). For our Makers booth, I used 24 Parola modules and mounted them in a routed out piece of pine planking.

(http://www.wabbitwanch.net/sgphotos/Parola_FVMakers.png)

The face plate is 36" long:

(http://www.wabbitwanch.net/sgphotos/Parola_FVM_Sign.png)

I had two static messages and one programmable one. The programmable one would scroll, whereas the static ones would appear and exit with some fx. For programming I used a USR 232WiFi-T as an AP. To update the message, all that was needed was Telnet.

The control box mounted on the back with stand offs, DC-DC buck converter, USR Wifi, and Arduino Pro MINI.

(http://www.wabbitwanch.net/sgphotos/Parola_FVM_CTRL.png)

The funny part was that all of the other maker groups just assumed it was a commercial sign...
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Jun 10, 2015, 09:27 am
That is impressive. Did you get any video?
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: wabbitguy on Jun 10, 2015, 05:48 pm
If you mean video of the sign in action, nope. I don't even have the sign at this moment because I forgot to take it when we broke down the booth on Sunday night. I'll be picking it up from the Maker Space on Friday night though.

Truthfully I'm not much of a videographer. I grew up with a still camera, not a movie camera so I pretty much suck at doing videos. Really. I just don't see or think "video"... Heck I don't even own a cell phone...old skool.

I don't recall any of the local media filming our booth either. A few outlets took various stills from the event (never seen any of our booth). And I'll wager you couldn't walk 60 feet without watching yet another 3D printer in action. Matter of fact if there were any more 3D printers there we were going to have to start a spraying program to keep them from spreading.

Vancity Buzz - Faire Photos (http://www.vancitybuzz.com/2015/06/hundreds-flock-vancouvers-mini-maker-faire/)

Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: nikomaz on Jun 14, 2015, 06:06 am
Hi!
I can't find the way to use special characters added to the font.cpp
like:
Sad Smiley, Happy Smiley, Heart, Diamond, etc.
I mean, When i send the HEX code from terminal, it appears just random symbols.
What im doing wrong?
How can i get the hex or acsii symbol to send the corresponding character?
I used these: ☻♥♦♣☺ using an hex - ascii converter giving me : 01 e2 99 a5 in HEX
But just random symbols appears.
I tried to convert 1 - 2- 3 - 4 - 5 from decimal to hex and can get any code.
Do u understand?
Regards!
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Jun 14, 2015, 09:21 am
Quote
But just random symbols appears.
Any random of the same random for each character?

Characters from the serial monitor come through as ASCII characters. If you are typing 'FF' for hex oxff, then you will get the ASCII characters 'F' and 'F', not ascii FF.

If you want to send the actual ascii characters through the port you can do that using terminal software that support the ability to do that (from the computer end) or you write code on the Arduino side to interpret and convert an 'escape' sequence like \ff into the ASCII character FF when it is received.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: OSComputing on Jun 15, 2015, 02:36 am
It works in 10 matrix(Arduino UNO R3),

but it won't work in Arduino MEGA 2560?
I also cannot get this to work on an Arduino Mega 2560. Is there a way to run Parola for Arduino on the Mega 2560?

The latest libraries (Parola 2.2 & Max72XX LED Matrix Display Library v2.7) work flawlessly on an Uno or a Duemilanova! I just run out of storage space.

Am I correct in thinking that the Mega will give me a little bit more room for large, complex messages? Is the Mega fundamentally different than an Uno, and will not work? Most sketches I have run fine. When I upload the Parola or MAX7219 examples on a Mega 2560, I just get a blank matrix. Same pins on an Uno work just fine.

Thanks,
Richard
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Jun 15, 2015, 04:04 am
Are you running the MEGA with the 'built-in' SPI pins or arbitrary pins? The constructor for the object in the code is different and you may need to modify the code.

I am pretty sure that others (wabbitguy in particular) uses the library with a MEGA. Should be no fundamental difference.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: CrossRoads on Jun 15, 2015, 04:55 am
'1284P will do more with 16K of SRAM. If  the messages are stored in flash (PROGMEM) then the Mega has more (256K) if the Parola library can handle the higher memory.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: wabbitguy on Jun 15, 2015, 05:17 am
I am pretty sure that others (wabbitguy in particular) uses the library with a MEGA. should be no fundamental difference.
That's right Marco, I normally use the Parola modules with a Mega. I use hardware SPI pins and usually pin 45 for CS that I define in the sketch.

It's only when faced with space limitations like my scrolling sign for the Maker Fair that I ended up using a Mini Pro. Even with the Mini Pro I still had ample SRAM left over.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: OSComputing on Jun 16, 2015, 03:20 am
Thanks guys! That helped.

#define CS_PIN        10  //----> I also used 45 as wabbitguy had done
// Hardware SPI connection
//-------------------------------------------
//MD_Parola P = MD_Parola(CS_PIN, MAX_DEVICES);
// Arbitrary output pins
MD_Parola P = MD_Parola(DATA_PIN, CLK_PIN, CS_PIN, MAX_DEVICES);

I managed to get all of my text to upload, no low memory warning. I basically modified the Parola Animation Catalog sketch for this experiment. All the text strings are defined in typedef struct. I guess this means that all the strings are in an array. Keep in mind I could not code my way out of a paper bag.  :o

Now I have a new issue. The scrolling is definitely not as smooth as on the Uno or Duemilanova. As text scrolls in, it looks... like italics! When it stops or if I use print, the text look great. Scrolling again, left or right, it looks like italics again.  :smiley-confuse:

Is this because of the Mega itself?

Also, the uint16_t speed; // speed multiplier of library default value hardly has any effect on speed. On the Uno, I can set the number very low, 10 or 20, and the text just snaps across the display. On the Mega, that value has a barely noticeable effect on the left_scrolling (most of my text uses this.)

I also have to use the Mega plugged in to 5 volts as well as the USB otherwise the mega turns on and off unpredictably.

My main problem now really is that the scrolling doesn't look right. To me it seems like the Mega doesn't have the same performance as the Uno I use. What about the clock speed of the Mega?

Thanks for all the answers, Guys! That got me going very quickly!!  :smiley-cool:
Richard
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: wabbitguy on Jun 16, 2015, 03:32 am
This is the code I use on my Parola's...

Code: [Select]

#define CS_PIN   45
//
#if INCLUDE_HARDWARE_SPI
MD_Parola P = MD_Parola(CS_PIN, MAX_DEVICES);
#else
MD_Parola P = MD_Parola(51, 52, CS_PIN, MAX_DEVICES);//CS_PIN 45
#endif // USE_HARDWARE_SPI


It looks to me like you're using the software SPI not the hardware SPI. And yeah, the software SPI is more or less glacial...

As for power, on my sign that I made, when I have the 24 modules with stuff scrolling across them it will pull upwards of 300ma. Most USB connections start to balk pretty good when you're pulling juice from them like that. Thus, I usually run a 9-12V DC adapter with a dc-dc buck converter to drop the Vcc down to 5V for the displays.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: OSComputing on Jun 16, 2015, 04:00 am
Wow, fast reply, wabbitguy!   :smiley-cool:

UPDATE: All working! Incredibly smooth scrolling and speed. Now I just need to get my hands on a Crossroads 1284Mini!

#include <MD_Parola.h>
#include <MD_MAX72xx.h>
// #include <SPI.h>  // include the SPI library:

// Define the number of devices we have in the chain and the hardware interface
//-------------------------------------------
#define   MAX_DEVICES             10
#define   CLK_PIN              52
#define   DATA_PIN                   51
#define   CS_PIN              45

// Hardware SPI connection
//-------------------------------------------
MD_Parola P = MD_Parola(CS_PIN, MAX_DEVICES);
// Arbitrary output pins
// MD_Parola P = MD_Parola(DATA_PIN, CLK_PIN, CS_PIN, MAX_DEVICES);
// MD_Parola P = MD_Parola(51, 52, CS_PIN, MAX_DEVICES);

Curiously these changes had no effect on the scrolling. Almost as if I am still using software SPI. Is there some other setting or code or even a jumper on the Mega I need to set?

I found this, but I don't understand it yet...   :smiley-confuse:
http://www.arduino.cc/en/Reference/SPI
https://www.pjrc.com/teensy/td_libs_SPI.html

What about the SPI Library?

Thanks again,
Richard
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: wabbitguy on Jun 17, 2015, 05:30 am
The Parola/MD library supports the idea of a hardware (i.e what the Arduino has already built into it) and a software SPI. Since the software one is "emulated", it will always be significantly slower than the hardware one.

The built in (hardware) will always use specific dedicated pins on the Arduino. Whereas the software version will use whatever you toss at it. Which to be honest, I've never used so Marco can correct me if I have the wrong concept here.

When you used:

Code: [Select]
MD_Parola P = MD_Parola(CS_PIN, MAX_DEVICES);

In your sketch, the library will detect that and reference what it knows to be the built in hardware pins for the various flavours of Arduino. Thus full speed ahead...

I have a 1284 Arduino here as well, rarely use it for anything though. The last project I did use it on was for a bunch of those OLED displays since each one keeps a copy of the display in memory. If you're running 4 displays SRAM suddenly gets tight. Even on a MEGA.

For Parola displays, I just ran 24 of them with 3 x 100 character messages on an Arduino Pro MINI. Still SRAM left over (and there's only 2K to start with). The biggest scrolling one I put together is 44 Parola modules. All I used was a good old fashioned MEGA. Still didn't run out of memory.

The MEGAs 8K is pretty large in the great scheme of things...what are you planning on doing to use up all the Mega's flash and SRAM?
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Jun 17, 2015, 06:56 am
That's correct. By using the shorter version of the object definition, you are 'implying' the hardware pins. The equivalent of the relevant SPI library code is in the MD_MAX72xx library.

In theory the SPI hardware pins can be shared among different devices that use different CS pins. Have not tried this in practice. The pin definitions come from the Arduino library, as they are different for the different flavour of devices, but that is transparent to the user except that they need to know which pins to physically connect to.

Memory requirements for the Parola and MD_MAX72xx libraries are really quite small. Each module requires an 8 byte buffer and maybe as much again for tracking variables. So 10 displays will take up about 160 bytes of RAM. Stack does not grow much either. I always use an Uno (2k RAM) and have never had RAM problems due to the Parola libraries.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: ismellsmoke on Jun 23, 2015, 05:19 am
Hi.
sorry to jump in BUT....

Big thanks to marco_c and others for the work and the time put in here for everyone.

I had been trying for a while now with long sometimes sleepless nights with very basic experience trying to get Parola to compile at least, now im looking at a working matrix YAY!!!!
   


THANK YOU SO MUCH!!!!!
 
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Jun 23, 2015, 07:01 am
@ismellsmoke: Thanks for the positive review! It would be interesting to know what made getting the libraries up and running difficult from the point of view of a newbie. Maybe things can be explained better or arranged differently. Any feedback you can give? Happy to get it as PM if you don't want to post it.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: ismellsmoke on Jun 23, 2015, 10:44 pm
Hi.

I had trouble with the library MD_MAX71xx.h.
I had a older version and not much to go from in changing to a generic hardware until I found this post which I have no idea why I never found it.
I had a list a mile long of compile errors with font.h and MAX library that got it down to just the #endif without previous if and no matter what I tried I just got more errors.
so I done more searching and ended up here and after about 15 pages of reading found the correct sources for files.

The only thing I had trouble with was my display runs input from the end of the matrix, which is no problem as it was a new display.
And another cheap 32x8 runs horizontal and the same line on each matrix mirrored.
I seen this previously in this post I think, will have to go back.

I cant find the schematic for the user interface control.
I used ground to pull the buttons pins low, is this correct? I seems to work while text is displaying.
And the speed control, Is this a 5v input from the pot. 5K?? Though ground on the outer pin?

And the pause time I cant work out, if I pull it low the display goes nuts.

Sorry and thanks again if you can help.

Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Jun 24, 2015, 08:17 am
I've also sent you a PM.

Quote
I cant find the schematic for the user interface control.
Described in post #431 of this forum thread.

Quote
I used ground to pull the buttons pins low, is this correct? I seems to work while text is displaying.
Yes

Quote
And the speed control, Is this a 5v input from the pot. 5K?? Though ground on the outer pin?
This is a proportional input from the pot. The wiper (center) and one of the outer pins on the pot is connected (which one depends on whether you want the pot to work clockwise or counterclockwise). 5K is probably a bit low (5V/5kR) = 1mA current flow). 10k or even 20k is fine. You don't want too much current through the pot as you are just detecting the voltage through the ADC.

Quote
And the pause time I cant work out, if I pull it low the display goes nuts.
What does 'go nuts' mean in more technically precise language?
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: alexrl1 on Jun 25, 2015, 07:14 pm
I have the following problem with the parola I'm trying to use modules but icstation but if I connect text works but goes backwards and mirror plate and shift ise for effects Might help me solve this marco_c here I send you photos of it


(https://lh3.googleusercontent.com/zTw4zJSNTO1jvb4E5G9y5KvVqJSHVAQb2L6-u7duR3g80Ia65tcTghHcf7aMih31AVrujg=s114)

(https://lh3.googleusercontent.com/zTw4zJSNTO1jvb4E5G9y5KvVqJSHVAQb2L6-u7duR3g80Ia65tcTghHcf7aMih31AVrujg=s114)

(https://lh3.googleusercontent.com/0SpYGlxcc6nzsS10lREf1cHxTAaR9gV9zMhaVoiKKBALGL0NaYjLuSYMnrOh6Sof2sw8rPo=s114)

(https://lh3.googleusercontent.com/E_-oyFNh-o9RorFosOKzLrmkcISkhD-QMyjckyn5zXMxoxigpUqLmB-LHFjiOOtt6U4qbQ=s114)

(https://lh3.googleusercontent.com/j0tC531SXcEyPOCp9aa_zt5iwf9HyrwMEq8CnJrzqKrzOU_CqqLciK4VkZl2VRsVHoPQvg=s114)

(https://lh3.googleusercontent.com/MrorFSzE3LFmv9QQMVRfOd8Vq42Vbyrs1wIAt4x2aeXefnE4qQ_Mg55aEdVoklGr6LDntRA=s114)
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Jun 25, 2015, 11:19 pm
Images are too small to see how you are connecting.

Please make sure that you read the documentation with the MD_MAX72xx library on how to configure the libraries for your hardware. There is a lot of information there.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: alexrl1 on Jun 26, 2015, 01:08 am
here I have the pictures on the following links and are larger puedar review and hopefully help me solve my problem

here the links:

http://imageban.net/show/2015/06/26/6b56bdda302cee2babe800e73374eaee/jpg

http://imageban.net/show/2015/06/26/ffc0640f346451f4ba2c03347cedc51c/jpg

http://imageban.net/show/2015/06/26/491ebf123db4fcca680e3948ce553243/jpg

http://imageban.net/show/2015/06/26/6586aab8e25901514334d2e5ae72765b/jpg

http://imageban.net/show/2015/06/26/f0db00cc750d51cdcb535297736136f2/jpg

http://imageban.net/show/2015/06/26/a607a719666186fac8539ea471de602d/jpg

http://imageban.net/show/2015/06/26/a3818ce88f993e7b50c2ba0b1d3a1859/jpg

http://imageban.net/show/2015/06/26/7f7913602ff13ba8984eb83f52d1f127/jpg

http://imageban.net/show/2015/06/26/be0c457a3e721acf7c7f3aa56fd72d30/jpg

http://imageban.net/show/2015/06/26/cf4031220aee134f24ef8b79518bd551/jpg

http://imageban.net/show/2015/06/26/87eaa94e616c09b8136e109cbd8ad9ea/jpg

http://imageban.net/show/2015/06/26/df071ff228d724e6c230743e27d1eaab/jpg

http://imageban.net/show/2015/06/26/14c858db9d93c5bff735600ee17bce00/jpg
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Jun 26, 2015, 01:55 am
Can you please confirm that you read the documentation and that it did not help you resolve your issue?
I think you will find that you have not properly changed the configuration in the libraries and you are currently orienting the panel 'upside down' from how it should be.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: alexrl1 on Jun 26, 2015, 02:24 am
and I read the documentation and have been unable to resolve the problem and the code I am using is this not if you could tell me what I have to change for me to work well because as your dijistes the panel is directing backwards and not how to fix it and if you can help I can give you my id and password of team viewer so you can more easily help


// Program to exercise the MD_Parola library
//
// Demonstrates most of the functions of the Parola library.
// All animations can be run and tested under user control.
//
// Speed for the display is controlled by a pot on SPEED_IN analog input.
// Digital switches used for control of Justification, Effect progression,
// Pause between animations, LED intensity, and invert mode. UI switches
// are normally HIGH.
//
// Keyswitch library can be found at http://arduinocode.codeplex.com
//

#include <MD_Parola.h>
#include <MD_MAX72xx.h>
#include <MD_KeySwitch.h>

// Define the number of devices we have in the chain and the hardware interface
// NOTE: These pin numbers will probably not work with your hardware and may
// need to be adapted
#define   MAX_DEVICES   8
#define   CLK_PIN      13
#define   DATA_PIN   11
#define   CS_PIN      10

// HARDWARE SPI
MD_Parola P = MD_Parola(CS_PIN, MAX_DEVICES);
// SOFTWARE SPI
//MD_Parola P = MD_Parola(DATA_PIN, CLK_PIN, CS_PIN, MAX_DEVICES);

// Turn on debug statements to the serial output
#define  DEBUG_ENABLE  1

#if  DEBUG_ENABLE
#define   DEBUG(s, x)   { Serial.print(F(s)); Serial.print(x); }
#define   DEBUGS(x)   Serial.print(F(x))
#define   DEBUGX(x)   Serial.println(x, HEX)
#else
#define   DEBUG(s, x)
#define DEBUGS(x)
#define DEBUGX(x)
#endif

// User interface pin and switch definitions
#define   SPEED_IN   A5   // control the speed with an external pot
#define   PAUSE_SET   4   // toggle pause time
#define JUSTIFY_SET   6   // change the justification
#define   INTENSITY_SET   7   // change the intensity of the display
#define   EFFECT_SET   8   // change the effect
#define   INVERSE_SET   9   // set/reset the display to inverse

#define   PAUSE_TIME      1000   // in milliseconds
#define   SPEED_DEADBAND   5      // in analog units

// Global variables
uint8_t   curString = 0;
char   *pc[] =
{
  "Parola for",
  "Arduino",
  "LED Matrix",
  "Display"
};
#define   NEXT_STRING   ((curString + 1) % ARRAY_SIZE(pc))

MD_KeySwitch uiJustify(JUSTIFY_SET);
MD_KeySwitch uiEffect(EFFECT_SET);
MD_KeySwitch uiPause(PAUSE_SET);
MD_KeySwitch uiIntensity(INTENSITY_SET);
MD_KeySwitch uiInverse(INVERSE_SET);

void doUI(void)
{
  // set the speed if it has changed
  {
    int16_t   speed = map(analogRead(SPEED_IN), 0, 1023, 0, 100);

    if ((speed >= ((int16_t)P.getSpeed() + SPEED_DEADBAND)) ||
      (speed <= ((int16_t)P.getSpeed() - SPEED_DEADBAND)))
    {
      P.setSpeed(speed);
      DEBUG("\nChanged speed to ", P.getSpeed());
    }
  }

  // now process the digital inputs
  if (uiJustify.read())   // TEXT ALIGNMENT
  {
    static uint8_t   curMode = 0;
    textPosition_t   align = P.getTextAlignment();
    textPosition_t   textAlign[] =
    {
      LEFT,
      CENTER,
      RIGHT
    };

    DEBUG("\nChanging alignment to ", curMode);
    P.setTextAlignment(textAlign[curMode]);
    P.displayReset();
    curMode = (curMode + 1) % ARRAY_SIZE(textAlign);
  }

  if (uiEffect.read())   // EFFECT CHANGE
  {
    static uint8_t  curFX = 0;

    textEffect_t effect[] =
    {
      PRINT,
      SLICE,
      WIPE,
      WIPE_CURSOR,
      OPENING,
      OPENING_CURSOR,
      CLOSING,
      CLOSING_CURSOR,
      BLINDS,
      DISSOLVE,
      SCROLL_UP,
      SCROLL_DOWN,
      SCROLL_LEFT,
      SCROLL_RIGHT,
      SCROLL_UP_LEFT,
      SCROLL_UP_RIGHT,
      SCROLL_DOWN_LEFT,
      SCROLL_DOWN_RIGHT,
      SCAN_HORIZ,
      SCAN_VERT,
      GROW_UP,
      GROW_DOWN,
   };

    DEBUG("\nChanging effect to ", curFX);
    P.setTextEffect(effect[curFX], effect[curFX]);
    P.displayReset();
    curFX = (curFX + 1) % ARRAY_SIZE(effect);
  }

  if (uiPause.read())   // PAUSE DELAY
  {
    DEBUGS("\nChanging pause");
    if (P.getPause() <= P.getSpeed())
      P.setPause(PAUSE_TIME);
    else
      P.setPause(0);
  }

  if (uiIntensity.read())   // INTENSITY
  {
    static uint8_t   intensity = 7;

    intensity = ++intensity % 16;
    P.setIntensity(intensity);
    DEBUG("\nChanged intensity to ", intensity);
  }

  if (uiInverse.read())      // INVERSE
  {
    P.setInvert(!P.getInvert());
  }
}

void setup(void)
{
#if DEBUG_ENABLE
  Serial.begin(57600);
  DEBUGS("[Parola Test]");
#endif

  // user interface switches
  uiJustify.begin();
  uiEffect.begin();
  uiPause.begin();
  uiIntensity.begin();
  uiInverse.begin();

  // parola object
  P.begin();
  P.displayText(pc[curString], CENTER, P.getSpeed(), PAUSE_TIME, PRINT, PRINT);
  curString = NEXT_STRING;
}

void loop(void)
{
  doUI();

  if (P.displayAnimate())
  {
    P.setTextBuffer(pc[curString]);
    P.displayReset();
    curString = NEXT_STRING;
  }
}
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Jun 26, 2015, 02:36 am
For your infomation, code should be posted between code tags so that it can be read properly. This is the </> symbol that is next to the bold in the posting edit window.

So if you have read the documentation then you should have found this information:

1. Library configuration.
Change the #define USE_ICSTATION_HW in the MD_MAX72xx header file to be 1 for the ICS_hardware and 0 for all the others. This library supports the Parola hardware and the more commonly available LED modules available from many other sources. The circuits for these modules are essentially identical except in the way that the LED matrix is wired to the MAX7219 IC. This difference is accounted for in software when the type of module is selected using the appropriate USE_*_HW compile time switch. By default this is zero as shown below.
Code: [Select]
/**
 \def USE_ICSTATION_HW
 Set to 1 to use ICStation DIY hardware module kits available from
 http://www.icstation.com/product_info.php?products_id=2609#.UxqVJyxWGHs
 This hardware must be set up with the input on the RHS.
 */
#define USE_ICSTATION_HW 0


2. Module Orientation.
Note the input is from the right side of the matrix. Your photos seem to show the input from the left.
Code: [Select]
           G  F  E  D  C  B  A  DP
         +------------------------+
         | 7  6  5  4  3  2  1  0 | D7
 CLK <---|                      1 | D6 <--- CLK
  CS <---|                      2 | D5 <--- CS
DOUT <---|                      3 | D4 <--- DIN
 GND ----| O                    4 | D3 ---- GND
 VCC ----| O  O                 5 | D2 ---- VCC
         | O  O  O              6 | D1
         | O  O  O  O           7 | D0
         +------------------------+
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: alexrl1 on Jun 26, 2015, 05:27 am
could you send me the file already arranged for my matrices that still do not understand where this I have to change or some images you do is, I'm still a little new to arrays apology to bother much or if you can tell me step step because I have to get me to do that folder and all that apology

links to the images of the Arduino libraries for you to indicate to me where I have to go to solve my problem

http://imageban.net/show/2015/06/26/02a62a8dcf553da26e82d6379b2670fd/jpg

http://imageban.net/show/2015/06/26/b24f255b7fbd4a30106c7623b92786a5/jpg

http://imageban.net/show/2015/06/26/c6dcbcf0864686f6f3cd4895fa739154/jpg

http://imageban.net/show/2015/06/26/f831c17dc30876db14199c77e4a49473/jpg

http://imageban.net/show/2015/06/26/452ff05e22eea3f5b461fb2cca751982/jpg
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: wabbitguy on Jun 26, 2015, 07:54 am
Wow. Loss for words. Just...wow.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Jun 26, 2015, 08:04 am
The file you have to edit is MD_MAX72xx.h.

I guess you are new to asking for help on the forum. When you ask for help, you must realise that the help you get will be to allow you to do things yourself. Generally you will get more or less detailed instructions to help you learn and make you self sufficient in the Arduino world. Please try and do this yourself as you will learn far more from looking at someone else's code, even in a situation as simple as this one.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: alexrl1 on Jun 26, 2015, 08:24 am
thank you and understood and I could solve I thank you so much
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Jun 26, 2015, 09:03 am
Fantastic. Hopefully it is all working for you now and you are displaying correctly. If you have any more difficulties, please ask.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: alexrl1 on Jun 26, 2015, 04:49 pm
I have only one question more as I can make arrays work as well as the image that I command you


(http://cdn.instructables.com/FNZ/Y3D2/HPN4LEJ0/FNZY3D2HPN4LEJ0.MEDIUM.jpg)

(http://i.ebayimg.com/00/s/MTIwMFgxNjAw/z/-EMAAOxy77hSD0YD/$(KGrHqFHJEQFIHVOOH99BSD0YDH86Q~~60_57.JPG)

(http://i.ebayimg.com/00/s/MTIwMFgxNjAw/z/55kAAOxyE3pSD0YP/$T2eC16hHJF0FFZ3rupMbBSD0YO1Ir!~~60_57.JPG)

Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Jun 26, 2015, 10:21 pm
Quote
I have only one question more as I can make arrays work as well as the image that I command you
I do not understand if this is a question or a comment.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: alexrl1 on Jun 26, 2015, 10:44 pm
the question is how can I make it work as well as the images that you send
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: alexrl1 on Jun 28, 2015, 04:01 am
?
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Jun 28, 2015, 07:38 am
Honestly, I still do not understand your question.

Once you have the LED matrices connected and running, any of the example programs should work in exactly the same way that they work for me and everybody else.

You will not be able to display letters 16 LEDs (as in the pictures you attached) high because that is not what the library does. The library displays text 8 LED high only. This has been discussed extensively in other posts.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: alexrl1 on Jun 28, 2015, 07:53 am
Thanks and I understood that I can not make them work as pictures
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: cpwtech on Jul 12, 2015, 02:26 pm
Marco,

    I had bought some MAX7219 kits from ebay, and they work as long as I use the Adafruit library, but when I try using your library it does the mirrored image thing.  I have gone into the header file and set USE_GENERIC_HW to 1 and turned off USE_PAOLA_HW. but it still diplays in reverse.  Any ideas?
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: cpwtech on Jul 12, 2015, 07:14 pm
Well, I have gotten it to scroll correctly, but I have to use the mx.transform(MD_MAX72XX::TSR) function to get it to display correctly.

I have tried going into the header file and reversing the rows/columns and neither one will set it correct.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Jul 12, 2015, 11:59 pm
Unless these are a new version of module, you should not need to change anything to make them work properly aside from the header definition.

MD_MAX72XX::TSR is just a Trasform Shift Right, so it should not be changing any mirror imagine thing happening.

Make sure you are physically orienting them as per the included documentation.

Post a picture of the modules?
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: cpwtech on Jul 14, 2015, 03:01 am
Sorry for the delay in replying.  Working some messed up hours this week.  These are the units that I bought.http://www.ebay.com/itm/161666478691?_trksid=p2057872.m2749.l2649&ssPageName=STRK%3AMEBIDX%3AIT (http://www.ebay.com/itm/161666478691?_trksid=p2057872.m2749.l2649&ssPageName=STRK%3AMEBIDX%3AIT)

I hope that helps.  if not I will take one out of the case and take pictures of it.

Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Jul 14, 2015, 03:26 am
These do look like the generic modules. Please note that the physical orientation of the modules used with the Parola library is the with the IC at the top as you look at the PCB and matrix.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: cpwtech on Jul 14, 2015, 03:34 am
That would solve the problem.  Honestly I never thought to flip the blasted things over!!  I love your library.  You did some great work on it.  Even with me not having the displays the right way, everything just seems to work.  I knew there had to be a simple solution to the problem.  Thanks a million.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: ati105 on Jul 15, 2015, 08:17 am
Hi Marco I recently used your example sketch(Parola_Zone_TimeMsg) to build a clock which work fine except the year is not give the proper digits. I tried looking for solution from previous post but it seems the problem is not common.

Here is my complete code and the picture of the clock, the year is supposed to be 2015 which shows properly using serial monitor but it shows 0223 on the ledmatrix

Code: [Select]
#define MAX_DEVICES 7

#define CLK_PIN 11
#define DATA_PIN 12
#define CS_PIN 10

// Header file includes
#include <MD_Parola.h>
#include <MD_MAX72xx.h>
#include "Font_Data.h"

#include <Time.h>
#include <Wire.h>
#include <DS3232RTC.h>    

MD_Parola P = MD_Parola(DATA_PIN, CLK_PIN, CS_PIN, MAX_DEVICES);

#define SPEED_TIME 100
#define PAUSE_TIME 0

#define MAX_MESG 30

#define  DEBUG  0

int rtc[7];
byte hours ;
byte mins ;
byte secs ;

byte days ;
byte months ;
byte years ;
// Global variables
char szTime[9]; // mm:ss\0
char szMesg[MAX_MESG+1] = "";


byte decToBcd(byte val)
{
  return( (val/10*16) + (val%10) );
}
// Convert binary coded decimal to normal decimal numbers
byte bcdToDec(byte val)
{
  return( (val/16*10) + (val%16) );
}


char *mon2str(uint8_t mon, char *psz, uint8_t len)

// Get a label from PROGMEM into a char array
{
  static const __FlashStringHelper* str[] =
  {
    F("Jan"), F("Feb"), F("Mar"), F("Apr"),
    F("May"), F("Jun"), F("Jul"), F("Aug"),
    F("Sep"), F("Oct"), F("Nov"), F("Dec")
  };
  
  
   strncpy_P(psz, (const char PROGMEM *)str[mon-1], len);
  psz[len] = '\0';
  
   return(psz);
}
 
  
 char *dow2str(uint8_t code, char *psz, uint8_t len)
{
  static const __FlashStringHelper* str[] =
  {
    F("Sunday"), F("Monday"), F("Tuesday"),
    F("Wednesday"), F("Thursday"), F("Friday"),
    F("Saturday")
  };
  
  strncpy_P(psz, (const char PROGMEM *)str[code-1], len);
  psz[len] = '\0';

  return(psz);
}


void getTime(char *psz, bool f = true)
// Code for reading clock time
{
  rtc[2] = hour();
  rtc[1] = minute();
  rtc[0] = second();
  hours = rtc[2];
  secs = rtc[0];
  mins = rtc[1];
  
  
 sprintf(psz, "%02d %c %02d", hours, (f ? ':' : ' '), mins);
}

void getDate(char *psz)
// Code for reading clock date
{
  char szBuf[10];
  
  rtc[6] = year();
  years = rtc[6] ;
  rtc[5] = month();
  rtc[4] = day();
  months = rtc[5] ;
  days = rtc[4];
   sprintf(psz, "%d %s %04d", days, mon2str(months, szBuf, sizeof(szBuf)-1), years);
}


void setup(void)
{
  
  P.begin(2);
  P.setInvert(false);
  
  P.setZone(0, 0, MAX_DEVICES-5);
  P.setZone(1, MAX_DEVICES-4, MAX_DEVICES-1);
  P.setFont(1, numeric7Seg);

  P.displayZoneText(1, szTime, CENTER, SPEED_TIME, PAUSE_TIME, PRINT, NO_EFFECT);
  P.displayZoneText(0, szMesg, CENTER, SPEED_TIME, 0, SCROLL_LEFT, SCROLL_LEFT);
  
  setSyncProvider(RTC.get);
  getTime(szTime);
}

  
 void loop(void)
{
  static uint32_t lastTime = 0; // millis() memory
  static uint8_t display = 0; // current display mode
  static bool flasher = false; // seconds passing flasher
  
  P.displayAnimate();
  
  if (P.getZoneStatus(0))
  {
    /*switch (display)
    {
      case 0: // day of week
        P.setTextEffect(0, SCROLL_LEFT, SCROLL_LEFT);
        display++;
        dow2str(dayOfWeek(), szMesg, MAX_MESG);
        
  break;
  
  default:*/ // Calendar
        P.setTextEffect(0, SCROLL_LEFT, SCROLL_LEFT);
        display = 0;
        getDate(szMesg);
       //break;
    //}
 
    P.displayReset(0);
  }
   if (millis() - lastTime >= 1000)
  {
    lastTime = millis();
    getTime(szTime, flasher);
    flasher = !flasher;
  
    P.displayReset(1);
  }
}
  


Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: ati105 on Jul 15, 2015, 08:23 am
Picture failed to upload in my previous post but here they are, the date scrolls hence reason for two pictures
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Jul 15, 2015, 08:24 am
How do you know the date read from the rtc is correct? Did you try printing the number for the date to the serial monitor?
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Jul 15, 2015, 08:27 am
Also look at your character array sizes. They seem a bit small. 
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: ati105 on Jul 15, 2015, 08:31 am
And please ignore this part of the code,


Code: [Select]
byte decToBcd(byte val)
{
  return( (val/10*16) + (val%10) );
}
// Convert binary coded decimal to normal decimal numbers
byte bcdToDec(byte val)
{
  return( (val/16*10) + (val%16) );
}


And any part related to it its just something I added this morning trying to use just wire library instead of ds3231 library.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: ati105 on Jul 15, 2015, 08:35 am
yes I printed it to serial and it printed correctly, do you mean I should increase the "char szBuf[10];" size?
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: ati105 on Jul 15, 2015, 03:07 pm
yes I printed it to serial and it printed correctly, do you mean I should increase the "char szBuf[10];" size?
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: ati105 on Jul 15, 2015, 04:32 pm
But its still not printing correctly on the led matrix even after changing the char arrays as adviced
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: ati105 on Jul 15, 2015, 11:23 pm
But its still not printing correctly on the led matrix even after changing the char arrays as adviced
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Jul 15, 2015, 11:43 pm
The library simply prints out what you are telling it to, and think it is highly unlikely that the Parola library is the cause of the issue.

Please make sure that the string you are giving the library is correct. If the number is right and the led matrix shows the wrong thing, somewhere in between the string is being clobbered with the weird character you are seeing.

One approach is to eliminate the LED matrix altogether and simply print the message to the serial monitor every time you would be calling the led matrix code.

Put on your best detective hat and trace it through. 
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: ati105 on Jul 16, 2015, 06:27 am
It works fine now, I was actually giving the library the wrong string. Thank for your replies
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: roamer on Jul 16, 2015, 03:44 pm
Hi marco. Is it possible to get text printed upside down on led matrixes? I have the parola hardware like this.
I am trying to make a clock with 2 rows of led matrix. Well you can see my problem.
Regards Ronny
(http://i304.photobucket.com/albums/nn169/roamerP/20150716_152712_zpsn7xb55fb.jpg) (http://[URL=http://s304.photobucket.com/user/roamerP/media/20150716_152712_zpsn7xb55fb.jpg.html)]Parola clock[/url]
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Jul 17, 2015, 01:17 am
Not at the moment with Parola but just using the MD_MAX72xx library you could set it up as a separate zone and then transform the zone using a flip top to bottom.

Inverting text could be a useful enhancement to the Parola library for a future release.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: roamer on Jul 17, 2015, 03:14 pm
Thanks for the replay, but it just went right over my head.  Can you explain it in more detail please.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Jul 18, 2015, 03:40 am
@roamer

Short answer is that the Parola library will not do what you need right now, which is flipping the text upside down AND back to front for the top row.

Longer answer is that you could write code using the MD_MAX72xx library, which gives the basic functionality used by Parola. That library has methods that will allow you to flip the LEDs text in a zone vertically and horizontally, which would achieve your aims. There are examples with the MD_MAX72xx library that will show you the basics of displaying and scrolling text, but you will need to understand more about what is going on do more of the control functions that Parola takes care of for you. As a programming exercise it will be more challenging.
 
Hopefully that explains more fully.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: Jeff_Haas on Jul 18, 2015, 10:29 am
Marco,

I searched your site for Parola and couldn't find the answer to this...does Parola and the MD_MAX72xx library work with the Arduino Due?

I have a project that bogged down on a standard Arduino and if your libraries work on the Due, I think that may be the way to get better performance.

Jeff
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Jul 18, 2015, 10:32 am
Jeff,

No idea. I have not tried it nor have I heard of anyone else doing it. Inside the libraries is all standard C++ code, so in theory if the Arduino libraries provide portability, the code should work.

Maybe so one else on here has tried this.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: roamer on Jul 18, 2015, 12:10 pm
Ok, thanks for the answer. I have looked at the examples you mentioned and I realize that this would be a way to challenging programming exercise for me. So the question is, will you add this function to the library in the future?
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Jul 18, 2015, 12:14 pm
Probably. It is now on my list. I usually add features incrementally and release the source code in the github repository on the web site. When there are enough new features it is released as a full version upgrade.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: Jeff_Haas on Jul 19, 2015, 05:28 am
Marco - Re: Due support

I realized I could update the current Arduino IDE to download support for the Due (or other boards) and then Verify the code, before actually buying a board.

Unfortunately, the MAX 72XX library returns a number of errors, mostly "not declared in this scope" type.

Jeff
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Jul 19, 2015, 06:09 am
Jeff,

Just checked. The only errors that come up are around the code for the SPI hardware interface. This is the ONLY place that I used low level calls to get some speed on the interface. Should be easy to replace this bit of code with the equivalent for the Due or, in fact, just use the software (arbitrary pins) interface ans comment out the code around the error.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Jul 19, 2015, 09:41 am
A new set of source code (NOT in a zip release) has been uploaded to the repository. This is pre version 2.3 but includes some items that may be of interest to a few people:

- Added set/getScrollSpacing() methods and associated Scrolling_Spacing example.
This method works in conjunction with SCROLL_LEFT and SCROLL_RIGHT. It allows user code to specify a lower threshold on how many blank columns there are between one message and the following message. Default behavior is for the message to scroll off the screen before new message starts. The setting still respects the text alignment attributes and the 'count' comes into effect once the mid-scroll pause has been executed. See the example program.

- Added set/getZoneEffect with FLIP_LR and FLIP_UD, with associated Zone_Mirror example.
This allows a zone to be specified flipped Left to Right and/or Up to Down (independent settings). This should fix roamer's situation illustrated in an earlier post, for all rectangular shaped matrix modules. Note that not all effects can be used in flipped modes - see the documentation in the header file.

I have tested these and they seem to work ok. Please let me know if there are any issues.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: roamer on Jul 19, 2015, 10:38 am
Many thanks Marco, it work perfect now. You are the Man!! ;D

(http://i304.photobucket.com/albums/nn169/roamerP/20150719_102530_zpsmqzqhra4.jpg) (http://[url=http://s304.photobucket.com/user/roamerP/media/20150719_102530_zpsmqzqhra4.jpg.html)]klock[/url]
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: Jeff_Haas on Jul 20, 2015, 07:52 am
Marco, thanks.  I see what you mean about adapting the code for the Due, it's a bit of a stretch for me, so I'll have to see how badly we want this specific project.

Jeff
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: roamer on Jul 24, 2015, 08:44 am
Hi everybody, has anyone done a sort of a menu system for led matrix. I find plenty for LCD Shields but it it would be nice if there were one for matrix display too.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Jul 25, 2015, 02:28 am
What do you mean by "a sort of menu system"? If you can be a bit more specific ...

In principle the only difference between a one line LCD display and the LED output is the final output stage. All the rest of the logic and data to manage the menu remains almost identical.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: roamer on Jul 25, 2015, 10:05 am
Hi Marco, well I mean a menu system with buttons to navigate up or down and to confirm your choice. In my case I want a menu to set time for my clock. Now I have 2 buttons, with one I can start serial monitor to set date and time and with the other I can adjust brightness. I would like to do it with a menu with 4 buttons, but I have problem to make it work. A small example would be appreciated.

Regards roamer
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Jul 25, 2015, 03:47 pm
Post what you have so far as a start.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: s1930 on Jul 26, 2015, 08:02 pm
Parola is an excellent scrolling program,I have used it with 4 generic modules,worked great.
T have also used it with icstation modules also works great.
I have now tried to use it with icstation 4 in line modules all on a pcb,but no success.
the Arduino seems to be sending multi inputs.
The input is on the left hand side (unlike the normal icstation modules.
I did manage to get it to work by hard wiring them ---data in to module 4, then data out to module 3,
then 2 then 1.
This'nt a very elegant solution. Has anyone solved this with Parola?
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Jul 27, 2015, 12:02 am
Quote
the Arduino seems to be sending multi inputs.
Can you explain this?

4 ICStation modules connected together should be no different from a normal chain of modules connected together. Can you please also post a picture of what you have set up?
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: s1930 on Jul 28, 2015, 08:52 pm
Thanks Marco, I think this is a new 4 in line display from icstation.

The original ones worked OK as expected, but this new 4 matrix display seems to do muliple writes to the display.
The Din is on the left, whereas  Parola expects it on the right.

The only way I could get it to work correctly, was to hardwire the display using display number 4 (on the right) as the Din and then Dout to number 3 then 2 then 1.

(http://i18.servimg.com/u/f18/18/68/20/85/d1050010.jpg)(http://i18.servimg.com/u/f18/18/68/20/85/d1050011.jpg)
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Jul 28, 2015, 11:47 pm
Maybe you are catching me on a 'stupid' day, but I can't figure out why you perceive a problem.

Quote
The original ones worked OK as expected, but this new 4 matrix display seems to do multiple writes to the display.
I still don not understand what you are saying. Are you referring to the display showing the same thing on all displays? or do you mean something else?

Quote
The Din is on the left, whereas  Parola expects it on the right.

The only way I could get it to work correctly, was to hardwire the display using display number 4 (on the right) as the Din and then Dout to number 3 then 2 then 1.
Back to basics - With these modules (as with all others) the position in the chain defines its number. The first Din connected to the Arduino is on the first module. No matter whether the software expects that the first module be on the right or left, moving it to the other side (left or right, respectively) simply involves flipping the chain end to end. Worse case the text is upside down.

The modules shown in the photo are simply 4 single ICStation modules that have not been separated. They don't even have PCB traces across the separate PCB and still require the use of jumpers. If you were able to run multiple ICStation modules before (you said that in your post), this should work just the same way.

 Have you actually told the library that you have 4 modules in the chain?
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: louwin on Jul 29, 2015, 03:33 pm
I think these are the FC-16 modules, as you said, not separated. I also think the traces DO go through as I have removed the micro jumpers. In fact, another version doesn't have the intermediate 5P headers as the traces just run through all 4 modules.

I have a 24 module scrolling setup using 16 modules (4 by 4 groups) with NO intermediate 5P headers and 8 modules (2 by 4 groups) WITH intermediate 5P headers but with the micro jumpers removed.

This scrolling display works PERFECTLY with Parola for Arduino (MD_Parola) and MD_MAX72xx libraries.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: s1930 on Jul 30, 2015, 12:07 am
Sorry for the delay in my reply, I have been doing lots of testing with the new icstation and the original
 icstion single modules.

I slowed down the write to the disply so I could clearly see what was happening.
I just sent the word Parola.

On the original (singles) working perfectly.
On the 4 module display it showed first scrolling Parola then the same on the second then the third then the forth.  That is it scrolled module 1 then 2 then 3 then 4.

I do not think for one moment that you have 'stupid' days, I think they are reserved for me, but my excuse is my age (there is a clue in the pen name)

I have since seen the post of Iouwin, and he has it working fine, so it must be me.

I have 4 of these modules of 4 each gives the same result.

Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Jul 30, 2015, 01:14 am
Sounds to me like you have not changed the number of modules from 1 to 4. Please confirm?

The library will send out enough data to fill up the number of modules. If you give a number of modules less than it has, then it only fills up part way and the next lot of data pushed the first lot into the next modules, etc, with a delay of 1 animation frame between each module. So if you are scrolling in, the data will appear as one column in module 1, then 2 cols in mod 1 and 1 col in mod 2, then 3 col in mod 1, 2 col in mod 2 and 1 col in mod 3, etc, rippling down the line.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: jelker on Jul 31, 2015, 12:07 pm
Hello everyone,

I am trying to compile the program but come to this error:

"
In file included from C:\Program Files (x86)\Arduino\libraries\MD_MAX72xx\MD_MAX72xx_font.cpp:24:0:
C:\Program Files (x86)\Arduino\libraries\MD_MAX72xx\MD_MAX72xx_font.cpp:194:24: error: variable '_sysfont_var' must be const in order to be put into read-only section by means of '__attribute__((progmem))'
 uint8_t _sysfont_var[] PROGMEM =
                        ^
C:\Program Files (x86)\Arduino\libraries\MD_MAX72xx\MD_MAX72xx_font.cpp:714:26: error: variable '_sysfont_fixed' must be const in order to be put into read-only section by means of '__attribute__((progmem))'
 uint8_t _sysfont_fixed[] PROGMEM =
                          ^
Error compiling.
"

Could anyone offer some guidance on this so that I can upload to the Arduino?
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Jul 31, 2015, 01:46 pm
@jelker. You need to use the latest versions of all the libraries. This problem has already been discussed in earlier posts.

Links to the locations for the libraries are in my signature block.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: s1930 on Aug 05, 2015, 07:11 pm
Hi Marco, I took your often quoted advice, check the documentation.
I downloaded the latest MDMAX72xx.h and there was the clue, combined with the post from Iouwin there was the solution.there is a new addition of FC-16. (If use HW FC-16 set to 1, all others o )
It now works perfectly, thanks very much, both Marco & Iouwin.

Please note-- I am not a semi-skilled idiot.  I am a Fully Qualified Idiot.

Many thanks Sam
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Aug 05, 2015, 10:40 pm
Good you got it running finally. You forgot my other most used question - are you using the latest version of the libraries :)
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: Arek00 on Aug 07, 2015, 10:22 pm
Is there any chance for font builder for LibreOffice?
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Aug 07, 2015, 11:55 pm
No plans at this stage. If you do convert the MSExcel version, please let me know so I can include it in my release.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: Arek00 on Aug 11, 2015, 11:33 pm
I am trying to understand examples but they are very difficult for me. In my code I am trying basic thing: display "1000" and then change it to "3000" but it only display "1000". Can anybody tell me how to do it?
Code: [Select]
#include <MD_Parola.h>
#include <MD_MAX72xx.h>
#include "Font_Data.h"

// Define the number of devices we have in the chain and the hardware interface
// NOTE: These pin numbers will probably not work with your hardware and may
// need to be adapted
#define MAX_DEVICES 12
#define MAX_ZONES 2

#define CLK_PIN 13
#define DATA_PIN 11
#define CS_PIN 10

// Hardware SPI connection
MD_Parola P = MD_Parola(CS_PIN, MAX_DEVICES);
// Arbitrary output pins
// MD_Parola P = MD_Parola(DATA_PIN, CLK_PIN, CS_PIN, MAX_DEVICES);

#define SPEED_TIME 25
#define PAUSE_TIME 1000

char *godzina[] = {"1000"};

void zmienczas() {
  godzina[0] = "3000";
}

void setup(void)
{

  P.begin(2);
  P.setIntensity(0);
  P.setInvert(false);
 
  P.setZone(0, 0, 5);
  P.setZone(1, 6, 11);
  P.setFont(0, numericup);
  P.setFont(1, numericdown);
 
  P.displayZoneText(0, godzina[0], LEFT, SPEED_TIME, PAUSE_TIME, PRINT, NO_EFFECT);
  P.displayZoneText(1, godzina[0], LEFT, SPEED_TIME, PAUSE_TIME, PRINT, NO_EFFECT);
}

void loop(void)
{
  if (P.displayAnimate()) // animates and returns true when an animation is completed
  {
    for (uint8_t i=0; i<MAX_ZONES; i++)
    {
      zmienczas();
      // Tell Parola we have a new animation
      P.displayReset(i);
    }
  }
}
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Aug 12, 2015, 03:22 am
Code: [Select]
godzina[0] = "3000";
This will not work. You need to use the strcpy() function to copy strings.
Code: [Select]
strcpy(godzina, "3000");
You should look up the function online for a full explanation of how character array strings work in C/C++.

You can also use the example that allows you to enter the string from the Serial Monitor. That way you can type in what you want and it displays.

Also, unless you have defined your own font (which you may have, given the previous posts), this will not work:
Code: [Select]

  P.setFont(0, numericup);
  P.setFont(1, numericdown);
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: Arek00 on Aug 13, 2015, 06:25 pm
Finally! After many hours of trying to understand it... My big clock is up and running :) But it's just the beginning...

(http://i58.tinypic.com/jayyib.jpg)
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Aug 17, 2015, 09:46 am
I have updated the library site with the latest release (version 2.3).

The release rolls up the incremental changes that have been available in the source code folders and adds a new animation type.

- Added set/getScrollSpacing() methods and associated Scrolling_Spacing example
- Added set/getZoneEffect with FLIP_LR and FLIP_UD, with associated Zone_Mirror example
- Added MESH animation
- Fixed minor bugs and documentation

As usual, any issues please let me know.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: Arek00 on Aug 18, 2015, 06:53 pm
setIntensity(0) is to bright to me. Is there any way to reduce it?
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Aug 18, 2015, 10:17 pm
Not through software but you can increase the resistor value in the circuit feeding the matrix with current. See the max7219 data sheet for details.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: Arek00 on Sep 07, 2015, 07:00 pm
It would be great if there would be possibility to create zones using columns instead of modules. Then it would be possible to create animations like analog car odometer useful for every clocks, timers etc.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Sep 08, 2015, 03:14 am
Why do you think that is not possible using modules instead of columns?
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: Arek00 on Sep 08, 2015, 10:44 am
If I can use only modules to create zones every char should be 8 columns width to animate single char.


Look at this example:

(http://i62.tinypic.com/29291qx.jpg)


Let's say I would like to create effect similar to analog odometer so I want to use SC_U animation just for digit 0. Is it possible now?
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Sep 08, 2015, 12:00 pm
Yes. You do not use Parola but use the MD-MAX72xx library directly. All transformations happen at the column boundary. You will probably need to use a fixed width font for the numbers, though.

Correction: Even at the MD_MAX72xx library level the transformations happen at the device module boundary.

It is still possible to do, though, as you have full access to the character bitmap before you display it on the display. It is just more complicated.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: Arek00 on Sep 09, 2015, 08:10 pm
28 modules in action  :)

https://www.youtube.com/watch?v=0QQh9sk-SoY (https://www.youtube.com/watch?v=0QQh9sk-SoY)
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Sep 09, 2015, 10:31 pm
Good work. Still scrolls quite well even at that size.

Thanks for the advertising!
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Sep 10, 2015, 03:28 am
@Arek00
I have implemented a sketch that does the 'pushwheel' type functionality that you mentioned a few posts back. You can find it at the code repository in the source code tab under examples for the MD_MAX72xx library. This will be included in the next release as an example program.

Thanks for the idea.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: Arek00 on Sep 11, 2015, 09:49 pm
Thanks for that example. For now it looks really complicated for me...

Another suggestion: should be possibility to set/unset zones every time I need it.

Example:

1. setup with 3 zones
2. do some animations
3. unset all zones (or some of them)
4. create different new zones
5. do some animations
...
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Sep 12, 2015, 03:41 am
Quote
For now it looks really complicated for me...
Not as complicated as some of the code in the library :-)

Code: [Select]
should be possibility to set/unset zones every time I need it.
Are you sure this is not possible already? The code does not care too much where the zones start and end, as it uses the current definition every time. Although I have not tried it, I expect that if you declare the maximum number of zones that you will need at the object constructor (ie, if you need 2 then 3, declare 3), then I expect that you can change the boundaries any time and it should work ok.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: Arek00 on Sep 16, 2015, 09:13 pm
I am trying to test "dynamic" zones but it is not working for me. Can you check it? This is my code:

Code: [Select]
#include <MD_Parola.h>
#include <MD_MAX72xx.h>

#define MAX_DEVICES 14
#define MAX_ZONES 2

#define CLK_PIN 13
#define DATA_PIN 11
#define CS_PIN 10

MD_Parola P = MD_Parola(CS_PIN, MAX_DEVICES);
#define SPEED_TIME 25
#define PAUSE_TIME 1000

int j=0;

void setup() {
  P.begin(2);
  P.setIntensity(0);
  P.setInvert(false);
}

void loop() {
  if (P.displayAnimate()) {
    switch(j) {
      case 1:
        P.setZone(0, 0, 13);
        P.displayZoneText(0, "zone 0 + 1", CENTER, SPEED_TIME, PAUSE_TIME, SCROLL_LEFT, SCROLL_LEFT);
        break;
      default:
        P.setZone(0, 0, 6);
        P.setZone(1, 7, 13);
        P.displayZoneText(0, "zone 0", CENTER, SPEED_TIME, PAUSE_TIME, SCROLL_LEFT, SCROLL_DOWN);
        P.displayZoneText(1, "zone 1", CENTER, SPEED_TIME, PAUSE_TIME, SCROLL_LEFT, SCROLL_UP);
    }
    for (uint8_t i=0; i<MAX_ZONES; i++) {
      P.displayReset(i);
    }
    j++;
    if (j>1)
    j=0;
  }
}
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Sep 17, 2015, 12:23 am
Your loop() seems to be changing the zones every time through the loop. This means it is happening at least a few hundred times a second. Your j++ needs to be triggered by some event like a switch being pressed or a certain time has passed (blinkwithoutdelay style).

You will also need to animate the zones or nothing will happen.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Sep 19, 2015, 10:01 am
I have uploaded to the Parola Codeplex source code section a new Parola example that does dynamic zones. This will be rolled into the next release.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: Arek00 on Sep 19, 2015, 11:33 am
I have already done it but of course I will check your solution :)
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: jaymonkey on Sep 20, 2015, 05:23 pm
Hi Marco,

Great job with your Parola Max7219 LED Matrix project ..... It's a well thought-out library, however i have a relatively easy to implement enhancement request ...

Would it be possible for you to add support for common anode (row) matrix displays ? .... they are functionally exactly the same as the common cathode (row) matrix modules you use in your 1st post and superb Parola documentation except that the anode and cathode are revered the so row and cols need swapping around.

Someone already implemented this as a git patch to the commonly used LEDControl library,  it adds a boolean flag to the end of the LC method true=common Anode, false=common cathode.

The patch code for LEDControl is detailed in this post:-

http://forum.arduino.cc/index.php?topic=121174.0

You could implement it as a boolean flag at the end of the main method passed parameters ... if it's not included it is initialised to false (common cathode) thus maintaining backwards compatibility ?

It would be awesome if you could implement/support common anode matrix displays ...

Great work dude ...

Cheers
Jay
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Sep 20, 2015, 11:11 pm
Quote
It would be awesome if you could implement/support common anode matrix displays
This has been part of the MD_MAx72xx library from almost day 1. It is fully explained in the documentation for that library - please read it. You will need to change a #define in the header file to tell the library what type of module you are using.

FYI you need to do more than change for common anode/cathode. If you only have one matrix, then a single flag is sufficient as you can rotate the physical hardware to give you the orientation you need. However, if you are designing a system so that matrices can be ganged up side by side to scroll messages, then the orientation and direction of the matrices against a common coordinate system is important.

Thanks for the suggestion, though.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: jaymonkey on Sep 21, 2015, 12:43 pm
Thanks for your post Marco

To date i've been using LEDControl library to drive a single 8x8 matrix however i want to daisy chain 8 to 10 modules together to create a alpha/numeric display.

I already have a bunch of green 8x8 led matrix that i want to use on the project (but are common anode), i got one working with a standard max7219 matrix driver module (like the ones in your documentation) by swapping the row/col pins however it then ends up as a rotated mirror image compared to standard module.

Implementing the patch corrects the row/col addressing to match a common cathode module, 0,0 = top left, 7,7 = bottom right

If i use the alternate #define that you mention will i be able to use your Parola software to drive 8 to 10 modules (common anode) ?

I would rather use your library which supports fonts rather than LEDControl which uses bit map pattens to create text ...

I Will delve into the MAX72XX library documentation and see if i can find the #define your referring to.

Cheers
Jay
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: jaymonkey on Sep 21, 2015, 01:22 pm
Marco,

I've been reading through your (very well written and presented) documentation :-


I can find the reference to using a generic max7219 module (which is what i'm using) but i cant see anything that tells the library its specifically using common anode matrix units.

However i can see you have several row/col transformation classes .. i guess these could be used to obtain the correct module/row/col orientation ... is this what you where suggesting .... ? 

Cheers
Jay
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Sep 21, 2015, 01:39 pm
Just tell it the type of matrix you are using if you have one of those documented. Don't over think it :)
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: Arek00 on Sep 22, 2015, 12:08 pm
I have that code:

Code: [Select]
#include <MD_Parola.h>
#include <MD_MAX72xx.h>

#define MAX_DEVICES 14
#define MAX_ZONES   2
#define STEP_SIZE   2

#define CLK_PIN 13
#define DATA_PIN 11
#define CS_PIN 10

// Hardware SPI connection
MD_Parola P = MD_Parola(CS_PIN, MAX_DEVICES);
// Arbitrary output pins
// MD_Parola P = MD_Parola(DATA_PIN, CLK_PIN, CS_PIN, MAX_DEVICES);

#define SPEED_TIME 25
#define PAUSE_TIME 1000

void setZones(void)
{
  static uint8_t step = 0;

    switch(step) {
      case 1:
        P.setZone(0, 0, 6);
        P.setZone(1, 7, 13);
        P.displayZoneText(0, "|-|-|-|-|", CENTER, 30, 1000, SCROLL_LEFT, SCROLL_LEFT);
        P.displayZoneText(1, "|-|-|-|-|", CENTER, 30, 1000, SCROLL_LEFT, SCROLL_LEFT);
        break;
      case 2:
        P.displayZoneText(0, "|-|-|-|-|", CENTER, 30, 1000, SCROLL_LEFT, SCROLL_LEFT);
        P.displayZoneText(1, "|-|-|-|-|", CENTER, 30, 1000, SCROLL_LEFT, SCROLL_LEFT);
        break;
      default:
        P.setZone(0, 0, MAX_DEVICES-1);
        P.displayZoneText(0, "This is a test", CENTER, 30, 0, SCROLL_LEFT, SCROLL_LEFT);
    }

    step++;
    if (step>2)
    step=0;
}

void setup(void) {
  P.begin(MAX_ZONES);
  P.setInvert(false);
  setZones();
}

void loop(void) {
  if (P.displayAnimate()) { // animates and returns true when an animation is completed
    boolean bAllDone = true;
    for (uint8_t i=0; i<MAX_ZONES && bAllDone; i++) {
      bAllDone = bAllDone && P.getZoneStatus(i);
    }
    if (bAllDone) setZones();
  }
}



Which give that animation:

https://www.youtube.com/watch?v=BIs3joWAKV0 (https://www.youtube.com/watch?v=BIs3joWAKV0)

I know that video is poor quality but you can see that zone 0 (bottom) and 1 (upper) are not synchronizing during animations. Upper zone is one step before bottom zone. Is there any way to synchronize it?
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: jaymonkey on Sep 22, 2015, 12:37 pm
Just tell it the type of matrix you are using if you have one of those documented. Don't over think it :)
Hi Marco

The 8x8 Matrix Modules i'm using are not listed in your documentation ...

http://pdf1.alldatasheet.com/datasheet-pdf/view/286419/CHINASEMI/CSM-88121G.html

As stated they are common anode (row) configuration which is opposite to the more commonly used common cathode (row) displays such as 1088AS which is supplied with most diy max7219 8x8 matrix kits.

From what i understand from your documentation i can rotate the display to allow for mounting orientation but what i really need is to invert the row & cols (mirror mode ?)

Sorry if i've missed something obvious ... but i cant see anything to invert the row/col addressing.

Any pointers in the right direction would be most appreciated

Cheers
Jay

Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Sep 22, 2015, 11:51 pm
Quote
The 8x8 Matrix Modules i'm using are not listed in your documentation
Earlier you said that you were using generic modules. Just tell the system you are using those. Forget about common anode or cathode matrix, that is irrelevant when you are using standard modules.

If you are using a home built module, then try the 'standard modules' first and if none work properly (remembering that you can change the physical orientation of the units) then use the utility in the examples for MD_MAX72xx to determine what the settings should be.

Most of the commonly available matrix modules use common anode, by the way.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Sep 22, 2015, 11:55 pm
Quote
Upper zone is one step before bottom zone. Is there any way to synchronize it
Not that I can see. One zone will always be scrolled just a few milliseconds before/after the other as each zone is treated like an independent display. I guess it is one of the limitations of the library at this stage.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: jaymonkey on Sep 24, 2015, 02:48 pm
Earlier you said that you were using generic modules. Just tell the system you are using those. Forget about common anode or cathode matrix, that is irrelevant when you are using standard modules.

Most of the commonly available matrix modules use common anode, by the way.
@Marco

Although i am using a 'standard module' (which came with red common cathode (row)) i need the displays to be green, I have a lot of common anode (row) green displays in stock so have inverted the modules output to the correct wiring of common anode (row) matrix displays ....

if you compare common cathode to common anode matrix displays schematics you'll see that the row/col addressing is inverted .. this is true for almost all common anode matrix modules ...

The issue of using common anode displays with max7219 is discussed in this post (along with the patch i was referring to) :-

http://forum.arduino.cc/index.php?topic=121174.0

"The 7219 can be easily used with common anode displays, as long as things are wired up "backwards." In other words, the pins for DIG-0 through DIG-7 are current sinks and the pins for SEG-DP through SEG-G are current sources"

My modules and displays work fine using the LCDcontrol lib (with the patch) but it is no where near as flexable as your lib . My modules and displays do work with your lib but the rows & cols are inverted so a character is displayed as if it where in a mirror (inverted and backwards)

I'm sure i could figure out how to apply the bit shift that the patch apples to the LCDcontrol lib and modify your code similarly but i wondered if you could achieve the same result using your transform methods .... and its such a well written and documented lib that i thought it would be a useful addition ...

Cheers
Jay
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Sep 24, 2015, 10:52 pm
I had read the post you refer to before you highlighted it, thanks.

You are persisting in thinking about the problem in your way excluding the possibility that there are other approaches. The issue is how the matrix is wired, irrespective of what 'common' it is.

Any matrix can be physically wired so that the matrix orientation (in physical space) can have rows or columns in either direction and in any order. That is a fact.

This means that writing a library like Parola, where the code must assume a standard coordinate system for it to work, requires a mapping between the physical pixels (LEDs) and this standard coordinate system.

The hardware library (MD_MAX72xx) needs to know if (1) digits are rows or columns and (2) the order in which each axis is wired (up or down). A simplifying assumption is that the LEDs are not wired in random order.

Nowhere in this is there any need to know what type of matrix is being used, and this information is not pertinent to solving the problem in a consistent manner for many hardware module types.

Quote
My modules and displays do work with your lib but the rows & cols are inverted so a character is displayed as if it where in a mirror (inverted and backwards)
As I am sure you read in the documentation, please make sure the generic modules are physically oriented with the chips above the matrix and the 'IN' side on the right. As per my previous post, if you think you have a 'home grown' matrix, the provision is there for the software to suggest the parameter settings.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: Arek00 on Sep 24, 2015, 11:17 pm
Marco, how many devices do you have? Can you test about 20 devices with 4 zones? Just simplest example. I am trying to do that but then nothing appear on display. If you do that please post your code here.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Sep 24, 2015, 11:45 pm
Do you have any code already that I can test. Don't have time to start from zero.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: Arek00 on Sep 24, 2015, 11:57 pm
Code: [Select]
#include <MD_Parola.h>
#include <MD_MAX72xx.h>

#define  MAX_DEVICES 20
#define MAX_ZONES 4

#define CLK_PIN   13
#define DATA_PIN  11
#define CS_PIN    10

MD_Parola P = MD_Parola(CS_PIN, MAX_DEVICES);
#define  SPEED_TIME  25
#define PAUSE_TIME  1000

void setup() {
  Serial.begin(9600);
  Serial.print("START");

  P.begin(MAX_ZONES);
  P.setIntensity(0);
  P.setInvert(false);
 
  P.setZone(0, 0, 4);
  P.setZone(1, 5, 9);
  P.setZone(2, 10, 14);
  P.setZone(3, 15, 19);

  P.displayZoneText(0, "00", CENTER, SPEED_TIME, PAUSE_TIME, PRINT, NO_EFFECT);
  P.displayZoneText(1, "11", CENTER, SPEED_TIME, PAUSE_TIME, PRINT, NO_EFFECT);
  P.displayZoneText(2, "22", CENTER, SPEED_TIME, PAUSE_TIME, PRINT, NO_EFFECT);
  P.displayZoneText(3, "33", CENTER, SPEED_TIME, PAUSE_TIME, PRINT, NO_EFFECT);
}

void loop() {
  P.displayAnimate(); // animates and returns true when an animation is completed
}
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Sep 25, 2015, 12:16 am
Code worked for me. I changed it a bit as per below to test different combinations of zones, but this should not affect the functionality.

Code: [Select]
#define MAX_DEVICES 20
#define MAX_ZONES 4
#define ZONE_SIZE (MAX_DEVICES/MAX_ZONES)

#define CLK_PIN   13
#define DATA_PIN  11
#define CS_PIN    10

MD_Parola P = MD_Parola(CS_PIN, MAX_DEVICES);
#define SPEED_TIME  25
#define PAUSE_TIME  1000

void setup() {
  Serial.begin(9600);
  Serial.print("START");

  P.begin(MAX_ZONES);
  P.setIntensity(0);
  P.setInvert(false);

  for (uint8_t i=0; i<MAX_ZONES; i++)
    P.setZone(i, ZONE_SIZE*i, ((i+1)*ZONE_SIZE)-1);

  P.displayZoneText(0, "00", CENTER, SPEED_TIME, PAUSE_TIME, PRINT, NO_EFFECT);
  P.displayZoneText(1, "11", CENTER, SPEED_TIME, PAUSE_TIME, PRINT, NO_EFFECT);
  P.displayZoneText(2, "22", CENTER, SPEED_TIME, PAUSE_TIME, PRINT, NO_EFFECT);
  P.displayZoneText(3, "33", CENTER, SPEED_TIME, PAUSE_TIME, PRINT, NO_EFFECT);
}

void loop() {
  P.displayAnimate(); // animates and returns true when an animation is completed
}
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Sep 25, 2015, 01:24 am
@Arek00 ref earlier synchronization post

I worked out a way to better synchronise the zones. There is now a new Parola method synchZoneStart() that needs to be called once all the zones are set up and before the first animate(). Code below shows this. Tested your code in my system and it seems to be synchronised now. I expect that for long animations the time may drift towards the end of the animation.

Code: [Select]
    switch(step) {
      case 1:
        P.setZone(0, 0, (MAX_DEVICES/2)-1);
        P.setZone(1, MAX_DEVICES/2, MAX_DEVICES-1);
        P.displayZoneText(0, "|-|-|", CENTER, 30, 1000, SCROLL_LEFT, SCROLL_LEFT);
        P.displayZoneText(1, "|-|-|", CENTER, 30, 1000, SCROLL_LEFT, SCROLL_LEFT);
        P.synchZoneStart();
        break;


The new library code is uploaded to the codeplex site in the Source code section. The only file that has changed is MD_Parola.h (in case you don't want to download all the files).

Changes will be part of the next release.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: Arek00 on Sep 25, 2015, 09:57 pm
Thanks Marco for P.synchZoneStart() ! Now I can introduce my 16-rows display:

https://www.youtube.com/watch?v=7nPCIMVUo5g (https://www.youtube.com/watch?v=7nPCIMVUo5g)

Source code is here: http://forum.arduino.cc/index.php?topic=349553.0 (http://forum.arduino.cc/index.php?topic=349553.0)
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: jaymonkey on Sep 26, 2015, 12:06 am
You are persisting in thinking about the problem in your way excluding the possibility that there are other approaches. The issue is how the matrix is wired, irrespective of what 'common' it is.
@Marco,

Many thanks for your patience .... i understand what your saying now ... apologies for slowness ....my bad

I stopped thinking about it and just worked through your module presets, i found that the f16 module settings did the job and it works perfect now.

Many thanks for the help bro.

Cheers
Jay

Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Sep 26, 2015, 04:04 am
@Arek00
Awesome work. Double height is something that has been requested many times and someone has finally done it! I can now see why you needed synchronization for the zones. :)
Is it alright if I include your sketch in the Parola examples folder?

@jaymonkey
Great to hear it all works fine now.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: Arek00 on Sep 26, 2015, 10:21 am
Of course you can add it to examples! If possible please add link to my video at header description :)
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Sep 30, 2015, 06:12 am
Can someone with a Due (or other non-AVR architrecture) please try using the latest MD_MAX72xx library in the source code section of the codeplex site?

I have recently moved it over to using the SPI library for better portability but do not have the hardware to test non-AVR. Basically the examples should all work as before.

The release version (zip file download) still uses the AVR assembler routines for hardware SPI.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: valenposta on Oct 10, 2015, 02:43 pm
Hi Marco,
I'm using Parola Zone TimeMsg and the DS1307 library (MD_DS1307).
I noticed that the clock module 1307 is not accurate and anticipates every day...15 seconds.
How, at a fixed time of day, can I adjust the seconds?  
In DS1307 library I have not found a possibility like for example:
"RTC.adjust(DateTime(now.year(), now.month(), now.day(),now.hour(),now.minute(), now.second()-10))".
Thanks.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Oct 10, 2015, 04:25 pm
Quote
the clock module 1307 is not accurate and anticipates every day...15 seconds
You can use a more accurate clock like the DS3231 or related. If you want to set the time in the MD_DS1307 library set the same variables you read the time from and then write that out. The library has some examples you can follow or read the header - there are not many methods to that class.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: tonyjl on Oct 11, 2015, 09:14 pm
Hello!

How do I change the display order?

The display should say "Parola" but as you can see from the images, the text is from right to left.

Anyone clever enough to tell me how to fix this?
(http://snag.gy/hdaYs.jpg)
(http://snag.gy/0lSNL.jpg)




Brgds,

Tony
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Oct 11, 2015, 09:23 pm
Make sure you have selected the right module type in the library defines. Also note that the IN side is on the right.  Please read the MD_MAX72xx library documentation on setting up your hardware and review recent posts on this forum.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: tonyjl on Oct 11, 2015, 09:57 pm
Make sure you have selected the right module type in the library defines. Also note that the IN side is on the right.  Please read the MD_MAX72xx library documentation on setting up your hardware and review recent posts on this forum.
AWESOME!

Thanks!

(http://snag.gy/oo82e.jpg)
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: heimdal on Oct 12, 2015, 09:32 pm
I have been looking through the examples for MD_parola and cant find a way to use the default fonts ASCII codes for various characters in the char arrays that is used in most examples.

pretty amazing work though
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Oct 13, 2015, 12:14 am
Quote
I have been looking through the examples for MD_parola and cant find a way to use the default fonts ASCII codes for various characters in the char arrays that is used in most examples.
Not sure what you are talking about. Can you please explain what you are asking for.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: heimdal on Oct 13, 2015, 09:35 pm
for example in the parola_Test.ino, Parola_Zone_Mesg.ino this piece of code define the text printed on the LED-matrixes:
Code: [Select]
char *pc[] =
{
  "Parola for",
  "Arduino",
  "LED Matrix",
  "Display"
};


if i for example want to print these chars: Ä, Ö, "happy smiley" (A umlaut #132, O umlaut #148, "happy smiley" #2. (the number taken from the "parola MD_MAX72xx font builder v1.xlsm"

how do i get the *pc array to recognize the ascii# as a character instead of treating it as a string?

in the parola_CustomChars.ino the method used is this:
Code: [Select]
typedef struct
{
uint8_t spacing; // character spacing
char * msg; // message to display
} msgDef_t;

msgDef_t M[] =
{
  { 1, "User char" },
  { 0, "~~~~" },
  { 1, "24$" },
  { 0, "++++" },
  { 1, "40&" },
  { 0, "^^^^" }
};
#define MAX_STRINGS  (sizeof(M)/sizeof(M[0]))


void setup(void)
{
  Serial.begin(57600);
  PRINTS("\n[Parola User Char Demo]");

  P.begin();

  P.addChar('$', degC);
  P.addChar('&', degF);
  P.addChar('~', waveSine);
  P.addChar('+', waveSqar);
  P.addChar('^', waveTrng);


this method replace common characters with custom ones via .addchar but that is not what i want to do.

is there a way to use the "non standard" chars in a string array? (if I simply type  "ÅÄÖ" in the array i only get weird chars.)

I hope that explain my question better. thank you for your time
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Oct 13, 2015, 11:24 pm
Standard C++ notation is to use escape characters in the string. You may already be familiar with '\n' for the newline character (as in "a line\n"), but generally there is the opportunity to use the ASCII code number after the '\' character. I forget if this needs to be in decimal, octal or hex, but you can easily look it up "C++ string ascii escape character".
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: heimdal on Oct 14, 2015, 10:41 pm
Standard C++ notation is to use escape characters in the string. You may already be familiar with '\n' for the newline character (as n "a line\n"), but generally there is the opportunity to use the ASCII code number after the '\' character. I forget if this needs to be in decimal, octal or hex, but you can easily look it up "C++ string ascii escape character".
"escape character" was the search term i was looking for, thanks.

it seems only octal and hex are useable. Just insert the \xNN (NN=hex value of 00 (0) to FF (255) as a normal character in the string. I find the use of octal ( \NN , NN=octal number) a bit confusing to use.

i tried using the unicode characters, but that failed miserably

http://rosettacode.org/wiki/Special_characters#String_and_character_literal (http://rosettacode.org/wiki/Special_characters#String_and_character_literal)

https://books.google.se/books?id=P7HuWSWtsh0C (https://books.google.se/books?id=P7HuWSWtsh0C&pg=PA84&lpg=PA84&dq=C%2B%2B+string+ascii+escape+character&source=bl&ots=rI8dIrL8hy&sig=2e-X50eHyG9osvVZJkR5baFGrlE&hl=en&sa=X&ved=0CFcQ6AEwCWoVChMImLH5j9bCyAIV5nNyCh08XAx4#v=onepage&q=C%2B%2B%20string%20ascii%20escape%20character&f=false)

http://en.cppreference.com/w/cpp/language/escape (http://en.cppreference.com/w/cpp/language/escape)
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: frkn06 on Oct 19, 2015, 02:50 pm
Hi , do it this way , help me , thank you

1 button press

char   *pc[] =
{
  "Parola for",
  "Arduino",
  "LED Matrix",
  "Display"
};


2 button press


char   *pc[] =
{
  "message2",
  "message2",
  "LED Matrix",
  "Display"
};



Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Oct 19, 2015, 03:29 pm
Your request is not clear at all. Also, it would seem to be not directly related to a Parola issue but rather a general 'how to' do something different when a button is pressed.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: frkn06 on Oct 19, 2015, 07:59 pm
multi message ?? car led display
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: YvesD on Oct 19, 2015, 08:56 pm
Hi All,
been through all the post & reply's in this topic, but could'nt find a solution for my problem.
Downloaded MD_72xx lib & MD_Parola lib.

just bought this display :
http://www.aliexpress.com/item/1pcs-MAX7219-dot-matrix-module-microcontroller-module-4-in-one-display/32287428771.html (http://www.aliexpress.com/item/1pcs-MAX7219-dot-matrix-module-microcontroller-module-4-in-one-display/32287428771.html)

on the picture of the manufacturer the 8x8's can be seperated by removing the jumpers.
the one's i received can't get seperated (that way i can't use the HW_mapper tool)

I use an MEGA2560 for this display, connected VCC to VCC on Mega, GND to GND on Mega, DIN to ICPS pin5 on Mega, CS to Pin53 on Mega and CLK tot ICPS pin2 on Mega

But I also tried VCC>VCC Mega, GND>GND Mega, CLK>Mega pin13, DIN>Mega pin11 and CS>Mega pin 10

both options did not work,

then i tried altering the FC-16 swith in the header file to "1"

did'nt work neighter for me

i then tried the HW mapper, but they ask you to only use 1 8x8 display, but i can't seperate them, they are soldered together...

Anyone some help for me?

I'm fairly new to this, i have done project with arduino (chronometer) but now i'm stuck on this, I would like to use this display to show my chrono results

Thanks in Advance

Grtz,
Yves
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Oct 19, 2015, 10:39 pm
Quote
on the picture of the manufacturer the 8x8's can be seperated by removing the jumpers.
Looks the same as post #677 above

Quote
the one's i received can't get seperated (that way i can't use the HW_mapper tool)
I think the instructions suggest that you can cover the modules. The point is that they are distracting you, not that the program does not work.

Quote
both options did not work,
Be specific. No LEDs? Incorrect orientation? What?

Quote
MEGA2560 for this display, connected VCC to VCC on Mega, GND to GND on Mega, DIN to ICPS pin5 on Mega, CS to Pin53 on Mega and CLK tot ICPS pin2 on Mega. But I also tried VCC>VCC Mega, GND>GND Mega, CLK>Mega pin13, DIN>Mega pin11 and CS>Mega pin 10
If you are using the hardware SPI on the MEGA then make sure that you use the correct pins. If you are not using the hardware interface then please make sure that you are using the right initialisation for the Parola object.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: YvesD on Oct 19, 2015, 10:56 pm
Hi Marco_c,

thanks for the (very) quick reply  :)

in the mean time i have cut the soldering to separate one unit from the 3 others.

the HW_mapper test did work then, but...
lines came from top to bottom, dot went from right to left

so i adjusted the settings in the .h file

then i took my second (intact) 4 digit display and connected it as described in the .ino file

loaded the file into the mega

then i had some strange dots lighting up, after that the whole display was lit up (all the dots where "ON")

tried some other examples, but that didn't fix my problem

what are the correct pins? the ICPS header, or the 13, 10 & 11 pins on the Mega?

i find it strange that the whole display lights up (all 4 of them, sometimes one by one, from right to left) and then stay on until i disconnect the display...

tried also the MD_Parola_message, but nothing came on the display's then, they went all "on" and then turned "off" from right to left

Grtz,
Yves
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Oct 20, 2015, 11:06 am
Quote
what are the correct pins? the ICPS header, or the 13, 10 & 11 pins on the Mega?
As per the previous post, if you are trying to connect to the Mega SPI hardware interface pins, these seem to be around pins 50 to 53, or repeated on the ICSP interface. Pins 10, 11 and 13 are the equivalent for the Arduino Uno.

If you are not trying to find the hardware SPI, then you need to change the software startup to the instance where all the pins are defined. This will be commented out in all my code examples.

MEGA Quick Reference (https://arduino-info.wikispaces.com/MegaQuickRef)
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: YvesD on Oct 22, 2015, 07:49 pm
Thanks marco_c,

on a UNO it works fine !!!

will figure out myself how to get it to work witk MEGA 2560


Great job on the library !!!

Grtz,
Yves
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: mrshark on Nov 15, 2015, 10:19 am
hi! :)
can this modules be used? If yes i'll order 1 just ASAP... :)
http://it.aliexpress.com/item/3-75-Unit-Board-64-16-Dot-Matrix-LED-Display-Screen-F3-75-Module-304-76mm/32354931460.html
thanks :)
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Nov 15, 2015, 11:07 am
I don't think so. The displays need to be controlled by a MAX7219 or related chip. Cannot see the detail in the photos but it does not look like these are.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: DuaneDegn on Nov 16, 2015, 03:33 am
These $3 arrays from ICStation (http://www.icstation.com/icstation-max7219-matrix-module-control-display-p-2609.html) aren't as inexpensive per LED as the Aliexpress array, but I like them.

You can link them together both horizontally and vertically (you'd need to add some extra wire to make connections vertically).

They don't fit side by side completely flush unless you sand the edges of the PCB a bit. Here's a video of four of the displays (https://www.youtube.com/watch?v=Hknsb8V3mxc) (I hadn't sanded the edges of mine).
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: AverageMan on Nov 20, 2015, 04:18 pm
Hi Marco

Firstly thanks and WOW - so much great work here, and the documentation to go with it.

I have a few questions, probably because I'm not great at Arduino.

1) In most of the examples the code makes use of a potentiometer to adjust speed. As I don't want/need variable speed just yet, I'm struggling to untangle the pot parts and just set a real basic speed level in the code. Any advice on how to do this, or an example maybe?

2) Linked to above, are there any basic examples anywhere? It would be good to have a few basic examples like that. I found one or two, and then it jumps into much busier sketches using pots etc.

3) Is there any way to turn the characters 180 degrees so they're upside down? I designed a laser cut housing for 4 of my generic modules (not yet cut), using different code, but then learnt that they have to be upside down for Parola.

Apologies if any of this is in the documentation, I've read some of it, but I do get a bit overwhelmed by it at the moment - still learning.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Nov 21, 2015, 01:45 am
1. You can eliminate the UI control (including speed) on many examples by changing
Code: [Select]
#define USE_UI_CONTROL 1
to be defined as 0. Some just have a specific speed control. Where there is no defined way to eliminate the speed control, just return the speed you want instead of the code actually reading the analog value. Not setting the speed at all should be just fine as well.

2. Not sure how basic you need the example to be, but in the source code section (not the 'version' zip file download) there is a minimal "Hello World" example. The source code section has the changes to the code that have not yet made it into an official release (intermediate stages, so to speak).

3. This was requested some time ago and is implemented from version 2.3. Please see my post #636.

The latest copy of the libraries can be found through the link below. Please make sure you also have the latest MD_MAX72xx as well.

Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: Rolly on Nov 21, 2015, 04:05 pm
Hi.

I have MAX72xx but the board isn't like yours. Yours have the connectors side by side while mine is on top and bottom. I think I have the generic version.

So what I use the library, it works but the displays are crazy. Instead of the text scrolling side to side, is scrolls from bottom to top of one MAX72XX module to the next module, and so fort.

Is there anything to adjust so I can use my modules?
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Nov 21, 2015, 07:58 pm
As I have said many times on this forum, please read the documentation for MD_MAX72xx, especially the section about hardware.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: Rolly on Nov 22, 2015, 07:31 am
Thank you so much! I've got it working correctly now.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: AverageMan on Nov 23, 2015, 11:13 am
Thanks again marco

I've managed to get them working as I wanted (a simple scrolling message for my dad's bar), my sketch looks like this:

Code: [Select]
#include <MD_Parola.h>
#include <MD_MAX72xx.h>
#if USE_LIBRARY_SPI
#include <SPI.h>
#endif

#define    MAX_DEVICES    4   // Define the number of devices we have in the chain and the hardware interface
#define    CLK_PIN        13
#define    DATA_PIN       11
#define    CS_PIN         10

// Hardware SPI connection
MD_Parola P = MD_Parola(CS_PIN, MAX_DEVICES);
// Arbitrary output pins
// MD_Parola P = MD_Parola(DATA_PIN, CLK_PIN, CS_PIN, MAX_DEVICES);

void setup(void)
{
 P.begin();
 P.setSpeed(20);
 P.setPause(20);
 P.displayScroll("Whisky + Wine Bar", LEFT, SCROLL_LEFT, 50);
 P.displayReset();
}

void loop(void)
{
  if (P.displayAnimate())
  {
    P.displayReset();
  }
}


Next I'm going to look at a rotary encoder to set different messages, might take me a while to work that one out though  :)
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: littleSusi on Nov 23, 2015, 02:15 pm
Hello,

first I want to say how much I like parola. Some weeks I played around with four small FC16 modules. A few days ago I on a garage sale I bought 8 bigger matrix modules.
They are wired like the generic modules described in "MD_MAX72xx_lib.h" But the first module is on the left. Parola addressed from right to the left. So the text is not readable. :-(

Is there an easy way to set the first module to the left?

Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Nov 23, 2015, 07:43 pm
Turn the modules 'end for end'? ie rotate along the short dimension and adjust the software setting to suit.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: YvesD on Nov 23, 2015, 08:39 pm
Hi marco_c,

i was wondering, for this moment i only need a certain text to be displayed in the center (text comes in via RX-TX) until a next text message arrives to the arduino

i've gone through all the examples (i'm fairly new to arduino/c coding)
but i did not find the simpelest method to do just that...

I tried with displayText & displayAnimate but i was not succesfull in just keeping the text on the display until a next message came in

Code: [Select]
void loop()
{
  readSerial();
  if (newMessageAvailable)
    {
      P.displayText(newMessage,CENTER,0,0,PRINT,NO_EFFECT);
      newMessageAvailable = false;
    }
//    P.displayReset();
}


can anyone help me out?

Grtz,
Yves
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: YvesD on Nov 23, 2015, 09:47 pm
Hi,

found it !!  :)  :)

Code: [Select]
#include <MD_Parola.h>
#include <MD_MAX72xx.h>
#define MAX_DEVICES 7
#define CS_PIN 10

MD_Parola P = MD_Parola(CS_PIN, MAX_DEVICES);

#define PAUSE_TIME 500
#define FRAME_TIME    50
//#define SPACE_DEADBAND  2

// Global message buffers shared by Serial and Scrolling functions
#define BUF_SIZE 75
char curMessage[BUF_SIZE];
char newMessage[BUF_SIZE];
bool newMessageAvailable = false;

void readSerial(void)
{
  static uint8_t putIndex = 0;
  while (Serial.available())
  {
    newMessage[putIndex] = (char)Serial.read();
    if ((newMessage[putIndex] == '\n') || (putIndex >= BUF_SIZE-2)) // end of message character or full buffer
    {
      // put in a message separator and end the string
      newMessage[putIndex] = '\0';
      // restart the index for next filling spree and flag we have a message waiting
      putIndex = 0;
      newMessageAvailable = true;
    }
      else
      // Just save the next char in next location
      newMessage[putIndex++];
  }
}

void setup()
{
  Serial.begin(57600);
  P.begin();
  P.displayClear();
  P.displaySuspend(false);
  P.displayText(curMessage, CENTER, FRAME_TIME, PAUSE_TIME, PRINT, NO_EFFECT);
  strcpy(curMessage, "Start-Up !");
  newMessage[0] = '\0';
}

void loop()
{
  readSerial();
  if (P.displayAnimate())
  {
    if (newMessageAvailable)
    {
      strcpy(curMessage, newMessage);
      newMessageAvailable = false;
    }
    P.displayReset();
  }
}


Grtz,
Yves
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: littleSusi on Nov 24, 2015, 07:45 am
Hello Marco,

Unfortunately I can not turn the modules because they are not separate. There are always 4 modules on a circuit board and the input-pin is left.

I think about to solder 2 wires on the back, to change the in and output to the right.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Nov 24, 2015, 07:58 am
I don't think that not separating should make a difference, but you know the modules better.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: littleSusi on Nov 24, 2015, 04:03 pm
Hi,

one problem solved :-) and the next one is already there.

The display works now fine, but I can not print German "umlaute" ÄÖÜ äöü and ß.
All others chars are displayed without problems. Umlaute produce only trash.

I use the simple Hello world code.

Code: [Select]

void setup(void)
{
  P.begin();
  P.displayText("äöüÄÖÜß", CENTER, 0, 0, PRINT, NO_EFFECT);
}

void loop(void)
{
 P.displayAnimate();
}


Where is my fault? Any idea?

--EDIT--
Okay, now I tried the showCharset code from MD_MAX72xx_Test. The "umlaute" are displayed correctly.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: AverageMan on Nov 26, 2015, 12:12 pm
I have updated the library site with the latest release (version 2.3).

The release rolls up the incremental changes that have been available in the source code folders and adds a new animation type.

- Added set/getScrollSpacing() methods and associated Scrolling_Spacing example
- Added set/getZoneEffect with FLIP_LR and FLIP_UD, with associated Zone_Mirror example
- Added MESH animation
- Fixed minor bugs and documentation

As usual, any issues please let me know.
Hi Marco

Thanks for this. I 'think' FLIP_UD is what I need, but i can't see how to implement this with basic scrolling text.

I currently have something like this:

P.displayScroll("This is my message", LEFT, SCROLL_LEFT, 50);

It won't let me add FLIP_UD after SCROLL_LEFT as it errors out on the validation. I know it's got something to do with zones (I'm only using one zone) but can't get my head around where to put this FLIP_UD part.

Can you help at all? I have a laser cut and almost finished project (an xmas present for my dad) but this is the last hurdle. Looking forward to sharing pics/vid with you once finished.

Thank you
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Nov 26, 2015, 06:42 pm
There is a separate method to set the attributes for the zone. As it said in the announcement you quoted:

Quote
- Added set/getZoneEffect with FLIP_LR and FLIP_UD, with associated Zone_Mirror example
Look at the Zone_Mirror example.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: AverageMan on Nov 26, 2015, 10:07 pm
There is a separate method to set the attributes for the zone. As it said in the announcement you quoted:

Look at the Zone_Mirror example.
I saw that and am reading the help files as well as trying the example - but alas I get nowhere :(

In the zone_mirror example, the FLIP sections appear to do nothing - I can change them from true to false, or comment them out completely, and the display continues to do the same thing and work as before. As a result, I can't see how they work.

Any more clues you can offer me?
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Nov 26, 2015, 10:13 pm
Please post your code, as I have not yet mastered telepathic mind reading.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: AverageMan on Nov 26, 2015, 10:25 pm
I think I can see two reasons why it wasn't working:


I think I'm going to have to laser cut a new panel with a reverse layout though, as I really need scrolling text for the display I'm making, and currently my generic displays are set upside down as such.

Here's my code for what it's worth - which currently has the text upside down but backwards/mirrored - because I'm using SCROLL_LEFT which i know is wrong:

Code: [Select]
#include <MD_Parola.h>
#include <MD_MAX72xx.h>
#if USE_LIBRARY_SPI
#include <SPI.h>
#endif

#define    MAX_DEVICES    4   // Define the number of devices we have in the chain and the hardware interface
#define    CLK_PIN        13
#define    DATA_PIN       11
#define    CS_PIN         10

// Hardware SPI connection
MD_Parola P = MD_Parola(CS_PIN, MAX_DEVICES);
// Arbitrary output pins
// MD_Parola P = MD_Parola(DATA_PIN, CLK_PIN, CS_PIN, MAX_DEVICES);

void setup(void)
{
 P.begin();
 P.setSpeed(20);
 P.setPause(20);
 P.setZoneEffect(0, true, FLIP_UD);
 P.setZoneEffect(0, true, FLIP_LR); //had to make zone zero as have only one zone (as no zones specified) //Does not work with textEffect_t types SLICE, SCROLL_LEFT, SCROLL_RIGHT
 P.displayScroll("This is my test message", LEFT, SCROLL_LEFT, 40);
 P.displayReset();
}

void loop(void)
{
  if (P.displayAnimate())
  {
    P.displayReset();
  }
}
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Nov 26, 2015, 11:22 pm
ok. Try a different animation and see if that works.

The animations commented out in the zone_mirror table are commented out because they don't work properly once you flip/reverse, so make sure that you get what you want BEFORE you cut a new panel or  you could be wasting your time.

I also go back to my original comments that you should be able to flip the panels 1234 to 4321 (by 180 degree rotation) and adjust in the library settings software.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: AverageMan on Nov 26, 2015, 11:28 pm
Cheers Marco

A new panel is what I need then, as SCROLL_LEFT is what I want for the display. It's a simple display not using all of the cool effects, but that works well for what it will be used for. I'll make another one afterwards with more flashy stuff and buttons etc.

It's only £5 for a new front panel so no biggie, just a case of moving things down a bit. I'll share the project on here when it's done.

Thanks again for your help.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: frkn06 on Nov 27, 2015, 06:22 pm
, the text is from right to left.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Nov 28, 2015, 06:39 am
Quote
, the text is from right to left.
This somewhat describes your photo, as the text is also upside down, however it is not a sentence I can understand.

If your problem is that the library is not working as you think it should, then please refer to my answer in post #697 and a number of others before that.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: Randcook on Nov 29, 2015, 07:45 pm
Any others help with this?
http://forum.arduino.cc/index.php?topic=362625.0
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: The_Undertaker on Dec 12, 2015, 08:14 am
Hi...Maro_c you r great Man....nice Job.....Have downloaded ur Libraries uploaded n run :-MD_MAX72xx_DaftPunk, MD_MAX72xx_HW_Mapper, MD_MAX72xx_PrintText sucessufully....

But how to scroll Text like u in you tube..... I mean which Example u r using from MD_72xx Libraries

and what ru using to enter text is  dis Serial Monitor or something else




Pls..Pls answer
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Dec 12, 2015, 08:21 am
The video uses the Parola libraries sit over the top of the md_max72xx. Available at the link in my signature block below.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: The_Undertaker on Dec 13, 2015, 06:16 am
The video uses the Parola libraries sit over the top of the md_max72xx. Available at the link in my signature block below.
Hi... marco_c Thanxx for ur reply... am very new to Arduino n... have very Low knowledge in programming...
I want to do what u have done in this vdo of you tube......https://www.youtube.com/watch?v=JgzVCSFaz3I

Would you be kind enough to send a sketch combination of all d effects n style... currently using only d serial monitor as input n details of pull up switches n speed control..... means where to connect to d aurdino pins..
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Dec 13, 2015, 06:29 am
Something must be wrng with yr kbd as it drps vwls all ovr d plce when you type :P

I assume you are not using a phone, so please make your messages full words. It's easier on my tired brain.

All the video software is in the examples for the Parola library. Once you install that library you will have it in the examples folder.

I assume you are talking about the controller board? If you are, then the board is described somewhere back in history on this forum but also at my blog https://arduinoplusplus.wordpress.com/2015/06/ (https://arduinoplusplus.wordpress.com/2015/06/)

For any other hardware definitions, look at the top of the file as #defines for the pin numbers.

If you mean something else, please explain again.



Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: The_Undertaker on Dec 13, 2015, 12:53 pm
Something must be wrng with yr kbd as it drps vwls all ovr d plce when you type :P

I assume you are not using a phone, so please make your messages full words. It's easier on my tired brain.

All the video software is in the examples for the Parola library. Once you install that library you will have it in the examples folder.

I assume you are talking about the controller board? If you are, then the board is described somewhere back in history on this forum but also at my blog https://arduinoplusplus.wordpress.com/2015/06/ (https://arduinoplusplus.wordpress.com/2015/06/)

For any other hardware definitions, look at the top of the file as #defines for the pin numbers.

If you mean something else, please explain again.

Hi...Marco_c.....Thanxx for ur replay ....sorry for my Language...

my question is are momentary tact switches connected to D4 through D9 to d Ground?
mean to say are all d switches connected to ground on d other side?

2nd I want to scroll text with different effects as in yours youtube Video... by pressing momentary tact switches

like u.... now my Question is if I use.... "Parola_Display' Example Sketch from ur MD_Parola example Libraries will I be able to scroll text with different effects by  pressing momentary tact switches as in ur Video..... 

Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Dec 13, 2015, 08:15 pm
Quote
mean to say are all d switches connected to ground on d other side?
Yes. The circuit diagram on the blog is clear on this.

Quote
"Parola_Display' Example Sketch from ur MD_Parola example Libraries will I be able to scroll text with different effects by  pressing momentary tact switches as in ur Video
Yes. The same controller is used for all the Parola examples.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: The_Undertaker on Dec 14, 2015, 06:10 am
Hi.. marco_c......Thnxx...for ur reply....

The Problem was not in d Hardware.... :smiley-lol:
it was software...need to change

#define   USE_UI_CONTROL   0

#define   USE_UI_CONTROL   1

Now its working for me... :smiley-razz:

After all ur great Man...

Now can I control d text using Bluetooth Module..by an Android mobile

Pls help me marco_c
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Dec 14, 2015, 06:28 am
Don't know anything about Bluetooth or Android, I am afraid.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: The_Undertaker on Dec 14, 2015, 06:56 am
Hi...Macro_c

I mean instead of using serial monitor can I use Bluetooth module
n my Android Mobile...


Thanxxx.....


 
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Dec 14, 2015, 06:58 am
Probably but you will have to work that out yourself.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: The_Undertaker on Dec 14, 2015, 10:23 am
Thanxx......... marco_c for ur reply

But I have no knowledge of programming.... 
if you get time will u be kind enough to
write d sketch for me Pls....

Now I have wired d Pot n d momentary Switch...
Invert-set  switch working fine but

DIRECTION_SET   8   // change the effect only works with two effects
How to make it work with all d effects Pls Reply


After all its a great Project

Thnxx...




Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Dec 14, 2015, 10:32 am
You are on your own for the Bluetooth. Maybe start another thread somewhere else more appropriate.

Direction set should only really work with text scrolling. All the others are specific animations.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: The_Undertaker on Dec 14, 2015, 10:49 am
You are on your own for the Bluetooth. Maybe start another thread somewhere else more appropriate.

Direction set should only really work with text scrolling. All the others are specific animations.
Left right Direction change is working with scrolling....

but when i press effect switch connected to pin D9 only two effects works

intensity fade etc and other does't works

pls help me out

Am Copy pasting d sketch pls edit if any mistake n post pls


Thnxxx
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: The_Undertaker on Dec 14, 2015, 11:21 am
// Use the Parola library to scroll text on the display
//
// Demonstrates the use of the scrolling function to display text received
// from the serial interface
//
// User can enter text on the serial monitor and this will display as a
// scrolling message on the display.
// Speed for the display is controlled by a pot on SPEED_IN analog in.
// Scrolling direction is controlled by a switch on DIRECTION_SET digital in.
// Invert ON/OFF is set by a switch on INVERT_SET digital in.
//
// Keyswitch library can be found at http://arduinocode.codeplex.com
//

#include <MD_Parola.h>
#include <MD_MAX72xx.h>

// set to 1 if we are implementing the user interface pot, switch, etc
#define   USE_UI_CONTROL   1


#if USE_UI_CONTROL
#include <MD_KeySwitch.h>
#endif

// Turn on debug statements to the serial output
#define  DEBUG  1

#if  DEBUG
#define   PRINT(s, x)   { Serial.print(F(s)); Serial.print(x); }
#define   PRINTS(x)   Serial.print(F(x))
#define   PRINTX(x)   Serial.println(x, HEX)
#else
#define   PRINT(s, x)
#define PRINTS(x)
#define PRINTX(x)
#endif

// Define the number of devices we have in the chain and the hardware interface
// NOTE: These pin numbers will probably not work with your hardware and may
// need to be adapted
#define   MAX_DEVICES   8
#define   CLK_PIN      13
#define   DATA_PIN   11
#define   CS_PIN      10

// HARDWARE SPI
MD_Parola P = MD_Parola(CS_PIN, MAX_DEVICES);
// SOFTWARE SPI
//MD_Parola P = MD_Parola(DATA_PIN, CLK_PIN, CS_PIN, MAX_DEVICES);


#define   PAUSE_TIME      1000
#define   SPEED_DEADBAND   5

// Scrolling parameters
#if USE_UI_CONTROL
#define   SPEED_IN      A5
#define   DIRECTION_SET   8   // change the effect
#define   INVERT_SET      9   // change the invert

#endif // USE_UI_CONTROL

uint8_t   frameDelay = 25;   // default frame delay value
textEffect_t   scrollEffect = SCROLL_LEFT;

// Global message buffers shared by Serial and Scrolling functions
#define   BUF_SIZE   75
char curMessage[BUF_SIZE];
char newMessage[BUF_SIZE];
bool newMessageAvailable = false;

#if USE_UI_CONTROL

MD_KeySwitch uiDirection(DIRECTION_SET);
MD_KeySwitch uiInvert(INVERT_SET);

void doUI(void)
{
  // set the speed if it has changed
  {
    int16_t   speed = map(analogRead(SPEED_IN), 0, 1023, 10, 150);

    if ((speed >= ((int16_t)P.getSpeed() + SPEED_DEADBAND)) ||
      (speed <= ((int16_t)P.getSpeed() - SPEED_DEADBAND)))
    {
      P.setSpeed(speed);
      P.setPause(speed);
      frameDelay = speed;
      PRINT("\nChanged speed to ", P.getSpeed());
    }
  }

  if (uiDirection.read() == MD_KeySwitch::KS_PRESS)   // SCROLL DIRECTION
  {
    PRINTS("\nChanging scroll direction");
    scrollEffect = (scrollEffect == SCROLL_LEFT ? SCROLL_RIGHT : SCROLL_LEFT);
    P.setTextEffect(scrollEffect, scrollEffect);
    P.displayReset();
  }

  if (uiInvert.read() == MD_KeySwitch::KS_PRESS)   // INVERT MODE
  {
    PRINTS("\nChanging invert mode");
    P.setInvert(!P.getInvert());
  }
}
#endif // USE_UI_CONTROL

void readSerial(void)
{
  static uint8_t   putIndex = 0;

  while (Serial.available())
  {
    newMessage[putIndex] = (char)Serial.read();
    if ((newMessage[putIndex] == '\n') || (putIndex >= BUF_SIZE-2))   // end of message character or full buffer
    {
      // put in a message separator and end the string
      newMessage[putIndex] = '\0';
      // restart the index for next filling spree and flag we have a message waiting
      putIndex = 0;
      newMessageAvailable = true;
    }
      else
      // Just save the next char in next location
      newMessage[putIndex++];
  }
}

void setup()
{
  Serial.begin(57600);

#if USE_UI_CONTROL
  uiDirection.begin();
  uiInvert.begin();
  pinMode(SPEED_IN, INPUT);

  doUI();
#endif // USE_UI_CONTROL

  P.begin();
  P.displayClear();
  P.displaySuspend(false);

  P.displayScroll(curMessage, LEFT, scrollEffect, frameDelay);

  strcpy(curMessage, "Hello! Enter new message?");
  newMessage[0] = '\0';

  Serial.begin(57600);
  Serial.print("\n[Parola Scrolling Display]\nType a message for the scrolling display\nEnd message line with a newline");
}

void loop()
{
#if USE_UI_CONTROL
   doUI();
#endif // USE_UI_CONTROL

  readSerial();
  if (P.displayAnimate())
  {
    if (newMessageAvailable)
    {
      strcpy(curMessage, newMessage);
      newMessageAvailable = false;
    }
    P.displayReset();
  }
}
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Dec 15, 2015, 03:03 am
You have simply posted the example program that has worked for hundreds of people.

Look at the way that your switches are wired and make sure that your circuit is correct.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: The_Undertaker on Dec 15, 2015, 03:41 am
Hi...marco-c sorry for my Post..... ???  ???

Its also working for me but with only two effects

am pasting d sketch so that u can see n edit for me pls





Thnxxx





Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Dec 15, 2015, 05:30 am
The example you are using only has 2 buttons configured to work for Direction and Invert.

#define   DIRECTION_SET   8   // change the effect
#define   INVERT_SET      9   // change the invert

Use a different example, or copy the code from the other example if you absolutely need to use this code. The code is already available.

You also probably need to do a beginners course in C++ if you have not done so already.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: The_Undertaker on Dec 15, 2015, 06:02 am
Thanxx marco_c for ur quick reply

will try other Libraries....n post d result


n Thanxx for ur suggestion....
yes am a very beginner to programming
will try to learn c++




The_Undertaker




   
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: prince_x2 on Dec 16, 2015, 01:48 pm
I love it :) Thanks for sharing ^_^
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: johnacsyen on Dec 21, 2015, 11:44 am
Greetings,
I am using a generic LED matrix that I bought from banggood.com
http://www.banggood.com/3Pcs-MAX7219-Dot-Matrix-Module-DIY-Kit-SCM-Control-Module-For-Arduino-p-956943.html (http://www.banggood.com/3Pcs-MAX7219-Dot-Matrix-Module-DIY-Kit-SCM-Control-Module-For-Arduino-p-956943.html)

The code is the scrolling example from Parola.

I added the code ..
Code: [Select]

   P.begin(1);
   P.setZone(0, 0, 3);
   P.setZoneEffect(0, true, FLIP_UD);


so that my matrix text is not upside down.

The problem is the text is scrolling vertically with respect to the Max chip, see the video here, https://www.youtube.com/watch?v=ixpJcO-WTaQ (https://www.youtube.com/watch?v=ixpJcO-WTaQ). (the PCBs are shown on lying on their side)

How to modify the code so that when the matices are arranged edge by edge with the Max chip at the bottom, the text is scrolling from left to right. In other words how to rotate the text counter-clockwise 90 degrees from what is show currently.

Thanks for any assistance.

Code: [Select]
// Use the Parola library to scroll text on the display
//
// Demonstrates the use of the scrolling function to display text received
// from the serial interface
//
// User can enter text on the serial monitor and this will display as a
// scrolling message on the display.
// Speed for the display is controlled by a pot on SPEED_IN analog in.
// Scrolling direction is controlled by a switch on DIRECTION_SET digital in.
// Invert ON/OFF is set by a switch on INVERT_SET digital in.
//
// Keyswitch library can be found at http://arduinocode.codeplex.com
//

#include <MD_Parola.h>
#include <MD_MAX72xx.h>

#define USE_PAROLA_HW 0
#define USE_GENERIC_HW 1


// set to 1 if we are implementing the user interface pot, switch, etc
#define USE_UI_CONTROL 0

#if USE_UI_CONTROL
#include <MD_KeySwitch.h>
#endif

// Turn on debug statements to the serial output
#define  DEBUG  1

#if  DEBUG
#define PRINT(s, x) { Serial.print(F(s)); Serial.print(x); }
#define PRINTS(x) Serial.print(F(x))
#define PRINTX(x) Serial.println(x, HEX)
#else
#define PRINT(s, x)
#define PRINTS(x)
#define PRINTX(x)
#endif

// Define the number of devices we have in the chain and the hardware interface
// NOTE: These pin numbers will probably not work with your hardware and may
// need to be adapted
#define MAX_DEVICES 3
#define CLK_PIN 13
#define DATA_PIN 11
#define CS_PIN 10

// HARDWARE SPI
MD_Parola P = MD_Parola(CS_PIN, MAX_DEVICES);
// SOFTWARE SPI
//MD_Parola P = MD_Parola(DATA_PIN, CLK_PIN, CS_PIN, MAX_DEVICES);


#define PAUSE_TIME 1000
#define SPEED_DEADBAND 5

// Scrolling parameters
#if USE_UI_CONTROL
#define SPEED_IN A5
#define DIRECTION_SET 8 // change the effect
#define INVERT_SET 9 // change the invert

#endif // USE_UI_CONTROL

uint8_t frameDelay = 150; // default frame delay value controls scroll speed
textEffect_t scrollEffect = SCROLL_LEFT;

// Global message buffers shared by Serial and Scrolling functions
#define BUF_SIZE 75
char curMessage[BUF_SIZE];
char newMessage[BUF_SIZE];
bool newMessageAvailable = false;

#if USE_UI_CONTROL

MD_KeySwitch uiDirection(DIRECTION_SET);
MD_KeySwitch uiInvert(INVERT_SET);

void doUI(void)
{
  // set the speed if it has changed
  {
    int16_t speed = map(analogRead(SPEED_IN), 0, 1023, 10, 150);

    if ((speed >= ((int16_t)P.getSpeed() + SPEED_DEADBAND)) ||
      (speed <= ((int16_t)P.getSpeed() - SPEED_DEADBAND)))
    {
      P.setSpeed(speed);
      P.setPause(speed);
      frameDelay = speed;
      PRINT("\nChanged speed to ", P.getSpeed());
    }
  }

  if (uiDirection.read() == MD_KeySwitch::KS_PRESS) // SCROLL DIRECTION
  {
    PRINTS("\nChanging scroll direction");
    scrollEffect = (scrollEffect == SCROLL_LEFT ? SCROLL_RIGHT : SCROLL_LEFT);
    P.setTextEffect(scrollEffect, scrollEffect);
    P.displayReset();
  }

  if (uiInvert.read() == MD_KeySwitch::KS_PRESS) // INVERT MODE
  {
    PRINTS("\nChanging invert mode");
    P.setInvert(!P.getInvert());
  }
}
#endif // USE_UI_CONTROL

void readSerial(void)
{
  static uint8_t putIndex = 0;

  while (Serial.available())
  {
    newMessage[putIndex] = (char)Serial.read();
    if ((newMessage[putIndex] == '\n') || (putIndex >= BUF_SIZE-2)) // end of message character or full buffer
    {
      // put in a message separator and end the string
      newMessage[putIndex] = '\0';
      // restart the index for next filling spree and flag we have a message waiting
      putIndex = 0;
      newMessageAvailable = true;
    }
      else
      // Just save the next char in next location
      newMessage[putIndex++];
  }
}

void setup()
{
  Serial.begin(57600);

#if USE_UI_CONTROL
  uiDirection.begin();
  uiInvert.begin();
  pinMode(SPEED_IN, INPUT);

  doUI();
#endif // USE_UI_CONTROL

  P.begin(1);
   P.setZone(0, 0, 3);
   P.setZoneEffect(0, true, FLIP_UD);



  P.displayClear();
  P.displaySuspend(false);

  P.displayScroll(curMessage, LEFT, scrollEffect, frameDelay);

  strcpy(curMessage, "quick brown fox");
 
  newMessage[0] = '\0';

  Serial.begin(57600);
  // Serial.print("\n[Parola Scrolling Display]\nType a message for the scrolling display\nEnd message line with a newline");
}

void loop()
{
#if USE_UI_CONTROL
doUI();
#endif // USE_UI_CONTROL

  readSerial();
  if (P.displayAnimate())
  {
    if (newMessageAvailable)
    {
      strcpy(curMessage, newMessage);
      newMessageAvailable = false;
    }
    P.displayReset();
  }
}
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Dec 21, 2015, 07:17 pm
@johnacsyen, Please refer to answers #697, #676, (and many others) earlier in this forum thread.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: The_Undertaker on Dec 26, 2015, 03:58 am
Thanxx to Marco_c

for his great effort n sharing...


https://www.youtube.com/watch?v=XlzL9mCiWOI (https://www.youtube.com/watch?v=XlzL9mCiWOI)


its working for me... now

the problem was with o/s formatted my PC reinstalled
n worked
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Dec 26, 2015, 04:07 am
Nice video, thanks.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: The_Undertaker on Dec 28, 2015, 09:49 am
Hi..Marco_c

Trying one more Library...Parola_Zone_TimeMsg
But getting some error...
I think have install all d Libraries file

Attaching some snap shoots

 Pls help me out

Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Dec 28, 2015, 10:21 pm
FYI it is easier to cut and paste the error text from the output to the post than to put an image in place. easier for me to read as well.

Looks to me like you have an older version of the example code. The time library was changed some time ago (Sep 6) and the example was updated. You seem to have a new version of my RTC library and the older example code - some function names were changed slightly (eg, ReadTime became readTime).

You can download the new version of the example code from the source code section of the codeplex site or use the one attached. I don't think the font file has changed.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: The_Undertaker on Jan 01, 2016, 05:38 am
Thanxx Marco_c

Now I could Upload d code....

But which pins to connect to DHT11 & DS 1307 n Ardino Nano
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Jan 01, 2016, 08:18 pm
All the pins are defined in the code at or near the top of the example code. Please read the code.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Jan 02, 2016, 10:41 am
There is a new consolidated release for MD_Parola and MD_MAX72xx library on the distribution site (zip file). There are no major changes to functionality, more a consolidation of all the changes in the last year or so. MD_Parola needs the latest MD_MAX72xx to run.

As usual, any issues you identify please raise them on this forum.

MD_Parola version 2.4

MD_MAX72xx version 2.8
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: The_Undertaker on Jan 05, 2016, 09:22 am
All the pins are defined in the code at or near the top of the example code. Please read the code.
Hi marco_c read d code n found that for DHT11 it is 2
#define   DHT11_PIN   2

But its not clear for DS1307

Pls help me out

n Nice work for d new version MD_MAX72xx version 2.8

Thnxxx....
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Jan 05, 2016, 09:52 am
The RTC uses I2C interface, so you need to connect those pins.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: Randcook on Jan 10, 2016, 12:49 pm
Parola Zone Time Msg.

Works with the default mode Date Temp etc. using the HC16 ebay linked modules.


Changed line 17 to #define   USE_DS1307 true   

errors on this line RTC.ReadTime();


exit status 1
'class MD_DS1307' has no member named 'ReadTime'

Any ideas ????
 


Code: [Select]
// Program to demonstrate the MD_Parola library
//
// Display the time in one zone and other information scrolling through in
// another zone.
// - Time is shown in a user defined fixed width font
// - Scrolling text uses the default font
// - Temperature display uses user defined characters
// - Optional use of DS1307 module for time and DHT11 sensor for temp and humidity
//   - DS1307 library (MD_DS1307) found at http://arduinocode.codeplex.com
//   - DHT11 library (DHT11_lib) found at http://arduino.cc/playground/Main/DHT11Lib
//

// Use the DHT11 temp and humidity sensor
#define USE_DHT11 0

// Use the DS1307 clock module
#define USE_DS1307 true

// Define the number of devices we have in the chain and the hardware interface
// NOTE: These pin numbers will probably not work with your hardware and may
// need to be adapted
#define MAX_DEVICES 8

#define CLK_PIN 13
#define DATA_PIN 11
#define CS_PIN 10

// Header file includes
#include <MD_Parola.h>
#include <MD_MAX72xx.h>
#include "Font_Data.h"

#if USE_DHT11
#include <dht11.h>

#define DHT11_PIN 2

dht11 DHT11;
#endif

#if USE_DS1307
#include <MD_DS1307.h>
#include <Wire.h>
#endif

// Hardware SPI connection
MD_Parola P = MD_Parola(CS_PIN, MAX_DEVICES);
// Arbitrary output pins
// MD_Parola P = MD_Parola(DATA_PIN, CLK_PIN, CS_PIN, MAX_DEVICES);

#define SPEED_TIME 75
#define PAUSE_TIME 0

#define MAX_MESG 20

// Turn on debug statements to the serial output
#define  DEBUG  0

// Global variables
char szTime[9]; // mm:ss\0
char szMesg[MAX_MESG+1] = "";

uint8_t degC[] = { 6, 3, 3, 56, 68, 68, 68 }; // Deg C
uint8_t degF[] = { 6, 3, 3, 124, 20, 20, 4 }; // Deg F

char *mon2str(uint8_t mon, char *psz, uint8_t len)

// Get a label from PROGMEM into a char array
{
  static const __FlashStringHelper* str[] =
  {
    F("Jan"), F("Feb"), F("Mar"), F("Apr"),
    F("May"), F("Jun"), F("Jul"), F("Aug"),
    F("Sep"), F("Oct"), F("Nov"), F("Dec")
  };

  strncpy_P(psz, (const char PROGMEM *)str[mon-1], len);
  psz[len] = '\0';

  return(psz);
}

char *dow2str(uint8_t code, char *psz, uint8_t len)
{
  static const __FlashStringHelper* str[] =
  {
    F("Sunday"), F("Monday"), F("Tuesday"),
    F("Wednesday"), F("Thursday"), F("Friday"),
    F("Saturday")
  };
 
  strncpy_P(psz, (const char PROGMEM *)str[code-1], len);
  psz[len] = '\0';

  return(psz);
}

void getTime(char *psz, bool f = true)
// Code for reading clock time
{
#if USE_DS1307
  RTC.ReadTime();
  sprintf(psz, "%02d%c%02d", RTC.h, (f ? ':' : ' '), RTC.m);
#else
  uint16_t h, m, s;

  s = millis()/1000;
  m = s/60;
  h = m/60;
  m %= 60;
  s %= 60;
  sprintf(psz, "%02d%c%02d", h, (f ? ':' : ' '), m);
#endif
}

void getDate(char *psz)
// Code for reading clock date
{
#if USE_DS1307
  char szBuf[10];

  RTC.ReadTime();
  sprintf(psz, "%d %s %04d", RTC.dd, mon2str(RTC.mm, szBuf, sizeof(szBuf)-1), RTC.yyyy);
#else
  strcpy(szMesg, "29 Feb 2016");
#endif
}

void setup(void)
{
  P.begin(2);
  P.setInvert(false);
 
  P.setZone(0, 0, MAX_DEVICES-5);
  P.setZone(1, MAX_DEVICES-4, MAX_DEVICES-1);
  P.setFont(1, numeric7Seg);

  P.displayZoneText(1, szTime, CENTER, SPEED_TIME, PAUSE_TIME, PRINT, NO_EFFECT);
  P.displayZoneText(0, szMesg, CENTER, SPEED_TIME, 0, SCROLL_LEFT, SCROLL_LEFT);
 
  P.addChar('$', degC);
  P.addChar('&', degF);

#if USE_DS1307
  RTC.Control(DS1307_CLOCK_HALT, DS1307_OFF);
  RTC.Control(DS1307_12H, DS1307_OFF);
#endif

  getTime(szTime);
}

void loop(void)
{
  static uint32_t lastTime = 0; // millis() memory
  static uint8_t display = 0; // current display mode
  static bool flasher = false; // seconds passing flasher
 
  P.displayAnimate();
 
  if (P.getZoneStatus(0))
  {
    switch (display)
    {
      case 0: // Temperature deg C
        P.setTextEffect(0, SCROLL_LEFT, SCROLL_UP_LEFT);
        display++;
#if USE_DHT11
        if (DHT11.read(DHT11_PIN) == 0)
        {
          dtostrf(DHT11.temperature, 3, 1, szMesg);
          strcat(szMesg, "$");
        }
#else
        strcpy(szMesg, "22.0$");
#endif
        break;

      case 1: // Temperature deg F
        P.setTextEffect(0, SCROLL_UP_LEFT, SCROLL_LEFT);
        display++;
#if USE_DHT11
        if (DHT11.read(DHT11_PIN) == 0)
        {
          dtostrf((1.8 * DHT11.temperature)+32, 3, 1, szMesg);
          strcat(szMesg, "&");
        }
#else
        //strcpy(szMesg, "71.6&");
#endif
        break;

      case 2: // Relative Humidity
        P.setTextEffect(0, SCROLL_LEFT, SCROLL_LEFT);
        display++;
#if USE_DHT11
        if (DHT11.read(DHT11_PIN) == 0)
        {
          dtostrf(DHT11.humidity, 3, 0, szMesg);
          strcat(szMesg, "% RH");
        }
#else
        strcpy(szMesg, "36 % RH");
#endif
        break;

      case 3: // day of week
        P.setTextEffect(0, SCROLL_LEFT, SCROLL_LEFT);
        display++;
#if USE_DS1307
        dow2str(RTC.dow, szMesg, MAX_MESG);
#else
        dow2str(4, szMesg, MAX_MESG);
#endif
        break;

      default: // Calendar
        P.setTextEffect(0, SCROLL_LEFT, SCROLL_LEFT);
        display = 0;
        getDate(szMesg);
        break;
    }

    P.displayReset(0);
  }
 
  // Finally, adjust the time string if we have to
  if (millis() - lastTime >= 1000)
  {
    lastTime = millis();
    getTime(szTime, flasher);
    flasher = !flasher;
 
    P.displayReset(1);
  }
}
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Jan 10, 2016, 08:32 pm
@Randcook - please read response #741

The updated release has the current source that was updated.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: Randcook on Jan 10, 2016, 09:02 pm
Fresh Downloads of Max and Parola..
Errors .....
In file included from /Users/prc/Documents/Arduino/libraries/MD_Parola/examples/Parola_Zone_TimeMsg/Parola_Zone_TimeMsg.ino:20:0:
/Users/prc/Documents/Arduino/libraries/MD_Parola/src/MD_Parola.h:708:2: warning: 'typedef' was ignored in this declaration [enabled by default]
  };

  ^

/Users/prc/Documents/Arduino/libraries/MD_Parola/examples/Parola_Zone_TimeMsg/Parola_Zone_TimeMsg.ino: In function 'char* mon2str(uint8_t, char*, uint8_t)':
/Users/prc/Documents/Arduino/libraries/MD_Parola/examples/Parola_Zone_TimeMsg/Parola_Zone_TimeMsg.ino:70:7: internal compiler error: Segmentation fault: 11
 char *mon2str(uint8_t mon, char *psz, uint8_t len)

       ^
libbacktrace could not find executable to open
Please submit a full bug report,
with preprocessed source if appropriate.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Jan 10, 2016, 09:59 pm
What version IDE?

Compiles for me no problems. I am running the latest IDE on Windows 10.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: Randcook on Jan 11, 2016, 10:29 am
Reboot this morning  ALL OK Mac with 1.6.7
Thanks
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: mrshark on Jan 12, 2016, 10:06 pm
hi, i think there's an error in the shield schematic on your site, Marco_C ...
switches in images are connected to pins 4, 5, 6, 7, 8, 9, while in schematic are 4, 5, 6, 7, 9, 10
also the pot is labeled as 10k but in article you say 5k...
by the way, great work :)
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Jan 12, 2016, 10:32 pm
Congratulations on being the first to notice!

I'll correct the pins.

The pot size doesn't matter much as it is just providing a proportional input form the Arduino supply voltage to the ADC. Any pot will give a range of 0-1024, but I will make the article and schematic consistent.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: mrshark on Jan 13, 2016, 12:16 am
Congratulations on being the first to notice!

I'll correct the pins.

The pot size doesn't matter much as it is just providing a proportional input form the Arduino supply voltage to the ADC. Any pot will give a range of 0-1024, but I will make the article and schematic consistent.
:)
thanks for the answer
an other thing... i've 2 types of modules, 1 8x8, the other 8x32
they have a different pinout towards yours, can i rearrange the pins on the breakout as such, so to have a 1:1 association between the board and the modules?

vcc - 5v
gnd - gnd
din - 11
cs  - 10
clk - 13

what's the difference between cs as your ss or ld, and clk vs sck?

attachments are my modules and my protoshield, not the best soldering work, i was rearranging your schematic, sorry :)
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Jan 13, 2016, 02:26 am
SCK and CLK are the same thing - the CK is ClocK.
LD and CS re the same thing - sometimes it is called Chip Select other times it is LoaD.

When I have seen MOSI/MISO then generally they also use SCK. When you see CS/LD then generally you also see CLK. You see similar variations for the pinouts on ICs (eg, 595 IC that are from different manufacturers). I guess it is just naming convention, one of the mysteries that I don't both with any more...

Quote
not the best soldering work, i was rearranging your schematic, sorry
As long as it works.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: mysource on Jan 14, 2016, 11:41 pm
Hi and thanks a lot @marco_c for this cool library.

how is ti possible to display 3 values in Zone0 and 2 in Zone1? Asynchron?
and I tried to display the character ° and also like this \xc2b0, but I get just some points.

THX 
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Jan 15, 2016, 12:09 am
Each zone has its own display string. Look at the examples for how to load the string in, there are lots of those.

Quote
I tried to display the character ° and also like this \xc2b0, but I get just some point
Not sure what you are trying to do here, as the character set in the MD_MAX72xx library only has 255 ASCII characters. The degree symbol is character code 247. If you have Microsoft Excel you can use the fontbuilder application in the MAX72xx library package to look at and define you own character set.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: mysource on Jan 17, 2016, 01:17 pm
Code: ("Quote from: marco_c Fri Jan 15 2016 00:09:30 GMT+0100 (Mitteleuropäische Zeit)") [Select]

Each zone has its own display string. Look at the examples for how to load the string in, there are lots of those.

I know how to display string per zone, but not how to asynchron strings per zone. OK, I will check the examples.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Jan 17, 2016, 10:16 pm
Quote
I know how to display string per zone, but not how to asynchron strings per zone.
I don't understand this sentence. Maybe explain what problem your are trying to solve rather than asking for a specific solution. That could allow us to suggest options that you may not have considered.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: mysource on Jan 17, 2016, 11:05 pm
OK, sorry for my bad english.  :-[


I have two zones: 
Zone 1: date, time, in a loop
Zone 2: departure Time 1 and 2, in a loop

-> two values per zone and the effect (scroll up) as a delay for 5 seconds.
Zone 1 and zone 2 are synchron. So far all OK.

the goal is to have three values in zone 1.
Zone 1: date, time, temperature, in a loop
Zone 2: departure Time 1 and 2, in a loop

I hope it's a bit more clear.



Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Jan 17, 2016, 11:50 pm
Either just start them all together (ie, don't reset the zone displays until all the zones are finished their cycle). This may mean leaving something (like the date?) on the display while the other zone finishes.

The other is to synchronise the zone start time to be exactly the same (there is a method to do this). The sync method is used when the zones take the same amount of time to make sure they remain synch'ed so this may not be what you are looking for.

The third alternative is just to let them run their own time and be asynchronous. Why is this not a valid option?
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: icetea06 on Feb 10, 2016, 07:02 am
Thanks Marco_c. This is awesome !

I've got an issue when I try to print something with :

      P.displayText(message, LEFT, frameDelay, 100, PRINT, SCROLL_LEFT);

The message is clipped when it scrolls left. Only the part of the message that is printed first is displayed.

Am I doing anything wrong ?
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Feb 10, 2016, 07:13 am
If your message is too long to fit in the display PRINT will truncate it to what fits. The SCROLL then only scrolls what is on the display. You should probably scroll in and through to see the full message.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: icetea06 on Feb 13, 2016, 07:50 am
Yes, that's what I figured. Thanks for your reply.
Anyway to change this behaviour in your code ?
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Feb 13, 2016, 07:57 am
The challenge is what to do if the text for PRINT does not fit. One option (the one I chose) is to truncate. Another option is to print the start and scroll the rest in, ending with the tail end of the text displayed when it all finishes. This still truncates but this time it is the front of the message.

I figured that if someone was going to print then they would make sure it fitted in. The second option is still accessible by using LEFT scroll.

Next time I am looking at the library I'll see if there is a sensible way to put the rest on the end of the scroll once print has truncated.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: SriHarsha_P on Feb 28, 2016, 06:21 am
Hi marco_c,

I am getting below error while compiling Parola_HelloWorld example sketch.

In file included from C:\Users\GSAS\Documents\Arduino\libraries\MD_Parola\src\MD_Parola_Wipe.cpp:23:0:

C:\Users\GSAS\Documents\Arduino\libraries\MD_Parola\src/MD_Parola.h:708:2: warning: 'typedef' was ignored in this declaration [enabled by default]

 };

 ^
attached screenshot of error message.

Please Help.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Feb 28, 2016, 09:47 am
Don't know why you get this but it looks like it compiles anyway. Does it run?
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: SriHarsha_P on Feb 28, 2016, 02:33 pm
Thank you,
I tried uploading and able to see the text effects on the display.

Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: wabbitguy on Feb 28, 2016, 06:37 pm
I found so many issues with the 1.6.7 IDE, I dumped it and went back to the 1.6.5 version. Which works perfectly with all the libraries.

Mel
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Mar 01, 2016, 01:41 am
I have just updated the MD_MAX72xx library release in the code repository with a new font creation utility. No changes to base source code and the version remains the same at 2.8.

The txt2font utility is a console application that reads a structured text file and creates the font defintion. Source code for the utility (written in C) is supplied for those that are not on Windows systems.

This is an easier way to create font files than using the existing FontBuilder spreadsheet and obviates the need for Microsoft Office, which was an objection from a number of users.

MD_MAX72xx documentation has been updated to include the new utility for font maintenance.

As usual, any issues please let me know.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: DanielIt on Mar 01, 2016, 02:05 pm
Hi all and hi Marco_c. I am still having a problem when i add more then 10 boards to the display.I have build an double display with 2 zones each with 10 boards and after a add more then 2 boards for the second zone the last 8 remain all switched on and i get no display.I know it is an hardware problem but not with the boards idependently.I use an 5V 4Amps supply and stil cant make them work all together on every startup.I recall someone made so pullups resistors on the Data line maybe? Can anyone please remember what was the mod? Thank you.

Edit: I am using the Icstation modules.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Mar 01, 2016, 11:50 pm
Can you confirm that you are using the latest libraries? Very early versions of the MD_MAX72xx had a bug in the initialisation code that would create the sort of effect you are seeing.

Pullup on the data line is something you can try.

When you say they are 'all on' do you mean all 64 LED are on?
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: DanielIt on Mar 02, 2016, 08:05 am
Yes i use the latest library with this settings:
Code: [Select]
#define USE_ICSTATION_HW 1
#define USE_LOCAL_FONT 1
#define USE_LIBRARY_SPI      0


If i include the SPI i get compiling errors.
I use Arduino 1.6.2 version.

My setup is 10 boards together with connector pins.I have 2 displays like this.If i use any of them alone(so 10 boards) the work correctly.Then i add up the second display to be 20 boards on 2 zones to create the double display,then the first row works and the second remain with all 640 leds on. I add them up with no power at all.

What i noticed is that if i power up the displays without powering up arduino,the slightest touch to the ground of arduino or other pins turn up junk in to the entire diplay.
Again if i power up arduino without the +5V on the display,the boards light up very dimm ,like they are drawing power within other pins from arduino.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Mar 02, 2016, 08:15 am
Quote
What i noticed is that if i power up the displays without powering up arduino,the slightest touch to the ground of arduino or other pins turn up junk in to the entire diplay.
I am leaning to say that you have power supply problems.

Can you pleased take a good photo of your connections with the displays (in focus) and post it. Something is not right.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: DanielIt on Mar 02, 2016, 10:53 am
Here are two pictures i managed to make with my phone.I know the colours of the premade cable are not right.
I am now trying to add pullup resistors of 10K to +5V. Or should i make them pulldown to GND? I think the problem is with the clock line.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Mar 02, 2016, 11:21 am
The ground from the arduino and the power supply all need to be connected. This does not look like it is the case from the photo.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: DanielIt on Mar 02, 2016, 11:53 am
Yes arduino has GND connection,otherwise will not even power up. Pullup or pulldown resistor did not help.

I have done some tests with only 1 row of 8 blocks and i found that powering them up alltogether with arduino will get them light all for a second,then they all black out and do nothing.The CLK is working because the led from D13 is lit befor the boards are turning off.
I remove the wall power and power the arduino trough USB port.The boards light all up again for a second then all off.Arduino is not yet online maybe because is doing its usb thing,then when CLK lit up the boards are working displaying OK.
My thinking is that powering the boards and arduino all together with the wall adaptor is that arduino is way ahead the boards and they do not initialize.Even if i press reset on arduin button they wont start.Am i right?
Now i will try adding an delay in setup right before everything to test it.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Mar 02, 2016, 12:03 pm
Are the ground from the Arduino and the power supply connected together? I am talking about the 0V being all the same level.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: DanielIt on Mar 02, 2016, 12:30 pm
Yes everything shares the same GND.Delay did nothing at all in the setup.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: DanielIt on Mar 02, 2016, 01:26 pm
I found the problem with a bad joint on the CLK pin between the 2 modules.Now all the modules work as they suppose to,but i still have the second problem. Powering up alltogether will inizialize the modules and all stay blank.Connecting it to USB or even powering it only from USB will always work.Again i tryd delaying before or after the P.begin(); but nothing.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: DanielIt on Mar 02, 2016, 02:08 pm
I also installed the latest arduino 1.6.7 and all the librarys(nice feature to see the upgrades),and besides the load of errors with the Time library,the sketch compiled ok and uploaded ok,but again it wont start unless the promini is connected to the PC.My last attempt will be now to use the original arduino duemilanove and see if it is doing it again.(the prominis i have are all cina clones but not had one problem so far).
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: DanielIt on Mar 02, 2016, 02:49 pm
I found the problem for the second question. If i use the
Code: [Select]
#define USE_DS1307 1
the display is starting only with the USB connected.
If i comment out the use of the clock module everything works as it should be,the display starts ok.

Is the DS1307 library using too much resources or something?I am still on the promini module with testing.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Mar 02, 2016, 10:31 pm
Quote
Is the DS1307 library using too much resources or something?
Should not be. It may be that the I2C comms to the clock module gets stuck and does not proceed. Try putting some debug printing to see where it gets to.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: DanielIt on Mar 03, 2016, 06:54 am
I wish i would know how to do that. :(
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Mar 03, 2016, 06:58 am
Serial.println("Your message here");
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: DanielIt on Mar 03, 2016, 07:04 am
I couldnt sleep well allnight because of this,so i think i know where the problem is.I am using the DS1307 library but my RTC module is DS3231.i see you have another library for this module that i am downloading it now.I am also reinstallinig arduino 1.6.6 now because latest version is yet too heavy for me and gave a lot of errors.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: DanielIt on Mar 03, 2016, 08:33 am
Switched to the use of your DS3231 library seems to get the clock going now,but not 100% of the poweroffs.Sometimes after power off and on it wont start,other times it just start correctly.gonna try debug it now to see where it get stuck.Anyway i can get to sleep well tonight.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: wabbitguy on Mar 03, 2016, 08:40 am
The 3231 and 1307 libraries are interchangeable.  If you're just reading the time/date from it, the libs don't matter. If you need something specific to the DS3231, that's the only time you need a library written for it.

For the Arduino IDE, I find the 1.6.5R3 release is still the most stable and works with the majority of libraries (mainly because some of them will probably never be updated)...
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: DanielIt on Mar 03, 2016, 08:49 am
Thank you for clearing that up.I use the lib only to read time.I got back to 1.6.2 and i always have a backup of all the working libraries.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: DanielIt on Mar 04, 2016, 02:35 pm
The problem with the startup still persist,could not find any solution,it just seems it is a random thing.I remembered i have the AVRISPII programmer and i hope over the weekend to try and debug something over ISP connector directly on the cip.I am not a programmer at all but hey...i hope i will learn something.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: larry_r on Mar 05, 2016, 04:33 am
Hi everyone,

First I like to thank Marco_c for the hard work to provide this excellent library.

This library is hard to search, at the first week I can only find matrix/sprite and LED control, they have their problem and limitations. A search on "arduino led matrix max7219" would not show your good work, please include this words in your library page.

I am new to Arduino but been an electronic hobbyist for some years. I am still learning to program.

Yes i use the latest library with this settings:
Code: [Select]
#define USE_ICSTATION_HW 1
#define USE_LOCAL_FONT 1
#define USE_LIBRARY_SPI      0


What i noticed is that if i power up the displays without powering up arduino,the slightest touch to the ground of arduino or other pins turn up junk in to the entire diplay.
DanielIt, from the picture of ICStation module, I see only one 0.01u capacitor was installed, but on the MAX7219 schematic  diagram there are two capacitor, 0.1u and 10u, these are for decoupling the power rails (noise filtering). So I suggest to add at least a few of these capacitor on locations like at the point of power cables attaching to the modules, both ends of the interconnect cable of the two 10 modules. Hope this can help.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: DanielIt on Mar 05, 2016, 12:55 pm
I have installed another 0.1uF capacitor for every module,but the problem seems to got worse.Unless i start the arduino pluging it into the PC,it will never start from the power supply.I have tried everything and now it never works.made about 50 trys with reset pressed or not and even cold start and nothing.gonna make a small video asap.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Mar 06, 2016, 06:21 am
For those of you that would like to make bigger displays LED matrix displays, the jolliCube hardware (see this instructable (http://www.instructables.com/id/JolliCube-an-8x8x8-LED-Cube-SPI/)) is completely compatible with the USE_PAROLA settings in the MD_MAX72xx library.

As supplied, each of the jolliCube boards are actually 2 boards with 4 vertical 'slices' of the cube and can be separated into individual matrices about 145mm square (around 20 times the size of one of the standard 32mm matrix modules). The separated boards have pads for connectors on the short edge, allowing them to be easily stacked end to end and the spacing has been worked out so that the larger matrix looks continuous across the all the boards (see picture).

I have been playing with these larger matrices and it does make an impressive display, so it is worth trying if you are keen to supersize your messages.

EDIT: The guys at jolliFactory have an instructable showing the cube being used this way http://www.instructables.com/id/Large-8x8-LED-Matrix-Display/ (http://www.instructables.com/id/Large-8x8-LED-Matrix-Display/)

(http://cdn.instructables.com/FLN/C1WI/IKVFVH0C/FLNC1WIIKVFVH0C.MEDIUM.jpg)
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: larry_r on Mar 07, 2016, 02:49 pm
@ Daniellt, sorry to hear that, but have you tried adding a few 10uf, what power supply are you using? I have ordered 20 modules, will see what happen...

@ all,  just saw this video: https://youtu.be/YOMkQsLEACI , I think it is cool! how to do the scrolling down digits with parola?

Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Mar 07, 2016, 08:09 pm
There is an example in the MD_MAX72xx library for scrolling digits. With Parola some arrangement of zones may work but it does not currently support scrolling individual portions of a display.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: Dustuino on Mar 13, 2016, 04:51 pm
Hello, Marco!

You did a great job with this library and wanted to thank you!


And to ask you something (I might have been missed it reading docs, help and this veeery long tread):

I there any possibility that while scrolling down to get the next row displayed without black display in between?

Right now I have:

  [scroll down - first string appears]
T1 = 20 C
  [scroll down - first string dissapears]
<blank display>
  [scroll down - second string appears]
T2 = 9 C

I would like to have something like this:

  [scroll down - first string appears]
T1 = 20 C
  [scroll down - first string scrolls out and second string scrolls in]
T2 = 9 C

I have 2 displays in a single row (8 x 64 leds, or 2  modules of 4 matrixes).

Thanks again for this marvelous library!
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Mar 13, 2016, 08:04 pm
The animations are discrete. This means that one animation has to finish before the next starts. So for scrolling up or down, the end of the animation will be when the screen goes blank.

This is to allow the detection of when a new string is needed from the calling program and it simplifies the animation code considerably.

Nothing stops you from coding something similar yourself using the MD_MAX72xx library directly. There is an example that implements scrolling digits that may give you some ideas.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: Dustuino on Mar 14, 2016, 09:33 pm
Got it, thanks!
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: The_Undertaker on Mar 24, 2016, 05:40 pm
Hi...

         Marco_c Can u add Alarm Function with some switches for adjusting Time,Date & alarm function
       to ur example ...Parola_Zone_TimeMsg




Thanxxx


Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Mar 24, 2016, 11:24 pm
The examples are to show how to use the Parola library to display messages and the possibilities within the combinations. The more complex the examples, the less useful they are for people starting out. So the aim is to make them interesting but without the complexity of too many features.

This means that adding in lots of 'bells and whistles' like you are asking is not useful to show the use of the library, but rather would be showing off the RTC library. Indeed, if you want examples of Alarm setting and managing the RTC, look at the MD_DS3231 library at my libraries site, links below.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: The_Undertaker on Mar 26, 2016, 08:22 am
Hi Marco
         
               In MD_AButton  example scratch which pins to connect to d Display n What keys ru using

Is it Tact switch or other pls give Schematic diagram to which  pins to be connected or how to make ADC Keys...


#define  LCD_D5    LCD_D4+1   =....?
#define  LCD_D6    LCD_D4+2   =....?
#define  LCD_D7    LCD_D4+3   =....?
#define  LCD_KEYS  KEY_ADC_PORT // use default pin =....?





Thanxxx
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Mar 26, 2016, 10:13 am
They have nothing to do with tact pins. They are the analog pin used by most lcd shields. Look up the schematic for an lcd shield. KEY_ADC_PORT is defined in the library header file.

This is not a Parola issue and does not belong in this thread. Please start a new thread if you still need help.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: Juris3D on Mar 29, 2016, 09:33 am
Hello all! Thanks to Authors for Parola device! I have a question (searching did not give answer) - is there maybe PC software by someone that could send useful information from PC to LED matrixes? Like CPU load, CPU temperature, clock, playing song name, audio spectrum, etc, etc? You could say - like "LCDsmartie" software, but for LED matrix boards? Thanks in advance!
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: kiranchauhan on Apr 01, 2016, 05:51 pm
HI
I have interfaced GSM SIM900a with parola scrolling matrix.
it works fine,,,and message is printed.
i send message from phone and it gets displayed on parola matrix. but it shows a FLAG symbol at the end of message. why it happens.
i have interfaced HC-05 bluetooth module. it does not show any flag.
but in GSM sim900a, FLAG is displayed. why ???????
while loop is shown which shows Putindex has a comment which shows Flag


 while (Serial.available())
  {
    char inbyte = Serial.read();
    newMessage[putIndex] = inbyte;
    if ((newMessage[putIndex] == '\n') || (putIndex >= BUF_SIZE-2))   // end of message character or full buffer
    {
      // put in a message separator and end the string
      newMessage[putIndex] = '\0';
      // restart the index for next filling spree and flag we have a message waiting
      putIndex = 0;
      newMessageAvailable = true;
    }
      else
      // Just save the next char in next location
      newMessage[putIndex++];
  }
}
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Apr 01, 2016, 09:40 pm
The flag is just an ASCII character that the GSM must be sending, OR you are not terminating the string in the right place.

Suggest that you print out the ASCII codes for the string to the serial monitor and check what they are.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: jimkan on Apr 10, 2016, 05:09 am
Hi, using Parola_Display sketch on a 7 matrix modules (generic), it start up fine but after awhile the 6th module stop working but the display continue to the 7th, at first I thought the 6th module might be defective replace another one has the same result. does anyone has the problem?

Actually, after a long run the display module just goes out one by one.

Thanks,

Jimmy   
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Apr 10, 2016, 08:43 am
Parola has been used by many people in projects that run for months, so I don't think it is in the libraries.

How are you powering the modules?
Have you got long wires from the Arduino to the modules?
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: The_Undertaker on Apr 15, 2016, 06:36 am
Hi.. Marco_c

                   

           Its a great Library n I have to explore more... am a very beginner to Arduino &            Programming. So Its taking time to understand n sorry for asking u again n again. This time
I Want to create some Custom Charters using "Parola MD_MAX72xx  Font Builder v1.xlsm"
but couldn't do so.

 There are many types of Fronts data you have used in ur examples Like

  1)     uint8_t degC[] = { 6, 3, 3, 56, 68, 68, 68 }; // Deg C
  2)    { fontGreek, "\x080\x0a8\x0a4\x0ab\x0a6\x0ac\x0a0\x0a4\x0a6"   }
  3)       uint8_t arrow[COL_SIZE] =
               {
                 0b00001000,
                 0b00011100,
                 0b00111110,
                 0b01111111,
                 0b00011100,
                 0b00011100,
                 0b00111110,
                 0b00000000
               };  
I want my custom  characters data in numeric form as for Deg C =uint8_t degC[] = { 6, 3, 3, 56, 68, 68, 68 }; // Deg C


So Pls Help me out

 Thanxx  
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Apr 15, 2016, 08:15 am
Not sure what you are asking, so please be very specific.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: The_Undertaker on Apr 15, 2016, 08:46 am
How to build Custom Front & Custom Characters using front builder... cos am from India n my Regional Language is different




Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Apr 15, 2016, 09:33 am
You use one of the tools provided or you can do your own.

There is a Microsoft Excel spreadsheet with a macro that provides a graphical interface to turn dots on and off. It will then produce the text for the font definition that you can cut and paste. The first worksheet of the workbook has instructions.

As not everyone has Excel, in the latest version I also have a text based tools (txt2font) that will take a text definition of the font and produce the font definition in a file. All the current fonts are defined and you should be able to follow the examples.

These tools are in the FontBuilder folder of MD_MAX72xx and also described in the latest html documentation. You may need to download version 2.8 from the site to get the latest tools.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: ati105 on Apr 15, 2016, 11:33 pm
Quote
The flag is just an ASCII character that the GSM must be sending, OR you are not terminating the string in the right place.

Suggest that you print out the ASCII codes for the string to the serial monitor and check what they are.
I am having thesame problem (using serial monitor to send text) but no matter how i send it the flag always ends what ever I sent.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Apr 16, 2016, 12:25 am
What is the ASCII code for the flag character?
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: ati105 on Apr 16, 2016, 12:31 am
Sorry how do I check that(ASCII code)
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Apr 16, 2016, 12:35 am
You print it out as a number. Assuming you have an array of character you can Serial.print(x, DEC) which should print char x as a decimal number. This is what I said in the response you quoted.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: ati105 on Apr 16, 2016, 01:27 am
I attached two photo of what it looks like on the ledmatrix and on serial monitor, I tried print the ASCII code but I wasn't able to
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Apr 16, 2016, 02:14 am
The character is not printable in the serial monitor, so that is why you need to see the ASCII code. If you do not know how to do this then you should be able to look for the character you are seeing in the font definition file. That will also give you the code it maps to.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: ati105 on Apr 16, 2016, 08:22 am
Thanks for reply, It's the 13th id on the font builder table (music note 1 = ASCII code 64 127 5 5 7 )
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: ati105 on Apr 16, 2016, 10:04 am
ok found the solution, I comment out the music note 1 from MD_MAX72xx.cpp file like this
0,       //5, 64, 127, 5, 5, 7,      // 13 - 'Music Note 1'
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Apr 16, 2016, 12:19 pm
Ok. Not the solution I would have chosen but it will work.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: manucomevi on Apr 16, 2016, 02:31 pm
Hola buenos díaspodría alguien ayudarme,al cargar parola me da el siguiente error

MD_Parola does not name a type

version arduino 1.0.5 y arduino uno

Un saludo
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: ati105 on Apr 16, 2016, 03:11 pm
I don't mind any other suggestion
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Apr 16, 2016, 07:57 pm
@manucomevi - Please upgrade to the latest IDE. I think the new directory structure may be stopping the library from being found.

@ati105 - A different approach is just to discard that character in the sketch code when it is received on the serial port - you check and just don't save it - or you configure the device to not to send it n the first place.

Code 13 is the CR (Carriage Return) and a CR LF (Line Feed) denoted the end of text lines. CR is also written as '\r' in C/C++. Changing the font file will work but has excluded that character from ever being displayed by any other sketch.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: lehighkid on Apr 17, 2016, 02:24 am
Marco_c thank you so much for these awesome libraries and taking so much time to document and support them! 

From this thread I was able to get it up and running on my mega with generic modules after updating the md_max header and using:

Code: [Select]
#define MAX_DEVICES 6
#define CLK_PIN     52
#define DATA_PIN    51
#define CS_PIN      45


however, I wasn't able to string more than 6 together without inserting additional power but for my first project I only need 6 anyway  :) 

One issue I have observed is after about 15 minutes or so of running the Parola_Animate_Catalog example, artifacts would appear and certain pixels would remain lit until I hit the reset button which made them go away.  I have the latest downloads and arduino ide.  Images attached - after 15 mins or so IMG_6396 (notice the F and vertical bars far right) and after a reset IMG_1309.  Any thoughts?



Also, because I wanted to control this over wifi, I started trying to get it running on a nodemcu.  At first it wouldn't compile, I received the following error:

Code: [Select]
/Arduino/libraries/MD_MAX72xx/src/MD_MAX72xx.h:288:33: error: section attribute not allowed for 'MD_MAX72XX::fontType_t'
  typedef const PROGMEM uint8_t  fontType_t;


Commenting out the progmem parameter allowed it to compile.  Here are the pin setup I am using:

Code: [Select]
#define MAX_DEVICES 2
#define CLK_PIN     14
#define DATA_PIN    13
#define CS_PIN      15


Again, thank you so much for your great work.  Please let me know if you have any suggestions for the artifact issue on the mega and if you have any questions regarding the nodemcu.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: shah123 on Apr 17, 2016, 03:34 am
Hi marco_c

This is really awesome.  Thanks for all the documentation and the support.

I was wondering if I could use the following cascaded into a 10 matrix display:

http://www.ebay.com/itm/1pcs-Red-MAX7219-LED-Dot-Matrix-Arduino-Microcontroller-Display-Module-Control-/271889207600?hash=item3f4ddc1130:g:z44AAOSwZd1Vblph

Do you think it would be possible to connect the input/output via jumpers for this module?

Your response will be highly appreciated.

Thanks.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Apr 17, 2016, 07:17 am
Quote
One issue I have observed is after about 15 minutes or so of running the Parola_Animate_Catalog example, artifacts would appear and certain pixels would remain lit until I hit the reset button which made them go away.
My best guess is that if your limit with no external power is 6 then you may be getting power supply issues. Does it work better with 4 or 5 and/or have you tried additional power?

I don't have any experience with nodemcu. I am surprised if PROGMEM does not work, but without knowing much about it I don't even want to guess.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Apr 17, 2016, 07:24 am
@shah123: Those seem to be new modules - I noticed them on eBay the other day. What I can't see with these modules is the electrolytic capacitor that helps to smooth out the power supply for each module. It may be on the other side, but I don't see any through holes for it.

Without the additional capacitance, there could be problems when there are a few modules together (10 would seem like it may cause an issue). You could add the additional capacitors, of course.

Connections should be ok - it is the same way that the FC-16 modules connect to each other.

Someone else may want to comment if they have used these modules.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: lehighkid on Apr 18, 2016, 11:25 pm
My best guess is that if your limit with no external power is 6 then you may be getting power supply issues. Does it work better with 4 or 5 and/or have you tried additional power?

I don't have any experience with nodemcu. I am surprised if PROGMEM does not work, but without knowing much about it I don't even want to guess.
Marco - thanks for the suggestion - I haven't gone back to the mega since getting it up and running on the nodemcu which ironically does not have the same issues while either connected via usb or directly to vin.  Will have to go back and test when I get more free time. 

As for the nodemcu there was one additional error that I had to encounter and that was the definition of CLOSING in the animation header that conflicted with the esp8622wifi library.  I omitted that in the header file and avoided the closing animation and all works perfectly.  It is now hooked up to MQTT with a message queue where I can add, update, delete messages all with individual animations and properties controlled remotely via wifi and text.

The code is lengthy and unoptimized ATM and it is only with 6 displays but it is a prototype to build a much larger scrolling display.  I will try to share the code once it is cleaned up and happy to share some insights/learning experiences with anyone interested in the interim.

Thanks again for such great and well documented libraries - it made it very easy!
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: The_Undertaker on Apr 19, 2016, 09:16 am
You use one of the tools provided or you can do your own.

There is a Microsoft Excel spreadsheet with a macro that provides a graphical interface to turn dots on and off. It will then produce the text for the font definition that you can cut and paste. The first worksheet of the workbook has instructions.

These tools are in the FontBuilder folder of MD_MAX72xx and also described in the latest html documentation. You may need to download version 2.8 from the site to get the latest tools.
Thanxx... marco_c now I can build some coustom Chars...using d font builder..
Video here:- https://www.youtube.com/watch?v=7FCfc45WLyY
I got a code from here:- http://forum.arduino.cc/index.php?topic=349553.0
cos am a very beginner I edited the Font data.h and could some how manage
to animate some custom characters... it was a two row code... having zone 0 n zone 1
can u help me to remove d zone n create a neat code having no zones cos I only have 5 dot matrix displays.. Have attached d edited code below


Thanxx in advance  
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Apr 19, 2016, 11:34 am
Not sure why you started from that code. There are a number of examples with the Parola library that you can use. For example, the one with Japanese and Arabic characters.

Sorry but I do not have time to edit other people's code.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: lehighkid on Apr 21, 2016, 01:08 am
My best guess is that if your limit with no external power is 6 then you may be getting power supply issues. Does it work better with 4 or 5 and/or have you tried additional power?

I don't have any experience with nodemcu. I am surprised if PROGMEM does not work, but without knowing much about it I don't even want to guess.
So after some time using the nodemcu artifacts do come up too - same issue.  I have tried with a few less and I have also tried inserting direct power both at the start and the middle as well as powering half from the nodemcu and half with direct power and in all cases it is about 10-15 minutes of continuous scrolling then artifacts appear and require a reset to unstick the pixels.  

I've tried everything I can think of (or know of and that isn't much) to get isolated power to them.  I don't know if it is the hardware or not but I plan on building a bigger one so I have ordered the parola kits from electrodragon and will try luck with them.  

Will come back on any changes or the next go around.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: rgm on Apr 26, 2016, 05:21 am
I made some pleasing custom shapes, two hearts and two cats.  I'll just leave them here in expanded binary form so they're easier to tweak if you like.
Code: [Select]

uint8_t heart1[] = {9,
 0b00001110,
 0b00011111,
 0b00111111,
 0b01111111,
 0b11111110,
 0b01111111,
 0b00111111,
 0b00011111,
 0b00001110
};

uint8_t heart2[] = {7,
 0b00001110,
 0b00011111,
 0b00111111,
 0b01111110,
 0b00111111,
 0b00011111,
 0b00001110
};

uint8_t cat1[] = { 11,
  0b00001110,
  0b11011011,
  0b10110110,
  0b00111010,
  0b11111111,
  0b00111000,
  0b01111000,
  0b10111000,
  0b11111000,
  0b00001101,
  0b00000110
};

uint8_t cat2[] = { 9,
  0b00011111,
  0b01111110,
  0b11100100,
  0b11111100,
  0b10111100,
  0b11111100,
  0b11100100,
  0b01111110,
  0b00011111
};
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: juggle on May 09, 2016, 06:48 pm
I downloaded Max72XX LED Matrix Display Library v2.8.

I am trying to get example MD_MAX72xx_Test to work with the Digispark TINY85 and an 8x8 Generic MAX7219 Module.
I edited MD_MAX72xx.h as follows:
#define USE_PAROLA_HW  0
#define USE_GENERIC_HW  1

and the pinout in MD_MAX72xx_Test:
#define      CLK_PIN            2  // DataIn
#define      DATA_PIN        1  // CLK
#define      CS_PIN              0  // LOAD/CS

When I try to verify the sketch, it exits with many "'xxxx' was not declared in this scope" errors, where xxxx includes 'SS', 'MOSI', 'SCK' ... 'SPIF'.

I tried editing MD_MAX72xx.h :
#define USE_LIBRARY_SPI  0

but that doesn't make any difference.

It looks like there's a #include instruction missing, but what??
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on May 09, 2016, 11:41 pm
Quote
where xxxx includes 'SS', 'MOSI', 'SCK' ... 'SPIF'.
None of these are in the library so I am not sure what went wrong.

Asking some obvious questions:

Have you selected the right hardware type in the IDE?

Did you try changing the class/object declaration for MD_Parola to be the non-hardware SPI version?


Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: juggle on May 10, 2016, 10:34 pm
None of these are in the library so I am not sure what went wrong.

Asking some obvious questions:

Have you selected the right hardware type in the IDE?

Did you try changing the class/object declaration for MD_Parola to be the non-hardware SPI version?



Thank for your quick reply.

Yes, the IDE seems fine.  It uploads the example program to the Digispark TINY85, which flashes an on-board LED.

I searched for 'MD_Parola' in all project files and found nothing, so I am confused by your question - probably because I have barged into the first thread I could find which sounded vaguely relevant. 

Sorry, I can't find a way to search sub-forums or specific topics??

Should we move my query to a new thread in a more appropriate sub-forum?

Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on May 10, 2016, 11:34 pm
Quote
I am confused by your question
At the top of each example sketch there is a declaration for the Parola object that allows for a hardware based SPI or a software based SPI. If you are not using the hardware SPI (that depends on your pins, and I don't know the Digispark at all) then you need to comment out the hardware definition and uncomment the software definition. This may or may not help.

Do you have another Arduino (Uno, Nano, etc) that you can try to use? If that works ok, then it would verify that the problem is Digispark specific and not something in your setup.

Quote
Should we move my query to a new thread in a more appropriate sub-forum
Probably. Is there a Digispark forum? Otherwise the programming forum is probably better.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: lehighkid on May 12, 2016, 06:38 pm
@Marco_C - I finally received my Parola kits from Electrodragon and assembled them - I am very impressed with the ease of building and how well they fit together. 

One issue that I have run into now that I have more boards is how to do a Top and Bottom display. I saw the methods in the examples using zones but with nodemcu it fails because of the while check on the zone status in the main loop - Watch Dog Timer (WDT) resets - blocking code.

    while (!P.getZoneStatus(ZONE_LOWER) || !P.getZoneStatus(ZONE_UPPER))

Is there a way to rewrite the loop to be non-blocking while waiting for zones?  For non-zone I simply do

    if(P.displayAnimate())

Any thoughts or ideas?

Thx!
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on May 13, 2016, 06:35 am
You can always invert the logic of any boolean expression by negating the operands and changing OR to AND. So
Code: [Select]
  while (!P.getZoneStatus(ZONE_LOWER) || !P.getZoneStatus(ZONE_UPPER))
becomes
Code: [Select]
  while (P.getZoneStatus(ZONE_LOWER) && P.getZoneStatus(ZONE_UPPER))

Clearly, what goes in the while loop also changes. In your case it probably changes to an if statement, as per your second example.

The main thing is that you need to wait for both zones to complete animating. They may or may not finish at the same time. How you do that is entirely what suits your application.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: ieee488 on May 22, 2016, 02:03 am
Are the 8x8 LED matrices the row anode-column cathode type or the row cathode-column anode types?

Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on May 22, 2016, 02:22 am
It does not matter as you are able to tell the libraries what you have and it adjusts. Please read the section on configuring hardware in the MD_Max72xx library documentation.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: chummer1010 on May 22, 2016, 04:48 pm
Wow, just checked the video. this is amazing!

-marco
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: pascalibus on Jun 25, 2016, 12:16 pm
The code is lengthy and unoptimized ATM and it is only with 6 displays but it is a prototype to build a much larger scrolling display.  I will try to share the code once it is cleaned up and happy to share some insights/learning experiences with anyone interested in the interim.
I try desperately to do the same as you but I do not understand compiler errors and I am absolutely unable to fix them.

I managed to display a scrolling text with 8 modules and an Arduino uno but I have to reprogram every time I want to change the scrolling message . Not great !

Can you share your code on the forum ?

I am currently working on a wireless display with 8 8X8 modules and try to use a LOLIN nodemcu V3.0

Thank you to the community for these fantastic tools and information sharing.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: ieee488 on Jul 02, 2016, 12:01 am
I have some 8x8 row anode-column cathode displays.

Can I use them with this library?



Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Jul 02, 2016, 09:52 am
You can use any style modules. The only limitation is that you cannot mix different modules in the same display. Just read the documentation on how to tell the MD_MAX72xx library your module configuration (section on hardware).
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: ieee488 on Jul 02, 2016, 11:09 pm
It does not matter as you are able to tell the libraries what you have and it adjusts. Please read the section on configuring hardware in the MD_Max72xx library documentation.
My confusion is how to connect up the 8x8 matrix to the MAX7219.

Do I use the schematic ?  
(https://raw.githubusercontent.com/mariusrugan/MD_MAX72XX/master/media/photo/Circuit_Schematic.JPG)
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Jul 03, 2016, 03:05 am
That looks like my schematic from the Parola library site. It also has circuits for the Parola module.

Essentially the library does not care which way round you wire it up, whether columns or rows and increasing up/left or down/right. Just make sure that they are in consecutive order.

Suggest you mock it up on a breadboard to get confidence that it will work.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: ieee488 on Jul 03, 2016, 06:03 pm
I have one 8x8 row cathode - column cathode (1088BS) and MAX7219 connected on a breadboard per the schematic above.


MAX7219 pin 13 - Arduino pin 13
MAX7219 pin 12 - Arduino pin 12
MAX7219 pin 1  - Arduino pin 11


Still confused what I need to change in MD_MAX72xx.h file to make this work.


#define USE_PAROLA_HW 0 is what I have


Mostly all LEDs are lit. Nothing really happens. Occasional flashes.



Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: nfsaisi on Jul 03, 2016, 08:36 pm
Hi, Marco ...its been a long time i haven't use the Arduino , didn't have the time  with a busy life style

any way getting back to refresh my work  i need your help please ,

 i updated the IDE to the latest and been trying to upload the Parola time message to my 10 display which was working perfectly with the ver.10.xx i get this error



 Arduino: 1.6.9 (Windows 7), Board: "Arduino/Genuino Mega or Mega 2560, ATmega2560 (Mega 2560)"

In file included from C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/Arduino.h:28:0,

                 from sketch\Parola_Zone_TimeMsg.ino.cpp:1:

Font_Data.h:5: error: variable 'numeric7Seg' must be const in order to be put into read-only section by means of '__attribute__((progmem))'

 uint8_t numeric7Seg[] PROGMEM ={

                       ^

C:\Users\User\Documents\Arduino\Parola_Zone_TimeMsg\Parola_Zone_TimeMsg.ino: In function 'char* mon2str(uint8_t, char*, uint8_t)':

Parola_Zone_TimeMsg:78: error: ISO C++ forbids declaration of 'type name' with no type [-fpermissive]

   strncpy_P(psz, (const prog_char *)str[mon-1], len);

                         ^

Parola_Zone_TimeMsg:78: error: ISO C++ forbids declaration of 'type name' with no type [-fpermissive]

Parola_Zone_TimeMsg:78: error: expected primary-expression before 'const'

   strncpy_P(psz, (const prog_char *)str[mon-1], len);

                   ^

Parola_Zone_TimeMsg:78: error: expected ')' before 'const'

C:\Users\User\Documents\Arduino\Parola_Zone_TimeMsg\Parola_Zone_TimeMsg.ino: In function 'char* dow2str(uint8_t, char*, uint8_t)':

Parola_Zone_TimeMsg:93: error: ISO C++ forbids declaration of 'type name' with no type [-fpermissive]

   strncpy_P(psz, (const prog_char *)str[code-1], len);

                         ^

Parola_Zone_TimeMsg:93: error: ISO C++ forbids declaration of 'type name' with no type [-fpermissive]

Parola_Zone_TimeMsg:93: error: expected primary-expression before 'const'

   strncpy_P(psz, (const prog_char *)str[code-1], len);

                   ^

Parola_Zone_TimeMsg:93: error: expected ')' before 'const'

C:\Users\User\Documents\Arduino\Parola_Zone_TimeMsg\Parola_Zone_TimeMsg.ino: In function 'void setup()':

Parola_Zone_TimeMsg:141: error: no matching function for call to 'MD_Parola::setFont(int, uint8_t [370])'

   P.setFont(1, numeric7Seg);

                           ^

C:\Users\User\Documents\Arduino\Parola_Zone_TimeMsg\Parola_Zone_TimeMsg.ino:141:27: note: candidates are:

In file included from C:\Users\User\Documents\Arduino\Parola_Zone_TimeMsg\Parola_Zone_TimeMsg.ino:31:0:

C:\Users\User\Documents\Arduino\libraries\MD_Parola\src/MD_Parola.h:1439:14: note: void MD_Parola::setFont(uint8_t**)

  inline void setFont(MD_MAX72XX::fontType_t *fontDef) { for (uint8_t i=0; i<_numZones; i++) _Z.setZoneFont(fontDef); };

              ^

C:\Users\User\Documents\Arduino\libraries\MD_Parola\src/MD_Parola.h:1439:14: note:   candidate expects 1 argument, 2 provided

C:\Users\User\Documents\Arduino\libraries\MD_Parola\src/MD_Parola.h:1452:14: note: void MD_Parola::setFont(uint8_t, uint8_t**)

  inline void setFont(uint8_t z, MD_MAX72XX::fontType_t *fontDef) { if (z < _numZones) _Z[z].setZoneFont(fontDef); };

              ^

C:\Users\User\Documents\Arduino\libraries\MD_Parola\src/MD_Parola.h:1452:14: note:   no known conversion for argument 2 from 'uint8_t [370] {aka unsigned char [370]}' to 'uint8_t** {aka unsigned char**}'

exit status 1
variable 'numeric7Seg' must be const in order to be put into read-only section by means of '__attribute__((progmem))'

by the way I'm using the ver.2.4  of your MD_

thanks

Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: ieee488 on Jul 03, 2016, 09:56 pm
I have one 8x8 row cathode - column cathode (1088BS) and MAX7219 connected on a breadboard per the schematic above.


MAX7219 pin 13 - Arduino pin 13
MAX7219 pin 12 - Arduino pin 12
MAX7219 pin 1  - Arduino pin 11


Still confused what I need to change in MD_MAX72xx.h file to make this work.


#define USE_PAROLA_HW 0 is what I have


Mostly all LEDs are lit. Nothing really happens. Occasional flashes.


I have fixed the mistake in wiring between the MAX7219 and the Arduino.
It is now.
MAX7219 pin 13 - Arduino pin 13
MAX7219 pin 12 - Arduino pin 10
MAX7219 pin 1  - Arduino pin 11

The display is working.

But the letters are upside down during the Scrolling Text.

I cannot tell which setting I am suppose to change in the .h  file.


I ran the MD_MAX72xx_HW_Mapper sketch which told me to set
#define HW_DIG_ROWS 0
#define HW_REV_COLS 1
#define HW_REV_ROWS 1

When I did that Scrolling Text did not work, although the other actions in MC_MAX72xx_Test seem okay.



The 8x8 LED matrix is in the breadboard with the part number on the side facing me (south).


I am not sure what is going on here.


Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Jul 03, 2016, 10:51 pm
@nfsaisi - Please make sure you have the latest versions of MD_MAX72xx and Parola libraries and try again. The compiler changed some time ago and the libraries were updated to work.

@ieee488 - Upend the matrix (rotate the breadboard 180 degrees) and try again. The libraries reference standard modules as the orientation is easier to determine due to the PCB. If you make your own it will take some experimentation. Just try stuff - you are not going to damage anything just by changing the software.
Quote
When I did that Scrolling Text did not work
The code should produce some output no matter what. If it did not then you messed up something else.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: ieee488 on Jul 04, 2016, 01:48 am

@ieee488 - Upend the matrix (rotate the breadboard 180 degrees) and try again. The libraries reference standard modules as the orientation is easier to determine due to the PCB. If you make your own it will take some experimentation. Just try stuff - you are not going to damage anything just by changing the software. The code should produce some output no matter what. If it did not then you messed up something else.
The output is working. My mistake in connections to the Arduino.

As for the upside down text, I did rotate the display 180 degrees so that the side of the display with the serial number is north (or on top). Made it worse. Nothing worked.

So, the only way everything works although with the upside-down text is
#define HW_DIG_ROWS 0
#define HW_REV_COLS 0
#define HW_REV_ROWS 0

With those settings and the 8x8's serial number once again on the bottom,
the text scrolls left to right and is upside down
the Rows 0->7 goes from bottom to top
the Cols 0->max goes from left to right





Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Jul 04, 2016, 07:28 am
The printed text is not a good reference point, especially as you are the only one who can see it. There is a small tab on the lower plastic edge of the matrix that is a better reference (see the assembly instructions for the Parola hardware module for what I mean).

If you have wired it up like a Parola module, then use that selection in the libraries. With one module the scrolling can't be working except for a matter of orientation. There are no second or higher modules for the text to scroll onto. I must be missing something here.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: ieee488 on Jul 04, 2016, 04:34 pm
The printed text is not a good reference point, especially as you are the only one who can see it. There is a small tab on the lower plastic edge of the matrix that is a better reference (see the assembly instructions for the Parola hardware module for what I mean).

If you have wired it up like a Parola module, then use that selection in the libraries. With one module the scrolling can't be working except for a matter of orientation. There are no second or higher modules for the text to scroll onto. I must be missing something here.
I see the small tab. It is also on the side with the part number. It is facing me. Bottom.

I can see each letter of the scrolling text such as 'Graphics', etc.

If I choose
#define USE_PAROLA_HW 1
1.  scroll text ==  top to bottom

the orientation of the letter 'i' is as follows
Code: [Select]
       
        x
x xxxxxxx
  x     x



2.  rows == left to right

3.  columns == top to bottom


Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: MOTP on Jul 04, 2016, 11:39 pm
Hello Marco:

I want to make a project of a scrolling led matrix that would display the text from a file which will be stored in a sd card. I've seen that @confusered also wanted to do same  two years ago. I have been reading the thread but I haven't found if s(he) finally achieved it. S(he) could read the file from one side and make the matrix work on the other, but not to combine them. One of the suggestion was the possible lack of memory. Other was the pins used for the spi communication. Now that I made up my mind to do this, will I need special hardware (like Arduino Mega for more memory) or a specific sd shield or led matrix module? Any help, sources, tips will be highly appreciated :)

Thanks in advance for your support.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Jul 05, 2016, 12:45 am
@MOTP - one of the examples for Parola or MD_MAX72xx is reads from the SD card and displays on the matrix.

@ieee488 - scrolling top to bottom, rotated 90 degrees clockwise, is scrolling right to left. Physically rotate the breadboard.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: ieee488 on Jul 05, 2016, 04:22 am
@ieee488 - scrolling top to bottom, rotated 90 degrees clockwise, is scrolling right to left. Physically rotate the breadboard.
I had expected it to work with the display inserted in the breadboard such that pins 16-8 are at the top and pins 1-7 at the bottom = plastic tab at the bottom.


To sum it up, if one is using the 1088BS which is row anode-column cathode, the best result is achieved by using #define USE_OTHER_HW 0 which in MD_MAX72xx.h and making no changes to MD_MAX72xx_lib.h

And have the 8x8 LED matrix's plastic tab at the top in the breadboard, and make the connections to the MAX7219 using the circuit diagram for that I have included in my previous post.

Thank you for the library.





Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: MOTP on Jul 10, 2016, 08:28 pm
Hello Marco:

I have been tinkering the whole weekend trying to get my led matrix made out of 8 generic modules work. So far, I've got the two first modules displaying scrolling text and the rest sometimes are fully on or fully off. For the two first, the text is rotated and mirrored, so I need to add a transform() somewhere, but I don't know where. How can I add a transformation? I've been using the examples that come with the Parola library (Daft Punk and so on).

And do you have a clue why the other modules are working like that? Regarding the SPI connection to the Arduino, I've tried dozens of pin possibilities already  :(

Thank you for your help!
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Jul 11, 2016, 01:10 am
Firstly make sure you have the latest version of the libraries. They have not changed in a while so they are very stable.

1. Please make sure you have read the documentation for how to adapt the MD_MAX72xx library to your hardware setup. Your modules should be set up as 'USE_GENERIC_HW' (all the other selections for hardware should be set to zero).

2. Ensure that the right number of modules is set at the top of the example code. Most of the examples use 8 or 6 so you should be ok. Worst case you would see repeats of patterns or incomplete words.

3. With your modules you should be using a separate power supply as the Arduino can't provide poser for more that 2-3 modules reliably.

4. Try swapping modules for the 3rd+ positions. Maybe build up from 2 to 3 to 4 etc. Looks like something is wrong with the hardware.

5. If you are using an Arduino Uno and the hardware SPI setup, DATA is pin 11, CLK is pin 13 and LD or SS is pin 10. If you are not using hardware supported SPI just nominate the pins you are actually using.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: MOTP on Jul 12, 2016, 08:32 pm
Hello Marco:

Thank you for your quick response. Going through your points, here's what I can tell:

0. Library is up to date, I downloaded it last week.

1. Library is adapted to my hardware, setting 'USE_GENERIC_HW' to 1 and the rest to 0.

2. Right number of devices is set on top of the the code, right before the SPI pins setting.

3. Maximum number of modules working: 7.

4. I have swapped some modules, checked the MAX7219 IC connection, wires..., and you were right, there was a hardware problem. Now I can have up to 7 modules working.

5. I'm using pins 10 (CS), 11 (DIN) and 13 (CLK), that's to say, hardware setup, although I have software SPI setup set to 1 in the library. I have changed that to 0 though for checking. Nothing changed.

Although I have more modules working now, they still display scrolling text rotated and mirrored :(

For my project (displaying text from a SD card), I would like to have a longer matrix than what I have so far (I need 8 to 10 modules). Do you think it is possible to achieve that with my current hardware by lowering light intensity, so that I don't have to use an external power supply?

Once again, thank you for helping me and for your kindness.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Jul 12, 2016, 11:46 pm
Quote
1. Library is adapted to my hardware, setting 'USE_GENERIC_HW' to 1 and the rest to 0.
If this is not working try the other settings. If they also don't work use the HW_Mapper example program to work out what the configuration should be. They look like Generic modules but clearly they must be wired differently.

Quote
5. I'm using pins 10 (CS), 11 (DIN) and 13 (CLK), that's to say, hardware setup, although I have software SPI setup set to 1 in the library. I have changed that to 0 though for checking. Nothing changed.
As soon as you get even 1 module working the comms pins are right and you should not change this any more. I would recommend using the hardware setting as this will be faster.

Quote
Do you think it is possible to achieve that with my current hardware by lowering light intensity, so that I don't have to use an external power supply?
That depends on a lot of things, like how many LEDs wold be on at the same time, the intensity you are runnning, etc. The main parameter you can change is the Rset resistor on the boards. Please see my blog article at https://arduinoplusplus.wordpress.com/2015/09/12/max7219-and-led-matrix-power-requirements/ (https://arduinoplusplus.wordpress.com/2015/09/12/max7219-and-led-matrix-power-requirements/) for some more information.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: MOTP on Jul 14, 2016, 06:22 pm
Hello Marco:

I must be doing something wrong because no matter which hardware configuration I set to 1 in the library, the behaviour of the led matrix is always the same (text displayed rotated and mirrored). I have also tried the HW_Mapper returning the same configuration as the 'USE_GENERIC_HW' one (010). After modification, I save the changes in the library, close it and restart the Arduino IDE. Do you have any clue what can be happening?

Thank you. Cheers.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Jul 15, 2016, 01:26 am
Your problem is not something I have ever seen before, so I am guessing that something is not being set right in the libraries. Here's two suggestions:

1. Make absolutely sure that all the USE_* settings that you are not using are set to 0. Any that are set after your intended setting will replace the intended setting. An approach may be to go back to a MD_MAX72xx library from the download package, now that you know a bit more about what you are meant to do.
The settings I am concerned about are in the MD_MAX72xx.h file:
Code: [Select]
USE_PAROLA_HW
USE_GENERIC_HW
USE_ICSTATION_HW
USE_FC16_HW
USE_OTHER_HW

Also, there should have been no changes to the MD_MAX72xxlib.h file.

2. In the first post you asked "do I need to add a transform() somewhere" and the answer is NO. Did you do this in the past and have forgotten about it?
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: MOTP on Jul 26, 2016, 12:38 am
Hello Marco:

I finally got the matrix working. I don't know what was the problem. I repeated everything from scratch and this time it worked. I probably was bringing some mistake... Thank you so much for your interest in helping me.

Now I have the matrix working with the SD card. But what I would like to do is to display a complete text line from the txt file based on a sensor. Using a microphone, IR sensor, whatever. If I code that in the loop() what I get is that everytime the condition is met, the text moves one column to the left. So the thing must be set on the library, modifying it, I guess. I've been trying it, with no success. How do you think I could do that?

Thank you Marco :)
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Jul 26, 2016, 01:08 am
Good news.

Look at the example that uses the serial line to display messages. You need to use the same technique to make one message and display it and then substitute the new message when you have one. I would also suggest that you get familiar with how you need to use the library as it sounds like you are not animating the text fast enough.

If you want to make the message flexible, I would suggest that you use sprintf() and keep the formatting string in on the SD card. You can then use the string from the SD card to make the message using the data from the sensor. If you have not used sprintf() or printf() before, make sure you read how it is used before asking questions, as it is very flexible but also complicated for newbies.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: passman on Aug 24, 2016, 08:18 pm
Hi Marco, this is an awesome. I'm very new to Arduino and Parola and I think I'm learning quite fast but I seem to have run into a stupid problem. I have completed many searches without success and I'm hoping for a little bit of guidance from you if possible.

I have gone through all the examples and successfully got them working and have now started to build a very simple sketch to print a temperature. This is successful and I have used the following code snippet
Code: [Select]
 sprintf(temperature, "%d.%d C", (int)temp, (int)(temp*10)%10);
  P.displayText(temperature, CENTER, 0, 0, PRINT, NO_EFFECT);
To complete the display I would like to show the degree symbol in the appropiate place. I know it is character 247 in the md_max72xx library but I cannot workout how to call it into the sprintf function and then to the display.

Any help/guidance would really be appreciated
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Aug 24, 2016, 10:55 pm
Standard C strings can include a specific ASCII code using the escape character '\'. Here is an example from the Parola_Fonts sample code
Code: [Select]
"\x0b1\x0b0\x0c2\x0b2\x0c9"

More details here: http://en.cppreference.com/w/cpp/language/escape (http://en.cppreference.com/w/cpp/language/escape)
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: passman on Aug 24, 2016, 11:39 pm
Thanks Marco for the pointer.

I have shown the code that worked for me below.

Code: [Select]
 sprintf(temperature, "%d.%d\xF7""C", (int)temp, (int)(temp*10)%10);
  P.displayText(temperature, CENTER, 0, 0, PRINT, NO_EFFECT);

The secret I found was to convert the decimal value of the degree symbol into the hexadecimal value and use this after the escape character '\'. I was able get to the format xx.xºC through the use of the end/start quotation marks in the centre.

I'll certainly know how to do this in the future!

Great coaching, thanks!

Peter
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: funkervoigt on Aug 31, 2016, 01:55 pm
Hello Marco !

Great work in your parola library, thany a lot. U saved my day.
I thought about using a parola led matrix to display mirror-inverted text like on some german police cars.
Would be cool to be able to read text via a mirror. May i suggest to add such a function in the parola library ?

Greetings from Northern-Germany !
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Sep 01, 2016, 12:04 am
Actually, you can already do the reversed text using the library  :)

Code: [Select]
char *msg[] =
{
  "Ambulance",
  "Emergency",
};

void setup(void)
{
  // initialise the LED display
  P.begin();
  P.setZoneEffect(0, true, FLIP_LR);
}

void loop(void)
{
  static uint8_t cycle = 0;

  if (P.displayAnimate())
  {
    // set up the string
    P.displayText(msg[cycle], CENTER, SCROLL_SPEED, PAUSE_TIME, PRINT, NO_EFFECT);
 
    // prepare for next pass
    cycle = (cycle + 1) % ARRAY_SIZE(msg);
  }
}
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: CodfishCatfish on Sep 10, 2016, 10:42 pm
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.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Sep 11, 2016, 01:33 am
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
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: natecastillo on Sep 13, 2016, 12:36 pm
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
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Sep 13, 2016, 12:38 pm
Sure. There are examples for both MD_MAX72xx and MD_Parola libraries taking messages from the serial port and displaying them.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: natecastillo on Sep 13, 2016, 01:42 pm
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?
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Sep 13, 2016, 01:51 pm
Yes to all that. You will need to create some sort of message with commands that you can interpret to do what you want.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: natecastillo on Sep 13, 2016, 03:12 pm
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?
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Sep 13, 2016, 11:40 pm
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/ (http://www.martyncurrey.com/turning-a-led-on-and-off-with-an-arduino-bluetooth-and-android-part-ii-2-way-control/)
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: funkervoigt on Sep 19, 2016, 11:43 pm
Actually, you can already do the reversed text using the library  :)
  
Very cool, haven´t seen that option ! Thank you very much !
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: nash68 on Sep 25, 2016, 07:05 pm
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.

Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Sep 25, 2016, 11:49 pm
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).

Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: passman on Sep 28, 2016, 10:20 am
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
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Sep 28, 2016, 09:59 pm
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.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: passman on Sep 29, 2016, 03:02 pm
Thanks for the information. I'll go away and try to implement it.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: nash68 on Sep 29, 2016, 11:04 pm
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 !
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: Maverick71 on Oct 04, 2016, 12:05 am
Hello,

I'm new to Parola and running in some strange addressing problems.

The LED's I'm using are driven by a 7219 Chip on Arduino UNO.
I get all text inverted and it seems that the output is shifted by one pixel.

Beside of this the Letters are mirrored and the "Block's" are like mismatched.

Any idea what can this be?

Regards,
Maverick
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Oct 04, 2016, 12:18 am
You probably don't have the right hardware configured in the MD_MAx72xx library. Please read the documentation that comes with the library describing how to edit the header file foe the type of hardware you are using. There are lots of different types of matrix modules that are wired in different ways to the MAX7219 IC.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: Maverick71 on Oct 04, 2016, 02:21 am
You was fast.
Thank You.

Solved.

Regards,
Maverick
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: mrsharkit on Oct 07, 2016, 10:39 am
hi
any plan on porting this cool library to ESP8266 platform? So it can be used even wirelessly to display live feeds :)
thanks
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Oct 07, 2016, 10:57 am
The library should work on the ESP2866. The only difference to make it wireless is to write code to replace the serial link in one of the examples.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: wabbitguy on Oct 07, 2016, 06:31 pm
I use the EPS8266 in combination with a Arduino Pro Micro to control a scrolling Parola based sign (24 Parola modules). The 8266 displays a web page, sends the results of the page selections via serial to the Arduino that's running the displays.

I probably could have ran it directly from the 8266 and skipped the Arduino, but I was retro fitting the original design that used an RF module via a serial interface to the Arduino. Thus it was easier to just program the 8266 (NodeMcu 1.0) with the same serial protocol as I was using for the original RF module.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: Ryme_Extrinseca on Oct 10, 2016, 05:31 pm
Hello,

Many grateful thanks to Marco_c for developing and sharing the Parola library for driving 8 connected 8x8 LED matrix modules, it is very much appreciated.

Although I have implemented the 'switches' for my 8 module matrices line, the resulting display occasionally (more often than not) is missing letters or has some artefacts in them. Example images of the anomalies are attached to this message.

I've successfully implemented the 'HW_' switches in the library header file, as I mention above, and which orientates the letters correctly on the devices I'm using.

However, as can be seen from the attachments, when 8 modules are linked together, the matrices don't reproduce the word(s) or sentence correctly.

I've tried reading through the many postings in this thread but I'm still unable to resolve this problem with my devices. I'm concerned that the modules I've bought, which were sourced through Amazon and came from China may not be the genuine article, so to speak. The dealer is not helpful either.

All help is gratefully received as obviously I'm missing something out in my attempts to make these modules work together correctly.

Many thanks,

M.

Matrix Modules (https://www.amazon.co.uk/gp/product/B00GKEMQUM/ref=oh_aui_detailpage_o04_s00?ie=UTF8&psc=1)

Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Oct 10, 2016, 11:17 pm
Quote
came from China may not be the genuine article, so to speak. The dealer is not helpful either.
Not sure what the 'genuine article' could be as they are all from China. No surprises about the dealer not being helpful - they have generally got no idea what they are selling.

Quote
I have implemented the 'switches' for my 8 module matrices line
Don't know what you mean by this.

---

A few things you could try:

1. Verify that you are running the latest version of MD_Parola and MD_MAX72xx. The official distribution is from my code repositories (links in the email signature below). The release has been stable for some time, so I don't think this is a likely issue.

2. Are you powering all this from the Arduino? Try using an external power supply (make sure that the Arduino and Power Supply GNDs are all connected), to see if this improves things. Also try adding one module at a time and see when the errors start. Mindful of item 3 below, when you get the error try different modules in that position to eliminate the possibility of a faulty unit.

3. The errors you show always seem to be in the second and third last modules. Move these modules somewhere else in the chain and see if the errors move with the modules. If they do you have faulty modules.

These are the most common causes of problems, so try these fixes first.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: Sam12 on Oct 13, 2016, 06:14 pm
Hello,

First of all, I would like to thank you for the great job you made with the LED matrices.
I'm new to to the world of LED matrices. recently, I purchased 10 modules along with the Arduino Mega, and I am using your Parola_Test code.

The one thing I want to do is increasing the scroll speed when using:   

P.displayText(pc[curString], Center, P.getSpeed(), PAUSE_TIME, SCROLL_LEFT, SCROLL_LEFT);

The scrolling speed is always the same regardless of the values of Speed and Pause_time (on the other functions like Print, it is working perfect).


Any idea on how to to this?

Regards,
Sami
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: wabbitguy on Oct 13, 2016, 08:17 pm
The Parola_Test uses an external pot to set the speed. If youwant to control your own speed, you need to modify the sketch to remove the pot dependency or add a pot to A5 to control the speed. Look in the doUI() function for the pot speed mapping.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: Sam12 on Oct 13, 2016, 08:35 pm
wabbitguy,
Thank you for the reply.
This is how I modified the sketch to remove the pot dependency:
Example: P.displayText(pc[curString], Center, 10, 1000, SCROLL_LEFT, SCROLL_LEFT);
I tried different values, but the speed still always the same.(just when scrolling left).

Thanks!
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Oct 13, 2016, 11:57 pm
I have just tested my setup and SCROLL_LEFT works fine for all alignments (LEFT, RIGHT, CENTER). Logically I would expect this result as, in the library code, animation timing is independent of animation type.

The only other suggestion I can make is for you to check that you are not resetting the delay to something else in another part of the executing code. The delay setting takes immediate effect, even in the middle of an executing animation.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: Ryme_Extrinseca on Oct 14, 2016, 10:06 pm
Thank you for coming back to me, Marco. It is very much appreciated.

What I meant by "genuine article" was that another poster to this forum thread seemed to suggest some 'Chinese-sourced MAX7219 modules may not be genuine MAX7219 devices. Hence I was thinking that the problem I was having in driving my 'Chinese-sourced' modules was due to the unpredictable/unreliable performance of "copy" non-genuine MAX devices.

In the end the symptom I was explaining about, in my original posting, was due to one of the jumper leads making poor intermittent continuity with the 4th module in a line of 8 modules. Although the jumper was fully pushed home to the module pin, the wire was defective within the header plug causing signal driving errors.

I have since hard-wired 6 modules together on a perfboard, to remove the doubt about jumper connections, while learning about these modules and from your fantastic Parola code.

With respect to the latter point, I'm trying to find a way of using your library to develop a LED display (consisting of 6 modules) that displays real time information, i.e. speed data I'm filtering via a CANBUS adapter.

I've built a simple speed message display system for my car that uses data filtered from the CAN BUS of my car. However, at the moment, finding a way of displaying a real time speed variable (string) concatenated with the fixed string value of 'MPH' is proving a challenge. E.g. 30 (the real time speed value derived from the CAN filter code) + ' MPH', i.e. 30 MPH . . . . . . or whatever the speed value of the car is.

Thank you once again for authoring and sharing the Parola code and for helping with my query too.

M.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Oct 15, 2016, 10:34 am
Look up the sprintf() function to format the string the way you want.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: Maverick71 on Oct 16, 2016, 01:50 am
Hello Marco,

Did You tried parola on some ESP variant chip?
I get this error if I try to compile for ESP12 (Animation Demo 2).

Arduino: 1.6.12 (Windows 7), Board: "NodeMCU 1.0 (ESP-12E Module), 80 MHz, 115200, 4M (3M SPIFFS)"


In file included from C:\Users\ASP\Documents\Arduino\libraries\PAROLA/MD_Parola.h:237:0,

from C:\Users\ASP\Documents\Arduino\ESP_Parola_Animation_Catalog_2\ESP_Parola_Animation_Catalog_2.ino:4:

C:\Users\ASP\Documents\Arduino\libraries\MAX_72XX/MD_MAX72xx.h:288:33: error: section attribute not allowed for 'MD_MAX72XX::fontType_t'

typedef const PROGMEM uint8_t  fontType_t;

This doesnt make any sense to me...
why should be the data type wrong?
Can this be fixed easily?

I have got another working solution,
but the addressign of the display is obviuosly wrong.
It's connected like this:

1->2->3->4-> but it behaves like this:

1->
2->
3->
4->

Question: Is there a simply way to turn the characters and flow direction by +90° or -90°

Regards,
Maverick
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Oct 22, 2016, 08:32 pm
Quote
This doesn't make any sense to me...
Makes no sense to me either, but I have not tried compiling the library for an ESP12. If the PROGMEM keyword is not supported it should be redefined to be nothing by the Arduino library supporting the device.

Quote
Question: Is there a simply way to turn the characters and flow direction by +90° or -90°
Only through the #defines in the library as you have already done before.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: hellothere on Oct 29, 2016, 11:28 pm
Hello! i've successfully compiled this wonderful library to my wemos d1 mini board based on the cheapest  esp8266 SOC+uC supported by arduino. Most of the examples run as it is i just needed to add yield(); statement to the displaytext function. The reason is that there is a hardware watchdog timer that resets the board when the esp8266 enters some loop for more than 1 second approximately (sorry for simplistic view, but my understanding is very limited).

That is for the example. Now, i'm trying to get some data from thingspeak.com channels continuously and display it on the FC-16 (total 8 modules). I've also added a section of arduinoOTA to flash the chip over wifi.
There are total 8 fields to display as String, which i convert to chararray[50]. I've based my code as a modification of your ParolaAnimationCatalog. While it displays properly the catalog.psz but when i replace that to the char* i got from thingspeak, there is a WDT softreset after 4 and before 5th char* is displayed.

As your code is implemented like some state machine, which i don't understand due to lack of knowledge and skill, i think there is some infinite loop stuck somewhere.

Any light in this matter is greatly welcome, as this is the only place that i'm stuck.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Oct 30, 2016, 02:36 am
Great to hear the libraries work in the new environment.

Quote
There are total 8 fields to display as String, which i convert to chararray[50].
Are you sure that the array is big enough? And is is the string terminated with a '\0'? Also, is the behavior only with a specific animation or does it happen with specific messages - that would be a clue as well.

Nothing in the libraries should take more than a few milliseconds to run, and there are definitely no infinite loops. Each operation is only executed when animate() is called. If things are taking longer, then there is possibly something overflowing or perhaps it is trying to scan a string that is malformed.

The libraries can tell you how long each animation runs. There is a #define TIME_PROFILE in the MD_Parola_lib.h file that makes the MD_PZone::zoneAnimate() function keep track of how long each call takes to execute. In my experience, never more than a few milliseconds. You can turn this on and the time for each will be displayed using Serial.print() calls. Also make sure that you have the Serial object initialised in your code. This would be a good start to see if there really is a timing problem.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: hellothere on Oct 30, 2016, 06:53 pm
Great to hear the libraries work in the new environment.
Are you sure that the array is big enough? And is is the string terminated with a '\0'? Also, is the behavior only with a specific animation or does it happen with specific messages - that would be a clue as well.

Thanks for responding with a useful tip. I checked my code again and found that wdt reset occurs for WIPE animation (and some others also) when the display text is very large. For shorter texts, even WIPE works OK. So i think the problem is that the library is not able to find out the '\0' character as you mentioned. Also, just for reference, i'm using thingspeak library read as string function, which returns a String then i do a String.toCharArray(char *buff,len). I've defined the buf[250] but i only set len=200 so that null conversion problem should not be there.

But i'm not sure how the displaytext() function handles that char array because for PRINT effect as well as SCROLL_LEFT, even larger texts work fine. So maybe due to some datatype or pointer problem it is not able to locate the end of the string in the case of WIPE...but i'm not a computer engineer so can't say with confidence.

Nothing in the libraries should take more than a few milliseconds to run, and there are definitely no infinite loops. Each operation is only executed when animate() is called. If things are taking longer, then there is possibly something overflowing or perhaps it is trying to scan a string that is malformed.

The libraries can tell you how long each animation runs. There is a #define TIME_PROFILE in the MD_Parola_lib.h file that makes the MD_PZone::zoneAnimate() function keep track of how long each call takes to execute. In my experience, never more than a few milliseconds. You can turn this on and the time for each will be displayed using Serial.print() calls. Also make sure that you have the Serial object initialised in your code. This would be a good start to see if there really is a timing problem.

I also suspect that but i don't have a very in-depth knowledge of computer (and microcontroller programs & memory management) so looking for more clues on how to resolve this problem. As i got deeper in your library i learned a lot even about how to write perfect programs! Unfortunately, i can not understand all its working in a few days...

Also, just to let you know there is an effect called CLOSING which conflicts with ArduinoOTA variable also defined closing and the library won't compile. I request you to change such variables to something less generic like P_CLOSING ETC.


Another question, if i use two of FC-16 displays (4 modules each, hence total 8 modules), and i put them horizontally one over other so that there are total 32*16 pixels can i define a zone such that right side modules in top and bottom row constitute one zone of 16*16 pixels?

Thanks for any further assistance.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: hellothere on Oct 30, 2016, 08:28 pm
It looks more clear now...I've conducted some further tests. I disabled WIPE & WIPE_C effect and now the wdt reset doesn't take place. However, cycle time is around 4-6 seconds for most of the effects, while anime time is ~0-1ms. Maybe esp8266 SPI is not fast enough...So if i put something like while(!displayAnimate()); then it easily takes more than 1second, therefore adding a yield(); inside the displayAnimate(); is helpful. I've also added a condition inside P_ZONE.h animate function
Code: [Select]
if (_fsmState == END||(millis() - _lastRunTime > 1000))
return(true);

But even then, WIPE & WIPE_C cause WDT watchdog timer reset.

Another thing is noticed is that if i use a long string and use IN_EFFECT other than SCROLL effects, when OUT_EFFECT is called, the string is truncated...What i want is that the text should appear with some effect like fade then scroll left. But doing so shows only part of the string.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Oct 31, 2016, 03:41 am
Quote
cycle time is around 4-6 seconds for most of the effects, while anime time is ~0-1ms.
Cycle time (I assume the time from start to finish of the animation) will depend on the speed setting. Each step of the animation will take the same amount (a few miliseconds). The rest of the time between steps is waiting without delay. Most calls to animate() do nothing as the waiting timer has not yet expired. If you need to yield you should do this just after the call to animate().

Code: [Select]
while(!displayAnimate());
This does nothing in the loop. In your case better to use
Code: [Select]
while(!displayAnimate()) yield();

I think that some of your problems with timeouts are because you don't understand the animation method and are just copying sample code. I would encourage you to read the documentation for the library.

Quote
What i want is that the text should appear with some effect like fade then scroll left.
This is not possible. There is a design decision that needs to be made for the code when not all the text fits for an animation. All the effects except for the continuous scrolling types end up with something on the display. The next effect starts from what is being displayed. Any of the text that is not on the display is lost. Unfortunately for your needs, this is by design.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Oct 31, 2016, 05:53 am
Quote
Another question, if i use two of FC-16 displays (4 modules each, hence total 8 modules), and i put them horizontally one over other so that there are total 32*16 pixels can i define a zone such that right side modules in top and bottom row constitute one zone of 16*16 pixels?
No, a zone is always a consecutive line of modules.

You can, however, define a double height display as n modules long by 2 modules high, defined as 2 zones with the top zone flipped and reversed. The font has to be specially arranged with top and bottom half. There are 2 examples that show different ways to do this. Note that not all animations will work correctly in this mode.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: hellothere on Oct 31, 2016, 09:29 am
I think that some of your problems with timeouts are because you don't understand the animation method and are just copying sample code. I would encourage you to read the documentation for the library.
I completely agree. But the real problem is that there is general saying RTFM! But the problem is reading that is more complicated than doing experiments ;-) Anyway, i'm better positioned now than when i started to understand the library description. I will try :)

This is not possible due. There is a design decision that needs to be made for the code when not all the text fits for an animation. All the effects except for the continuous scrolling types end up with something on the display. The next effect starts from what is being displayed. Any of the text that is not on the display is lost. Unfortunately for your needs, this is by design.
In this case, i can get around by first displaying the effect with animation i want, the displaying the same thing again with ScROLL effect!

However, i you have time i would definitely suggest you to get an esp8266 board because that makes these dumb DOT MATRICES somewhat more powerful....and these are cheap with very large display than more costlier LCDs. A few examples are displaying sensor values, getting data from internet, displaying bar charts (like spectrum analyzer), small internet (ifttt.com/thingspeak) connected billboard i'm trying to make. The esp8266 also supports a self-contained webserver, a telnet server and with library can read JSON, http request etc. So we can also change the text on the fly without even connecting to the USB! Then we can print a 3d case and it can act like a clock also for cheap...(i've posted a few links below. if willing and you have time just have a look)

I'm requesting you because your code is very systematic...and those things could be extended to our esp8266 environment.

Some possiblilities:

1. A weather display/stock market ticker https://www.youtube.com/watch?v=2I_us9NhIvM
2. A news ticker (non-english, i don't understand the language but looks like that) https://www.youtube.com/watch?v=UxIFxD6IgTw
3. A wifi clock - NTP atomic clock synced (https://www.youtube.com/watch?v=dlTRf9JsxIw)
4. A live youtube subscriber counter (https://www.youtube.com/watch?v=iFn8P9Mvhpw)
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: hellothere on Nov 06, 2016, 03:42 pm
just an UPDATE for those trying to use this library with esp8266 and using animation for longer strings derived from internet....

i've temporarily solved the problems of board reset by reducing the string size passed on to P.displayZoneText(zonenumber, string,....) to 5 characters max.
By adding a check that if the effect is not SCROLL_RIGHT or SCROLL_LEFT, then truncate the string to be passed string[5]='\0',i can display all the effects without worrying for board resets.

Then i reset the display. Now copy the original text to string again but this time with SCROLL_RIGHT effect.

Then for the third time, i repeat the step 2 with PRINT effect. This way, new text can be displayed, all the text is displayed and all the text that the MAX7219 matrix can accomodate resides on the displays.

As we are all aware that esp8266 was originally desined as AT type "modem" for the arduino board but some brilliant people hacked the microcontroller code to make it an independent arduino compatible wifi enable chip in its own place. Board resets usually take place mostly because the hardware wants to do some WiFi related functionality but the main code is blocked somewhere else...mostly the case where we try to port arduino libraries written for earlier avr 8-bit uC.

Also, another issue regarding the animation timings...ESP8266 runs @80Mhz (or 160Mhz overclocked) much more than 16Mhz arduino avr, so animations are a bit faster than expected. We have to manually tune...In my case, i display data from my sensors via thingspeak.com(at present mostly voltages & current for Power voltage range via adc connected to another esp8266/Wifi)  To make internet data retrieval faster i run the esp8266 @160Mhz and with the above mentioned hack, board is now running without any board reset....so if anyone has seen an industrial control room, i am having that feeling right now in my bedroom for very cheap at my bedroom(although not that accurate or reliable) !!

Most of these problems will disappear when esp32 (with 2 microcontrollers comes out...for cheap).

My next plan is to get some data from rss feeds & my google calendar, and then via ifttt.com recipie to put it to thingspeak.com. Then even that can be easily displayed on the same display....if you connect sufficiently large number of modules, say 16 modules then a large display (64x16) readable from a distance can be easily built....


Now, i have a few more questions from experienced users:
(1) How do add my own fonts? Is there any automatic .ttf or .fon>parola converter? Can i display non-english Unicode characters?
(2) Is there any way to display graphics or graphs, like i want to display voltage/current-vs-time along with text with animations.
(3) Has anyone made a 3d case for these MAX7219 displays so that we can keep everything inside the BOX?

Thanks for any help!
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Nov 06, 2016, 07:47 pm
Quote
so animations are a bit faster than expected
I am surprised by this as the libraries use elapsed milliseconds to control the animations, and this is independent of processor clock if the hardware core is implemented properly.
Quote
(1) How do add my own fonts? Is there any automatic .ttf or .fon>parola converter? Can i display non-english Unicode characters?
Read the documentation for the MD_MAX72xx; there is a section about fonts. There are 2 utilities to create fonts. No conversion utilities that I know of, so if you write or find one that is useful, let me know.
Quote
(2) Is there any way to display graphics or graphs, like i want to display voltage/current-vs-time along with text with animations.
Not using Parola, but MD_MAX72xx will allow you to do anything. Could use different zones for text and graphcs but I have not tried it. There was some discussion on this a few pages back in this thread. How much graphics can you do with 8 pixels height anyway?
Quote
(3) Has anyone made a 3d case for these MAX7219 displays so that we can keep everything inside the BOX?
A few people have put these in boxes. I haven't seen any 3D printed ones. Mostly wood or metal boxes.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: hellothere on Nov 07, 2016, 02:25 pm
I am surprised by this as the libraries use elapsed milliseconds to control the animations, and this is independent of processor clock if the hardware core is implemented properly.
Then maybe i've pasted the example code incorrectly ;-) I think, animation time relates to number of displays...it is here where the esp8266 is faster.

Read the documentation for the MD_MAX72xx; there is a section about fonts. There are 2 utilities to create fonts. No conversion utilities that I know of, so if you write or find one that is useful, let me know.
Not using Parola, but MD_MAX72xx will allow you to do anything. Could use different zones for text and graphcs but I have not tried it. There was some discussion on this a few pages back in this thread. How much graphics can you do with 8 pixels height anyway?

Regarding graphics, my aim is to display past history of voltage, current or some other variable vs time which is difficult express in text...a picture is worth thousand words. another example would have been to display clock animation in a zone....but since zones can only be adjacent this is not much helpful...i have not seen the MD_MAX72xx in depth...but maybe for 64*16  pixels, something useful may be created...

another area could be GIFs


A few people have put these in boxes. I haven't seen any 3D printed ones. Mostly wood or metal boxes.
I asked this question because i've not done much 3d printing so i was looking for "templates" to start with but looks like i've to learn everything from scratch....

Right now the display is sitting on my table and if i'm successful, i will hang that on the wall!


Anyway thanks for supporting your library by faster answers to queries.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: pasagame on Nov 11, 2016, 06:36 am
Hello Marco,
I use FC16 module (12 modules x 2 rows) with NodeMCU and test example Parola_Double_Height_v2.ino. It working about 1 second and restart (loop).
Do you have any advice for me. Thank You.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Nov 11, 2016, 07:54 am
Sorry, no advice unless you have a few more details. hellothere seems to be doing something similar so he may have something to say.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: pasagame on Nov 11, 2016, 10:04 am
Sorry, no advice unless you have a few more details. hellothere seems to be doing something similar so he may have something to say.
video here : https://youtu.be/rAAu0qGi08Q (https://youtu.be/rAAu0qGi08Q)

code:

Code: [Select]
#include <MD_Parola.h>
#include <MD_MAX72xx.h>
#if USE_LIBRARY_SPI
#include <SPI.h>
#endif
#include "Font_Data.h"

#define MAX_ZONES 2
#define ZONE_SIZE 12
#define  MAX_DEVICES (MAX_ZONES * ZONE_SIZE)

#define ZONE_UPPER  1
#define ZONE_LOWER  0

#define PAUSE_TIME  0
#define SCROLL_SPEED  50

#define CLK_PIN   D5
#define DATA_PIN  D7
#define CS_PIN    D3

MD_Parola P = MD_Parola(CS_PIN, MAX_DEVICES);

#define ARRAY_SIZE(a) (sizeof(a)/sizeof(a[0]))
char *msgL[] =
{
 "Managing double height displays with custom fonts and 2 zones",
 "ABCDEFGHIJKLMNOPQRSTUVWXYZ",
 "abcdefghijklmnopqrstuvwxyz",
 "0123456789",
 "`!@#$%^&*()_+-={};:'<>\"?,./|\\{}",
};
char *msgH;

void setup(void){
 uint8_t max = 0;

 for (uint8_t i = 0; i<ARRAY_SIZE(msgL); i++)
   if (strlen(msgL[i]) > max) max = strlen(msgL[i]);

 msgH = (char *)malloc(sizeof(char)*(max + 2));

 P.begin(MAX_ZONES);

 P.setZone(ZONE_LOWER, 0, ZONE_SIZE - 1);
 P.setZone(ZONE_UPPER, ZONE_SIZE, MAX_DEVICES-1);
 P.setFont(BigFont);

 P.setCharSpacing(P.getCharSpacing() * 2);
}

void createHString(char *pH, char *pL){
 for (; *pL != '\0'; pL++)
   *pH++ = *pL | 0x80;   // offset character

 *pH = '\0'; // terminate the string
}

void loop(void)
{
 static uint8_t cycle = 0;

 // set up the string
 createHString(msgH, msgL[cycle]);
 P.displayZoneText(ZONE_LOWER, msgL[cycle], LEFT, SCROLL_SPEED, PAUSE_TIME, SCROLL_LEFT, SCROLL_LEFT);
 P.displayZoneText(ZONE_UPPER, msgH, LEFT, SCROLL_SPEED, PAUSE_TIME, SCROLL_LEFT, SCROLL_LEFT);

 // prepare for next pass
 cycle = (cycle + 1) % ARRAY_SIZE(msgL);

 // synchronise the start and run the display to completion
 P.synchZoneStart();
 while (!P.getZoneStatus(ZONE_LOWER) || !P.getZoneStatus(ZONE_UPPER))
   P.displayAnimate();
}
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Nov 11, 2016, 07:21 pm
1. Does the example work for on a standard Arduino?
2. If you use a simple example (one line only) does it work on the NodeMCU?
3. Does other code work properly on the NodeMCU?
4. Are you running the latest libraries downloaded from the links in my signature block below?
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: pasagame on Nov 13, 2016, 06:49 am
I download lastest libraries and test basic example "MD_MAX72xx_PrintText.ino" it show error on complier

Quote
In file included from C:\Users\Administrator\Documents\Arduino\libraries\MD_MAX72xx\examples\MD_MAX72xx_PrintText\MD_MAX72xx_PrintText.ino:8:0:

C:\Users\Administrator\Documents\Arduino\libraries\MD_MAX72xx\src/MD_MAX72xx.h:288:33: error: section attribute not allowed for 'MD_MAX72XX::fontType_t'

  typedef const PROGMEM uint8_t  fontType_t;

                                 ^

exit status 1
Error compiling for board NodeMCU 1.0 (ESP-12E Module).
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Nov 13, 2016, 10:14 am
This says tha PROGMEM is not defined. This should have been a problem before as well. Where did you get the previous version of the libraries?
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: pasagame on Nov 13, 2016, 12:49 pm
This old MD_MAX72XX Libraries (can use with esp8266)  https://github.com/mariusrugan/MD_MAX72XX (https://github.com/mariusrugan/MD_MAX72XX)
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Nov 13, 2016, 07:43 pm
That copy of the library has been changed from the original release and is not supported by me. Please ask there (see response #901) and understand what he did to make it work. When you know, please publish it here for others.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Nov 15, 2016, 08:28 am
For the information of those that have links to the Codeplex code repository, I have moved all my code over to Github.

Github site is https://github.com/MajicDesigns (https://github.com/MajicDesigns)

MD_Parola is at https://github.com/MajicDesigns/Parola (https://github.com/MajicDesigns/Parola)
MD_MAX72XX is at https://github.com/MajicDesigns/MAX72xx (https://github.com/MajicDesigns/MAX72xx)

All the other code that was on the Codeplex site is accessible through https://github.com/MajicDesigns?tab=Repositories (https://github.com/MajicDesigns?tab=Repositories) or the Repositories tab off the main page.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: ton4eff on Nov 17, 2016, 10:07 am
Hello, I received these LED modules from China: MAX7219 Dot Matrix Module (https://www.aliexpress.com/item/5PCS-MAX7219-Dot-Matrix-Module-For-Microcontroller-4-In-One-Display-with-5P-Line/32683042114.html) They are allready connected 4pcs on one board. So I downloaded from github latest libraries, THANK YOU, Marco!!! and after some reading, I've managed to run some examples with 3 boards connected = 96x8px. They work just fine with FC16_HW preset in the MD_MAX72xx.h.

And of course, I have some noob questions.  :-[ I'm trying to make a Cyrillic font for the MAX7219... And I decided to replace the english letters in the default MD_MAX72xx_font.cpp. And it works just fine, when I write from the keyboard Parola za Arduino (Parola for Arduino) it comes out the right Cyrillic letters on the LED matrices (Парола за Ардуино). But this way I loose the english letters. My understanding is that I have to make Cirillic with different ASCII numbers and write them one by one in hex format, as it is shown in the fonts parola example. Is that correct? Is there any way to write in Cyrillic in Arduino IDE with the keyboard and the right letters to come out on the matrices?  :) Thank you.
   
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Nov 17, 2016, 10:12 am
The IDE uses a multi byte character set which has, I think, at least 2 bytes for each character, so it does not match the 256 char ascii limit.

One way you could display what is being typed is to interpret the serial stream and map it to the reduced character set you have in the software. What the mapping is - you will need to work out as I have not looked at this.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: ton4eff on Nov 23, 2016, 04:00 pm
Here is Cyrillic(BG) font for MD_MAX72XX, if somebody is interested:

Code: [Select]

 // Data file for user example user defined fonts
#ifndef FONTS_DATA_H
#define FONTS_DATA_H


MD_MAX72XX::fontType_t fontBG[] =
{
 0, // 0
 0, // 1
 0, // 2
 0, // 3
 0, // 4
 0, // 5
 0, // 6
 0, // 7
 0, // 8
 0, // 9
 0, // 10
 0, // 11
 0, // 12
 0, // 13
 0, // 14
 0, // 15
 0, // 16
 0, // 17
 0, // 18
 0, // 19
 0, // 20
 0, // 21
 0, // 22
 0, // 23
 0, // 24
 0, // 25
 0, // 26
 0, // 27
 0, // 28
 0, // 29
 0, // 30
 0, // 31
 0, // 32
 0, // 33
 0, // 34
 0, // 35
 0, // 36
 0, // 37
 0, // 38
 0, // 39
 0, // 40
 0, // 41
 0, // 42
 0, // 43
 0, // 44
 0, // 45
 0, // 46
 0, // 47
 0, // 48
 0, // 49
 0, // 50
 0, // 51
 0, // 52
 0, // 53
 0, // 54
 0, // 55
 0, // 56
 0, // 57
 0, // 58
 0, // 59
 0, // 60
 0, // 61
 0, // 62
 0, // 63
 0, // 64
 0, // 65
 0, // 66
 0, // 67
 0, // 68
 0, // 69
 0, // 70
 0, // 71
 0, // 72
 0, // 73
 0, // 74
 0, // 75
 0, // 76
 0, // 77
 0, // 78
 0, // 79
 0, // 80
 0, // 81
 0, // 82
 0, // 83
 0, // 84
 0, // 85
 0, // 86
 0, // 87
 0, // 88
 0, // 89
 0, // 90
 0, // 91
 0, // 92
 0, // 93
 0, // 94
 0, // 95
 0, // 96
 0, // 97
 0, // 98
 0, // 99
 0, // 100
 0, // 101
 0, // 102
 0, // 103
 0, // 104
 0, // 105
 0, // 106
 0, // 107
 0, // 108
 0, // 109
 0, // 110
 0, // 111
 0, // 112
 0, // 113
 0, // 114
 0, // 115
 0, // 116
 0, // 117
 0, // 118
 0, // 119
 0, // 120
 0, // 121
 0, // 122
 0, // 123
 0, // 124
 0, // 125
 0, // 126
 0, // 127
 0, // 128
 0, // 129
 0, // 130
 0, // 131
 0, // 132
 0, // 133
 0, // 134
 0, // 135
 0, // 136
 0, // 137
 0, // 138
 0, // 139
 0, // 140
 0, // 141
 0, // 142
 0, // 143
 0, // 144
 0, // 145
 0, // 146
 0, // 147
 0, // 148
 0, // 149
 0, // 150
 0, // 151
 0, // 152
 0, // 153
 0, // 154
 0, // 155
 0, // 156
 0, // 157
 0, // 158
 0, // 159
 0, // 160
 0, // 161
 0, // 162
 0, // 163
 0, // 164
 0, // 165
 0, // 166
 0, // 167
 0, // 168
 0, // 169
 0, // 170
 0, // 171
 0, // 172
 0, // 173
 0, // 174
 0, // 175
 0, // 176
 0, // 177
 0, // 178
 0, // 179
 0, // 180
 0, // 181
 0, // 182
 0, // 183
 0, // 184
 0, // 185
 0, // 186
 0, // 187
 0, // 188
 0, // 189
 0, // 190
 0, // 191
  5, 0x7e, 0x11, 0x11, 0x11, 0x7e,             // 192 - 'А'  x0c0
  5, 0x7f, 0x49, 0x49, 0x49, 0x31,             // 193 - 'Б'  x0c1
  5, 0x7f, 0x49, 0x49, 0x49, 0x36,             // 194 - 'B'  x0c2
  5, 0x7f, 0x01, 0x01, 0x01, 0x03,             // 195 - 'Г'  x0c3
  6, 0xc0, 0x7e, 0x41, 0x41, 0x7e, 0xc0,       // 196 - 'Д'  x0c4
  5, 0x7f, 0x49, 0x49, 0x49, 0x41,             // 197 - 'E'  x0c5
  5, 0x77, 0x08, 0x7f, 0x08, 0x77,             // 198 - 'Ж'  x0c6
  5, 0x41, 0x49, 0x49, 0x49, 0x36,             // 199 - 'З'  x0c7
  5, 0x7f, 0x10, 0x08, 0x04, 0x7f,             // 200 - 'И'  x0c8
  5, 0x7f, 0x10, 0x09, 0x04, 0x7f,             // 201 - 'Й'  x0c9
  5, 0x7f, 0x08, 0x14, 0x22, 0x41,             // 202 - 'K'  x0ca
  5, 0x40, 0x3e, 0x01, 0x01, 0x7f,             // 203 - 'Л'  x0cb
  5, 0x7f, 0x02, 0x0c, 0x02, 0x7f,             // 204 - 'M'  x0cc
  5, 0x7f, 0x08, 0x08, 0x08, 0x7f,             // 205 - 'H'  x0cd
  5, 0x3e, 0x41, 0x41, 0x41, 0x3e,             // 206 - 'O'  x0ce
  5, 0x7f, 0x01, 0x01, 0x01, 0x7f,             // 207 - 'П'  x0cf
  5, 0x7f, 0x09, 0x09, 0x09, 0x06,             // 208 - 'Р'  x0d0
  5, 0x3e, 0x41, 0x41, 0x41, 0x22,             // 209 - 'C'  x0d1
  5, 0x03, 0x01, 0x7f, 0x01, 0x03,             // 210 - 'T'  x0d2
  5, 0x27, 0x48, 0x48, 0x48, 0x3f,             // 211 - 'У'  x0d3
  7, 0x1c, 0x22, 0x22, 0x7f, 0x22, 0x22, 0x1c, // 212 - 'Ф'  x0d4
  5, 0x63, 0x14, 0x08, 0x14, 0x63,             // 213 - 'X'  x0d5
  6, 0x7f, 0x40, 0x40, 0x40, 0x7f, 0xc0,       // 214 - 'Ц'  x0d6
  5, 0x07, 0x08, 0x08, 0x08, 0x7f,             // 215 - 'Ч'  x0d7
  5, 0x7f, 0x40, 0x7e, 0x40, 0x7f,             // 216 - 'Ш'  x0d8
  6, 0x7f, 0x40, 0x7e, 0x40, 0x7f, 0xc0,       // 217 - 'Щ'  x0d9
  7, 0x01, 0x01, 0x7f, 0x48, 0x48, 0x48, 0x30, // 218 - 'Ъ'  x0da
  5, 0x7f, 0x48, 0x48, 0x30, 0x7f,             // 219 - 'Ы'  x0db
  5, 0x7f, 0x48, 0x48, 0x48, 0x30,             // 220 - 'Ь'  x0dc
  5, 0x22, 0x41, 0x49, 0x49, 0x3e,             // 221 - 'Э'  x0dd
  6, 0x7f, 0x08, 0x3e, 0x41, 0x41, 0x3e,       // 222 - 'Ю'  x0de
  5, 0x46, 0x29, 0x19, 0x09, 0x7f,             // 223 - 'Я'  x0df
  5, 0x20, 0x54, 0x54, 0x54, 0x78,             // 224 - 'а'  x0e0
  5, 0x3c, 0x4a, 0x4a, 0x49, 0x31,             // 225 - 'б'  x0e1
  5, 0x7c, 0x54, 0x54, 0x54, 0x28,             // 226 - 'в'  x0e2
  4, 0x7c, 0x04, 0x04, 0x0c,                   // 227 - 'г'  x0e3
  6, 0xc0, 0x78, 0x44, 0x44, 0x78, 0xc0,       // 228 - 'д'  x0e4
  5, 0x38, 0x54, 0x54, 0x54, 0x18,             // 229 - 'e'  x0e5
  5, 0x6c, 0x10, 0x7c, 0x10, 0x6c,             // 230 - 'ж'  x0e6
  5, 0x44, 0x54, 0x54, 0x54, 0x28,             // 231 - 'з'  x0e7
  5, 0x7c, 0x20, 0x10, 0x08, 0x7c,             // 232 - 'и'  x0e8
  5, 0x7c, 0x20, 0x12, 0x08, 0x7c,        // 233 - 'й'  x0e9
  5, 0x7c, 0x10, 0x10, 0x28, 0x44,             // 234 - 'к'  x0ea
  5, 0x40, 0x38, 0x04, 0x04, 0x7c,             // 235 - 'л'  x0eb
  5, 0x7c, 0x08, 0x10, 0x08, 0x7c,             // 236 - 'м'  x0ec
  5, 0x7c, 0x10, 0x10, 0x10, 0x7c,             // 237 - 'н'  x0ed
  5, 0x38, 0x44, 0x44, 0x44, 0x38,             // 238 - 'o'  x0ee
  5, 0x7c, 0x04, 0x04, 0x04, 0x7c,             // 239 - 'п'  x0ef
  5, 0xfc, 0x24, 0x24, 0x24, 0x18,             // 240 - 'р'  x0f0
  4, 0x38, 0x44, 0x44, 0x44,                   // 241 - 'с'  x0f1
  5, 0x0c, 0x04, 0x7c, 0x04, 0x0c,             // 242 - 'т'  x0f2
  5, 0x4c, 0x90, 0x90, 0x50, 0x3c,             // 243 - 'у'  x0f3
  7, 0x10, 0x28, 0x28, 0xfc, 0x28, 0x28, 0x10, // 244 - 'ф'  x0f4
  5, 0x44, 0x28, 0x10, 0x28, 0x44,             // 245 - 'x'  x0f5
  5, 0x7c, 0x40, 0x40, 0x7c, 0xc0,             // 246 - 'ц'  x0f6
  5, 0x0c, 0x10, 0x10, 0x10, 0x7c,             // 247 - 'ч'  x0f7
  5, 0x7c, 0x40, 0x78, 0x40, 0x7c,             // 248 - 'ш'  x0f8
  6, 0x7c, 0x40, 0x78, 0x40, 0x7c, 0xc0,       // 249 - 'щ'  x0f9
  6, 0x04, 0x7c, 0x50, 0x50, 0x50, 0x20,       // 250 - 'ъ'  x0fa
  5, 0x7c, 0x50, 0x50, 0x20, 0x7c,             // 251 - 'ы'  x0fb
  5, 0x7c, 0x50, 0x50, 0x50, 0x20,             // 252 - 'ь'  x0fc
  5, 0x28, 0x44, 0x54, 0x54, 0x38,             // 253 - 'э'  x0fd
  6, 0x7c, 0x10, 0x38, 0x44, 0x44, 0x38,       // 254 - 'ю'  x0fe
  5, 0x48, 0x34, 0x14, 0x14, 0x7c              // 255 - 'я'  x0ff
};
#endif
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Nov 24, 2016, 07:33 am
Thanks ton4eff. Do you have the text file (for txt2font) or the xls worksheet (for FontBuilder), depending on how you made this, that I can include in the release?
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: ton4eff on Nov 24, 2016, 06:08 pm
I'm afraid I deleted those...  :smiley-confuse: I did part of it with excell and part with txt2font. I also used some latin letters from original file. I made it in compliance with Windows 1251 (https://en.wikipedia.org/wiki/Windows-1251) code page (I don't know why :) ) May be because I'm hoping one day, if I get smart enough, I could make a program (php), so if one writes in a browser window, it would output the code for the MD_MAX72xx library in this format:  "\x0e0\x0e1\x0e2\x0e3\x0e4\x0e5\x0e6\x0e7\x0e8\x0e9\x0ea\x0eb\x0ec\x0ed\x0ee" },"

I was going to ask does it matter if the coding for the letters is hex or decimal? I see it works well with both.
And also is it possible to make different text animation effect for in and out with parola?
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Nov 24, 2016, 08:08 pm
Quote
I was going to ask does it matter if the coding for the letters is hex or decimal? I see it works well with both.
No difference. The notation is just an equivalent way of expressing the same number, just a different number base.

Quote
And also is it possible to make different text animation effect for in and out with parola?
Yes, that is built into the function:
Code: [Select]
void displayText(char *pText, textPosition_t align, uint16_t speed, uint16_t pause, textEffect_t effectIn, textEffect_t effectOut)


All in the documentation :)
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: ton4eff on Nov 24, 2016, 08:58 pm
I was busy with these fonts. Now I'm starting to read all the documents, thank you.
Edited the previous post. Now everything is in hex (looks better :) ) and also added some Russian characters. Now it should be complete Cyrillic for MD_MAX72XX library.

Here is a short video (https://youtu.be/7MBpVdYYLZo) of how the Cyrillic alphabet looks.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: foxsam on Dec 11, 2016, 02:58 am
I have downloaded code to use 16 rows and big fonts from http://forum.arduino.cc/index.php?topic=349553.0 (http://forum.arduino.cc/index.php?topic=349553.0) The matrices I have have the ic on top/bottom of the boards so I cant stack them top to bottom. I have to stck them bottom to bottom or top to top. The problem is that one zone will always be reversed from the other. Is there a way to set the zones independently from each other and have different hardware definitions so that the text will scroll together. The way it is configured now it works but there is a gap from the circuit board between the 2 zones.
.
Basically I want to define two different HW types one type per zone.
thanks.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Dec 11, 2016, 09:53 am
Look at the example code for double line display. There is a method to reverse and invert the text on the top row so it looks right.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: foxsam on Dec 11, 2016, 06:26 pm
I looked at Parola_double_Height(and _v2) but I did not find where I can inverse the top row.

As a side point for some reason in the V2 script (and some others I dont recall which) the matrix was blank after upload even with unplugging and reconnecting until I changed the script to include Serial.begin.

If someone can help me and point out where I can configure the zones I would be even more grateful.

Thanks.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Dec 12, 2016, 05:40 am
The example that showed the inverse and reversed was the Double_Clock example, so my error on that one.

I have modified Double_Height_v2 to include the same logic. Please download the whole library again as there have been a few adjustments to the core code that you need to have consistent.

There was some debug output still turned on for the MD_MAX72xx library which could explain your Serial.begin() requirement. This has been fixed so you may want to take a copy of the latest MD_MAX72xx library as well.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: PriSim on Dec 16, 2016, 01:30 pm
Please tell me can i show float value direct with parola library ? if yes please tell me how ! any example will be very help full thanks !

PS. i want to make a frequency meter/counter !

Any help ?
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: foxsam on Dec 16, 2016, 05:53 pm
TPlease download the whole library again as there have been a few adjustments to the core code that you need to have consistent.
Thanks doing that now...
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: foxsam on Dec 16, 2016, 07:45 pm
I tried it and it works like it should.... almost.

It seems like my zones are reversed. The top zone has the ic chips on bottom and the lower zone has them on top so they have a space betweeen the matrices. I tried changing
Code: [Select]
#define ZONE_UPPER  0
#define ZONE_LOWER  1

but there was no effect. I tried but cannot figure out what to do to get it working right.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Dec 16, 2016, 09:43 pm
Quote
Please tell me can i show float value direct with parola library
Parola only displays strings. You need to convert your data into a string using the dtostrf() function.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Dec 16, 2016, 09:44 pm
Quote
I tried it and it works like it should.... almost.
Please confirm that you have arranged the matrix modules as per the documentation in the MD_MAX72xx library - module 0 is on the right and increases to the left. The Double-Height examples also show how the modules need to be arranged.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: foxsam on Dec 18, 2016, 12:20 am
I am checking the double height module arrangement [edit: I checked} but for single line module 0 is at the far right so it reads like this:
Code: [Select]

_ _ _ _ _ _ _ _
7,6,5,4,3,2,1,0

Double height is like so:
_ _ _ _
3 2 1 0
4 5 6 7
- - - -

the _ is the IC on top of the modules.

I do see that the wiring is expected to be different
like so:
4 5 6 7
3 2 1 0

The problem is then I cant easilt convert from one line to double line just changing the code I need to change the wiring which is soldered together.

Thanks again.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: ton4eff on Dec 22, 2016, 04:47 pm
Hate to bother you Marco, but I upgraded parola and max libraries today and the old sketches stopped working. Here is the error log:

Code: [Select]
Arduino: 1.6.13 (Windows 8.1), Board: "Arduino/Genuino Uno"

C:\Users\ton4eff\AppData\Local\Temp\arduino_modified_sketch_344396\Parola_Zone_TimeMsg.ino: In function 'void setup()':

Parola_Zone_TimeMsg:140: error: 'CENTER' was not declared in this scope

   P.displayZoneText(1, szTime, CENTER, SPEED_TIME, PAUSE_TIME, PRINT, NO_EFFECT);

                                ^

Parola_Zone_TimeMsg:140: error: 'PRINT' was not declared in this scope

   P.displayZoneText(1, szTime, CENTER, SPEED_TIME, PAUSE_TIME, PRINT, NO_EFFECT);

                                                                ^

Parola_Zone_TimeMsg:140: error: 'NO_EFFECT' was not declared in this scope

   P.displayZoneText(1, szTime, CENTER, SPEED_TIME, PAUSE_TIME, PRINT, NO_EFFECT);

                                                                       ^

Parola_Zone_TimeMsg:141: error: 'SCROLL_LEFT' was not declared in this scope

   P.displayZoneText(0, szMesg, CENTER, SPEED_TIME, 0, SCROLL_LEFT, SCROLL_LEFT);

                                                       ^

C:\Users\ton4eff\AppData\Local\Temp\arduino_modified_sketch_344396\Parola_Zone_TimeMsg.ino: In function 'void loop()':

Parola_Zone_TimeMsg:166: error: 'SCROLL_LEFT' was not declared in this scope

         P.setTextEffect(0, SCROLL_LEFT, SCROLL_LEFT);

                            ^

exit status 1
'CENTER' was not declared in this scope

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.

Is it possible to download the previous versions somewhere? And here is what I get with new Parola zone time msg example (no errors during compiling):

(http://thumbnails117.imagebam.com/52210/365fde522096301.jpg) (http://www.imagebam.com/image/365fde522096301)

ps: First problem solved - it was "PA_" thing in functions...
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Dec 22, 2016, 08:30 pm
All the animation names have PA_ in front of them as some were clashing with other libraries, especially ESP8266 related. Easy edit for most code - PA_CENTER, PA_PRINT, etc.

Zone_Time_Mesg example has not changed from before (other than PA_ edit) so I am not sure what could be going wrong.

Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: ton4eff on Dec 23, 2016, 03:09 pm
Strangely enough, today Zone_Time_Mesg example is working... I'm using it with DS3231 module, but obviously it was not the problem, because today it's working with the same module... Same arduino board, same computer, same IDE version...
I ordered some ESP8266 modules and I'm planning to try to run Parola on these to. Thank you.

And only one more question, I hope that it's not one of those strange errors again, there were never a problem with previous version. This is from Parola Fonts example:



Code: [Select]
Arduino: 1.6.13 (Windows 8.1), Board: "Arduino/Genuino Uno"

Sketch uses 18,914 bytes (58%) of program storage space. Maximum is 32,256 bytes.
Global variables use 2,495 bytes (121%) of dynamic memory, leaving -447 bytes for local variables. Maximum is 2,048 bytes.
processing.app.debug.RunnerException: Not enough memory; see http://www.arduino.cc/en/Guide/Troubleshooting#size for tips on reducing your footprint.
at cc.arduino.Compiler.size(Compiler.java:340)
at cc.arduino.Compiler.build(Compiler.java:159)
at processing.app.SketchController.build(SketchController.java:643)
at processing.app.Editor$BuildHandler.run(Editor.java:1795)
at java.lang.Thread.run(Thread.java:745)
Not enough memory; see http://www.arduino.cc/en/Guide/Troubleshooting#size for tips on reducing your footprint.

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Dec 23, 2016, 07:52 pm
Quote
Same arduino board, same computer, same IDE version...
Check your wiring or cables are not loose or broken.

Quote
Global variables use 2,495 bytes (121%) of dynamic memory, leaving -447 bytes for local variables. Maximum is 2,048 bytes.
I get the same thing. PROGMEM is missing so I will need to change and retest. PROGMEM is a problem when you move the code to other architectures with more RAM and no actual PROGMEM, as the position of the keyword seems to matter.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Dec 24, 2016, 12:57 am
The Parola font based examples have all been fixed up and tested. Now uploaded to GitHub.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Dec 24, 2016, 02:14 am
I have just uploaded Parola v 2.6 on Github. Lots of minor fixes as per the check-in comments.

There is one new feature as a Christmas present for you all - the library now implements the Arduino Print Class, so you can use .print() style statements to display your text (as for Serial.print()). As this is supposed to be a simplification from the usual animation, at this stage it only writes to Zone 0 (usually the entire display) and prints the text centered. There is a new example Parola_Print.ino to show use.

As usual, let me know if there are any issues.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: ton4eff on Dec 25, 2016, 04:14 pm
Parola Fonts is working now. :). Not a big deal, but I noticed, that PA_WIPE_CURSOR effect always freezes at the end of the second loop (animation catalog ex). Also the Parola zone mirror example is not working for me. Just sits with all matrices off...

ps: >:( It was a power supply problem. I replaced my 5V power supply adapter for the matrices and everything is working fine now. 

And a question for dummies, if I may: Why the new names (with PA_ prefix) of the effects are no more colored (recognized) by Arduino IDE?
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Dec 25, 2016, 08:52 pm
Quote
And a question for dummies, if I may: Why the new names (with PA_ prefix) of the effects are no more colored (recognized) by Arduino IDE?
The keywords.txt file was not changed to include the new names. I don't use the IDE so I don't notice. This is just a cosmetic thing for the IDE and does not affect the compiler.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: borzov161 on Dec 27, 2016, 08:26 pm
Thanks ton4eff. Do you have the text file (for txt2font) or the xls worksheet (for FontBuilder), depending on how you made this, that I can include in the release?
that's how I ordered Cyrillic 16х10
вот как я прописал Кирилицу 16х10
https://youtu.be/mlo7Or2L6I4


here is the sketch https://yadi.sk/d/R3aPmI9Q33WrrS
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Dec 28, 2016, 02:25 am
Thanks for sharing!
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: borzov161 on Dec 28, 2016, 08:52 am
just an UPDATE for those trying to use this library with esp8266 and using animation for longer strings derived from internet....

i've temporarily solved the problems of board reset by reducing the string size passed on to P.displayZoneText(zonenumber, string,....) to 5 characters max.
By adding a check that if the effect is not SCROLL_RIGHT or SCROLL_LEFT, then truncate the string to be passed string[5]='\0',i can display all the effects without worrying for board resets.

Then i reset the display. Now copy the original text to string again but this time with SCROLL_RIGHT effect.

Then for the third time, i repeat the step 2 with PRINT effect. This way, new text can be displayed, all the text is displayed and all the text that the MAX7219 matrix can accomodate resides on the displays.

As we are all aware that esp8266 was originally desined as AT type "modem" for the arduino board but some brilliant people hacked the microcontroller code to make it an independent arduino compatible wifi enable chip in its own place. Board resets usually take place mostly because the hardware wants to do some WiFi related functionality but the main code is blocked somewhere else...mostly the case where we try to port arduino libraries written for earlier avr 8-bit uC.

Also, another issue regarding the animation timings...ESP8266 runs @80Mhz (or 160Mhz overclocked) much more than 16Mhz arduino avr, so animations are a bit faster than expected. We have to manually tune...In my case, i display data from my sensors via thingspeak.com(at present mostly voltages & current for Power voltage range via adc connected to another esp8266/Wifi)  To make internet data retrieval faster i run the esp8266 @160Mhz and with the above mentioned hack, board is now running without any board reset....so if anyone has seen an industrial control room, i am having that feeling right now in my bedroom for very cheap at my bedroom(although not that accurate or reliable) !!

Most of these problems will disappear when esp32 (with 2 microcontrollers comes out...for cheap).

My next plan is to get some data from rss feeds & my google calendar, and then via ifttt.com recipie to put it to thingspeak.com. Then even that can be easily displayed on the same display....if you connect sufficiently large number of modules, say 16 modules then a large display (64x16) readable from a distance can be easily built....


Now, i have a few more questions from experienced users:
(1) How do add my own fonts? Is there any automatic .ttf or .fon>parola converter? Can i display non-english Unicode characters?
(2) Is there any way to display graphics or graphs, like i want to display voltage/current-vs-time along with text with animations.
(3) Has anyone made a 3d case for these MAX7219 displays so that we can keep everything inside the BOX?

Thanks for any help!

как а сделал кириллицу
how did the Cyrillic alphabet
https://yadi.sk/d/5Pu_M5vd35TrH6
video
https://youtu.be/mlo7Or2L6I4
Я новичек.I'm an inexperienced user
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Dec 30, 2016, 06:09 am
Due to many and ongoing requests, there is a new Parola example that runs through ESP8266 WiFi hardware. The example code implements a web server that allows entering a new message and changing speed, scroll direction and inverse. The MAX7219 hardware is run directly from the ESP8266 digital I/O.

Any issues or improvements, please let me know.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: igitats on Jan 01, 2017, 04:20 am
Good day!

I encountered an error while compiling the HELLO WORLD PROGRAM sample in the library. I downloaded the latest versions of Parola and Max72XX libraries.

Here's the error indicated by the Arduino
Arduino: 1.6.12 (Windows 10), Board: "Gizduino X (ATmega1281)"

libraries\MD_Parola-master\MD_Parola.cpp.o: In function `MD_Parola::~MD_Parola()':

D:\Documents\Arduino\libraries\MD_Parola-master\src/MD_Parola.cpp:74: undefined reference to `operator delete[](void*)'

libraries\MD_Parola-master\MD_Parola.cpp.o: In function `MD_Parola::begin(unsigned char)':

D:\Documents\Arduino\libraries\MD_Parola-master\src/MD_Parola.cpp:47: undefined reference to `operator new[](unsigned int)'

collect2.exe: error: ld returned 1 exit status

exit status 1
Error compiling for board Gizduino X (ATmega1281).

Can you assess what are the possible causes of this error? Thank you for your response
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Jan 01, 2017, 08:35 pm
Firstly, the libraries should not be in folders called "MD_Parola-master" but just "MD_Parola".

Secondly, the errors are that the linker is not finding standard C++ functions new and delete. If renaming the folders does not work, then try reinstalling the IDE.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: borzov161 on Jan 02, 2017, 02:23 pm
Hello. translation of technical.
  Loved your library.
2 examples of "Parola_Doubie_Heigt" and " Parola_Test" gathered their sketch with the Cyrillic alphabet.
Updated libraries from 30.12.16.
1.8.0 Arduino, Arduino Board Nano328(China).
Food МАХ7219 from +5v. Arduino powered by the 12v Vin
New sample snippet :
if (doAnimate)
  {    P.displayAnimate();
    doAnimate &= (!P.getZoneStatus(ZONE_LOWER) && !P.getZoneStatus(ZONE_UPPER));
  }
  else
  {    switch (cycle)    {……
The sketch does not start offline. After a break in power 5min.
I took the example " Parola_Test" and made this :
if (P.displayAnimate())  {
      switch  (cycle) {…….
So kick off after the break in the energy.
Noticed: the less letters in 1 phrase, the easier the start.
    For example, this start is better :
      P.setFont(ZONE_LOWER, NULL);
      P.setFont(ZONE_UPPER, BigFontUpper);
I think the problem is in the Chinese boards. But they can also be made to work.
=====================================================================
Здравствуйте.
Очень понравилась ваша библиотека Parola.
Из 2 примеров "Parola_Doubie_Heigt" и " Parola_Test" собрал свой скетч с Кириллицей.
Обновил библиотеки от 30.12.16.
Arduino 1.8.0,  плата Arduino Nano328(Китай).
Питание МАХ7219 от +5v. Arduino от Vin 12v
По новому примеру фрагмент :
if (doAnimate)
  {    P.displayAnimate();
    doAnimate &= (!P.getZoneStatus(ZONE_LOWER) && !P.getZoneStatus(ZONE_UPPER));
  }
  else
  {    switch (cycle)    {……
Скетч не стартует автономно. После перерыва в питании 5мин.
Я взял с примера " Parola_Test" и сделал так :
if (P.displayAnimate())  {
      switch  (cycle) {…….
Так стартует после большого перерыва в питании.
Заметил: чем меньше букв в 1 фразе, тем легче старт.
Например такое начало лучше :
      P.setFont(ZONE_LOWER, NULL);
      P.setFont(ZONE_UPPER, BigFontUpper);

Думаю проблема в Китайских платах. Но их тоже можно заставить работать.


Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Jan 03, 2017, 10:54 am
Not sure what the problems were about (the translation is a bit hard to follow, and I cannot speak Russian :) ), but I have looked at all the Double_Height examples and simplified the looping logic. It was working ok for me before but I think it is easier to understand now.

Changes have been pushed to Github if you want to try them.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: borzov161 on Jan 06, 2017, 09:22 am
Hello. Sorry for the translation
arduino 1.8.0, плата arduino nano V3
library 03.01.2017
Conducted the experiment without the scoreboard. Only Arduino Nano.

example "Parola_Double_Height".
I changed only 1 line :

25 #define ZONE_SIZE 4
loaded the sketch, then USB removed in 1min.Again included USB.
svetodiod on PIN 13 as the indicator.
if svetodiod flickers rapidly-so the sketch works ok.

the result is
#define ZONE_SIZE 4    no
#define ZONE_SIZE 6    ok
#define ZONE_SIZE 8    no
#define ZONE_SIZE 10   no
#define ZONE_SIZE 12   ok
#define ZONE_SIZE 14   ok

to update that
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Jan 06, 2017, 09:43 am
Are you using external power supply or just USB? There is a limit to how many you can have before power runs out and you need external power supply.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: borzov161 on Jan 06, 2017, 09:48 am
from the computer.  no scoreboard MAX.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: borzov161 on Jan 06, 2017, 09:58 am
connection
8765
1234
good idea
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Jan 06, 2017, 10:12 am
No. The standard configuration for Parola is
87654321

If the modules are big and cannot be put next to each other (like generic module) then it needs to be
5678
4321

For othe square modules (like FC 16) then this can also work
8765
4321

This is shown in the examples header comments.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: borzov161 on Jan 06, 2017, 10:14 am
I understand.
it is very good
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: borzov161 on Jan 06, 2017, 06:17 pm
external power supply 5V 5A.
MAX--20pieces . this pieces constantly

why not start.after a pause of 2 min.external power
#define ZONE_SIZE 4    ok works
#define ZONE_SIZE 8    no
#define ZONE_SIZE 10   no
#define ZONE_SIZE 12   ok works
#define ZONE_SIZE 14   ok works

Sorry for the translation
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: borzov161 on Jan 07, 2017, 03:54 pm
I'm not a programmer.
in your sketch, on the basis of "Parola_Double_Height"
 i added 3 initialization.
............................................
void setup(void) {
// initialise the LED display. 3 times
    delay(2017); //accumulating the power for a cold start
    P.begin();  //
    delay(1000);
    P.begin(); 
    delay(1000); 
 //further, no changes 
  P.begin(MAX_ZONES);/// инициализируем дисплей на 2 зоны
  P.setZone(ZONE_LOWER, 0, ZONE_SIZE - 1);
  P.setFont(ZONE_LOWER, BigFontLower);
  P.setZone(ZONE_UPPER, ZONE_SIZE, MAX_DEVICES-1);
  P.setFont(ZONE_UPPER, BigFontUpper);
................................................
this is wrong, but helped me.it really works.
Works cold start.
Arduino powered Vin +14V. 
display 5V / 5A.  20component (#define ZONE_SIZE 10)
Soft start.
LEDs do not blink randomly.
5 seconds screen black.
and the text ran.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: borzov161 on Jan 09, 2017, 07:26 pm
Hello
new libraries not working -"BigFont" "PA_SCROLL_RIGHT".
"BigFont" "PA_CLOSING"- distortion.
give examples.
please.
my МАХ7219-4  (http://ru.aliexpress.com/item/MAX7219-Dot-Matrix-Module-For-Arduino-Microcontroller-4-In-One-Display-with-5P-Line/32618155357.html?spm=2114.03010208.3.2.hRmdO6&ws_ab_test=searchweb0_0,searchweb201602_1_116_10065_117_10068_114_115_113_10000009_10084_10083_10080_10082_10081_10060_10062_10056_503_10055_10054_10059_10099_501_10078_10079_10000012_10093_10103_10073_10102_10000015_10096_10052_10108_10053_10107_10050_10106_10051,searchweb201603_3,afswitch_5,single_sort_0_default&btsid=3a9dd49c-4583-4f23-9fb0-7ea54fd8aa16)
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Jan 09, 2017, 10:01 pm
Not sure what you mean by 'not working'. You need to be more specific. A video of what is wrong would be most helpful.

Not all the animations will work, or look good, with the double height. PA_SCROLL_* all work as long as the font definitions are correct (both top and bottom half of a character have the same width definition).

Double height scrolling examples (v1 and v2) are both for scrolling text.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: borzov161 on Jan 10, 2017, 05:28 am
old connection .new libraries.
video (https://www.youtube.com/watch?v=mlo7Or2L6I4)
new connection.new libraries. video
https://youtu.be/VfQWDjskP7I
please write an example."PA_SCROLL_RIGHT" BIG
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Jan 10, 2017, 09:29 pm
The top row somehow is reversed (FLIP_LR) when you are scrolling left. Can you check your code to make sure you are not doing this, as when you scroll left it seems to be ok.

The FLIP_UD and FLIP_LR should only need to be done once (in setup) if you are are using the display as a double display all the time.

EDIT: I managed to find time to look at the code. There was a logic error in the libraries for PA_SCROLL_RIGHT with FLIP_LR turned on. This should now be fixed and uploaded to the repository (v2.6.1). Double  height v2 example has been changed to allow easy change to right scroll when I was testing the change.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: borzov161 on Jan 12, 2017, 08:30 pm
thank you so much for your attention.
ок working-PA_SCROLL_RIGHT.  !!!!!!!!!!!!!!!!!!!!

No photo. It is necessary to rewire more times. back to the new connection.

i doubt it--PA_PRINT, PA_NO_EFFECT .
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: borzov161 on Jan 20, 2017, 11:12 am
Hello
the last library.
a new connection.
example.Parola_Double_Height.
https://youtu.be/dL14a_tX8Ng
change 1 word: BIG -- -BIk
shift
https://youtu.be/gjKB89_C2zs


let's go back to the old connection.
forever
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: ton4eff on Jan 20, 2017, 07:25 pm
FLIP_LR stopped working after the last update. FLIP_UD is OK. :( I'm using Parola_Zone_TimeMsg with just these two lines added in void setup. I'm using FC-16 HW setings.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Jan 21, 2017, 03:28 am
Quote
I'm using Parola_Zone_TimeMsg with just these two lines added in void setup. I'm using FC-16 HW setings.
No lines shown.

What problem are you having, exactly?

EDIT: Just in case, try the latest version uploaded as it fixed a "PA_PRINT" issue when FLIP_LR was enabled.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Jan 21, 2017, 05:35 am
Quote
i doubt it--PA_PRINT, PA_NO_EFFECT
Fixed. New version in the code repo.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: ton4eff on Jan 21, 2017, 10:56 am
I'm using these in void setup:

Code: [Select]
  P.setZoneEffect(1, true, PA_FLIP_LR);
  P.setZoneEffect(1, true, PA_FLIP_UD);


And the LR flipping wasn't working. Now after the update it's OK. Thanks! :)
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: ton4eff on Jan 21, 2017, 11:14 am
I noticed something interesting, I think it's MD_DS3231 library related. The Parola_Zone_TimeMsg example stops working (empty matrices or just random characters) if I use MD_DS3231 library in the sketch (I just find and replace MD_DS1307 with MD_DS3231). If I use MD_DS1307 library, even with a DS3231 module, there is no problem at all. I'm not complaining, just making notice if someone have a similar problem... :)
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: caps1g3f on Jan 22, 2017, 10:59 am
Hello,
First I'd like to congratulate for this fantastic library which allow great things with a little number of line code...
Unfortunately I'm encountering an issue...
I'm trying to create a clock with 7 seg module to display hour and led matrix to display 'alarm message ' (eg : 'wake up', happy birthday, 'it' summer'...)
Currently using TimeAlarms library (https://github.com/PaulStoffregen/TimeAlarms) to manage hours & alarm. Time is handled using DS1307 module.
My problem is that when an alarm is trigerred and function executed I can't see matrix animation. (using displayanimate()) but when using 'srite' method  it's ok ( data are wirtten on matrix at the configured time)
Does someone encounter this prb ? With the code below can please help to troubleshoot the prb ? ( executed fucntion is @ line 82)
I don't know where the issue could be but as a starting point; looking toward misusage of display lib ;-) (eg: incompatibilty with alarm.delay()??? )
thx in advance for you support and hints

Code: [Select]


#include <TimeLib.h>
#include <Wire.h>
#include <DS1307RTC.h>
#include <SoftwareSerial.h>
#include <TimeAlarms.h>
#include <MD_Parola.h>
#include <MD_MAX72xx.h>
#include <SPI.h>


char tempString[100]; //Used for sprintf
boolean colonOn = false;
long millisTimer;
const byte s7sAddress = 0x20;
#define  MAX_DEVICES 4
#define CLK_PIN   8
#define DATA_PIN  9
#define CS_PIN    10

MD_Parola P = MD_Parola(DATA_PIN, CLK_PIN, CS_PIN, MAX_DEVICES);

#define  SPEED_TIME  50
#define PAUSE_TIME  1000

/*  code to process time sync messages from the serial port   */
#define TIME_HEADER  "T"   // Header tag for serial time sync message

unsigned long processSyncMessage() {
  unsigned long pctime = 0L;
  const unsigned long DEFAULT_TIME = 1357041600; // Jan 1 2013

  if(Serial.find(TIME_HEADER)) {
    Serial.println('Time Header');
    Serial.println(Serial.find(TIME_HEADER));
     pctime = Serial.parseInt();
     return pctime;
     if( pctime < DEFAULT_TIME) { // check the value is a valid time (greater than Jan 1 2013)
       pctime = 0L; // return 0 to indicate that the time is not valid
     }
  }
  return pctime;
}

void s7sSendStringI2C(String toSend)
{
  Wire.beginTransmission(s7sAddress);
  for (int i=0; i<4; i++)
  {
    Wire.write(toSend[i]);
  }
  Wire.endTransmission();
}

// Send the clear display command (0x76)
//  This will clear the display and reset the cursor
void clearDisplayI2C()
{
  Wire.beginTransmission(s7sAddress);
  Wire.write(0x76);  // Clear display command
  Wire.endTransmission();
}

// Set the displays brightness.
void setBrightnessI2C(byte value)
{
  Wire.beginTransmission(s7sAddress);
  Wire.write(0x7A);  // Set brightness command byte
  Wire.write(value);  // brightness data byte
  Wire.endTransmission();
}

// Turn on any, none, or all of the decimals.
void setDecimalsI2C(byte decimals)
{
  Wire.beginTransmission(s7sAddress);
  Wire.write(0x77);
  Wire.write(decimals);
  Wire.endTransmission();
}

  void testAlarm_Matrix(){
  // This line is printed in console
  Serial.println("***********In alarm callback function ***** ");
  P.setTextBuffer("Alarm");
  //'OK' is displayed on matrix when comments removed
  //P.write("OK");
  //Animation never displayed on matrix...
  // DONE never printed in console....
  if(P.displayAnimate()){
    Serial.println("DONE");
    P.displayReset();
    P.displayClear();
  }
}
void ledDisplay(){
  sprintf(tempString, "%02d%02d", hour(), minute());
  s7sSendStringI2C(tempString);
}

void setup()  {
  Serial.begin(9600);

  Wire.begin();  // Initialize hardware I2C pins
  clearDisplayI2C();  // Clears display, resets cursor
  setSyncProvider(RTC.get);   // the function to get the time from the RTC
  if (timeStatus() != timeSet)
     {Serial.println("Unable to sync with the RTC");}
  else{
     Serial.println("RTC has set the system time");      }
 millisTimer = millis();
 
 // Define alarm. For test, define it the next minute;..
 Alarm.alarmRepeat(hour(),minute()+1,0, testAlarm_Matrix); 
  P.begin();
  P.setInvert(false);
  P.setIntensity(1);
  P.displayText("Init",PA_CENTER, SPEED_TIME, PAUSE_TIME, PA_SCROLL_DOWN,PA_SCROLL_DOWN);
}

void loop()
{
  if (Serial.available()) {
    time_t t = processSyncMessage();
    if (t != 0) {
      RTC.set(t);   // set the RTC and the system time to the received value
      setTime(t);         
    }
  }
 
  ledDisplay();
  // For semi colon blink
  if( (millis() - millisTimer) > 1000)
  {
    millisTimer += 1000; //Adjust the timer forward 1 second
     if(colonOn == true)
    {
      colonOn = false;
      setDecimalsI2C (0b00000000);
    }
    else
    {
      colonOn = true;
      setDecimalsI2C (0b00010000);     
    }
  }
  Alarm.delay(1000);
}
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Jan 22, 2017, 09:56 pm
displayAnimate() must be called many times in a loop to make sure the animations happens. write() and print() have this built into the function call. Example code usually has the "if displayAnimate()" statement in the loop() function, which provides the looping required for the animation to happen.

Calling it once the way you do will not do what you expect. Try changing the code to
Code: [Select]
  P.displayReset();
  while (!P.displayAnimate())
    ; /* do nothing */
  Serial.println("DONE");
  P.displayClear();

Be aware that the "DONE" will not be printed until after the animation is completed (ie, it is blocking at the while loop and behaves like delay() would). If your animation takes more than one second you may not get an update of your clock while it is happening. This may or may not be a problem for you.

A better way to do this would be to restructure the code so that animations happen in loop() when there is a need for the animation, so that other functions in your program can continue to operate as normal.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: caps1g3f on Jan 22, 2017, 10:20 pm
Thanks for your quick answer.
Actually your solution do the trick ;-)
'DONE' was just for debugging and noticed that it will be displayed during 'pause' time .
I do not plan to handle any other event during animation (except an interruption) so I'll move this way to handle alarm display.
Many, many, many thanks
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: borzov161 on Jan 23, 2017, 05:55 am
Hello
the last library.
a new connection.
example.Parola_Double_Height
effects
PA_PRINT  - ok
PA_SCROLL_LEFT  -ok
PA_SCROLL_RIGHT -ok
PA_CLOSING --overturned

thank you for your attention.
I'm going to solder on the old connections.there is more work effects.
I hope that the new library will work on the old connection.in the future.

Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: thecqf on Jan 27, 2017, 10:17 am
Hi everyone

Im doing a similar project too but i used 4 in 1 MAX7219 dot matrix led displays
The library I used is Max72XXPanel because when i use MAX72xx Library my display
wont work properly.

is there any ways to integrate Parola with MAX72XXPanel??
because I really dont want to cut my 4 in 1 dot matrix into 4 parts.

Thanks everyone!
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: borzov161 on Jan 27, 2017, 02:33 pm
I also FC-16
4 in 1 MAX7219
all OK.
here on the forum explained how to set up.
17-18page.
I ordered

#if USE_PAROLA_HW      // tested MC 8 March 2014
//#pragma message "PAROLA HW selected"
#define   HW_DIG_ROWS   1 ///< MAX72xx digits are mapped to rows in on the matrix
#define   HW_REV_COLS   0 ///< Normal orientation is col 0 on the right. Set to 1 if reversed
#define   HW_REV_ROWS   0 ///< Normal orientation is row 0 at the top. Set to 1 if reversed
#endif
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Jan 27, 2017, 08:45 pm
Quote
is there any ways to integrate Parola with MAX72XXPanel??
Not unless you want to do it yourself.

Quote
I really dont want to cut my 4 in 1 dot matrix into 4 parts
This is not necessary. The panel (I assume you have a 1x4 panel) are just 4 of the individual matrix panels made as one unit, so they work the same way. Parola will work with these if you select the right type of matrix. Please read and follow the instructions in the MD_MAX72xx library documentation for how to set the matrix type in the library header file.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: kilooli on Jan 28, 2017, 06:56 pm
Hello everybody.
Thanks a lot to Marco for this wonderfull librarie i'm discovering these days.

I've got one question.

I have 4 matrix 8x8  led chained together.

I try to make a CONTINUOUS scrolling message  (including the time given by a Tiny RTC and a message).

But when i execute the program i have a small lag between two animations (before the next animation begins to replace the last one)

I've tried to put setPause (0) , but the lag is still there.
I've also tried to reduce my code between two "Time reading" , but it's  not resolving my problem.

So the question:
Is there something to do to get rid of the lag ?
Or it is just the time necessary for the "physical" reading of the Time shield , and nothing can be done ?


Thanks a lot,
Cheers

here is my code:

Code: [Select]


#include <Wire.h>
#include <TimeLib.h>
#include <DS1307RTC.h>
#include <MD_Parola.h>
#include <MD_MAX72xx.h>
#include <SPI.h>


#define  MAX_DEVICES 4
#define CLK_PIN   13
#define DATA_PIN  11
#define CS_PIN    10


char heure[100];



MD_Parola P = MD_Parola(CS_PIN, MAX_DEVICES);




void setup() {
 
 P.begin();
 P.setIntensity(2) ;
 P.setPause(0);
P.setScrollSpacing(3);

}

void loop() {


tmElements_t tm; 
RTC.read(tm) ; // reading the Tiny RTC

sprintf(heure, "%02d:%02d:%02d   Arduino...", tm.Hour,tm.Minute, tm.Second); //  array of chars

P.displayText(heure,PA_LEFT,60,0, PA_SCROLL_LEFT, PA_SCROLL_LEFT);
//P.displayScroll(heure,PA_LEFT,PA_SCROLL_LEFT,80);



while (!P.displayAnimate()) ;       

    }


Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Jan 28, 2017, 11:51 pm
pause() is only the time between the end of the 'entry' animation and the start of the 'exit' animation, so it has no effect on the time between the end of one and the start of another.

The time to read the RTC is usually very small (1-2ms if that much) so it is unlikely that you are able to perceive this as a delay. You can easily verify this by printing millis() before and after the call to the RTC.read() - the difference is how long it takes.

What kind of delay are you seeing? is it just a very small one (ie, 100ms or less) or are we talking longer? Again, print millis() before after the animation and before the next one will tell you how long it is taking between animations. There will always be a slight delay as you change over, but anything longer could be something else.



Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: kilooli on Jan 29, 2017, 12:20 pm
Hello and thank you for your answer, Marco.

As far as i can estimate the delay , it may be 0.1s...
Anyway it's enough to notice it.

I mean a very short stop between  animations, nothing unbearable , but the scrolling is not perfectly fluent.
I'll follow you advice and print millis before and after the RTC reading.

i'll let you know.

Thanks again for your help .
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: kilooli on Jan 29, 2017, 12:38 pm
So I did the test :

2 ms are presents between two millis() with the RTC.read inbetween

Code: [Select]


  test = millis();
Serial.println(test);

  RTC.read(tm) ;

  test = millis();
Serial.println(test);



So i guess the noticeable  lag is normal and reflects the time necessary for the chip to load the new animation.

Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: CatShadow on Feb 04, 2017, 05:20 pm
Hi,

I'm currently trying to work with the Parola library, but each 8x8 "cell" is flipped, or inverted.
Here is an image :

http://imgur.com/a/MPQb6 (http://imgur.com/a/MPQb6)

I tried to put #define USE_GENERIC_HW 1 in my code, but it does not work.

What should I do ?

Thanks for your time :)
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: marco_c on Feb 04, 2017, 07:38 pm
Quote
What should I do?
Maybe read the documentation? Those modules are definitely not GENERIC but more likely FC-16, and you don't just put it in your code. Read the doc on hardware with the MD_MAX72xx library.
Title: Re: Scrolling LED matrix display - Parola for Arduino
Post by: Daves_DIY on Feb 11, 2017, 12:31 pm
Hi