MajicDesigns / MD_Parola

Library for modular scrolling LED matrix text displays
GNU Lesser General Public License v2.1
438 stars 135 forks source link

Multizone vs full zone handling library question - help request #106

Closed Sentinel8000 closed 1 year ago

Sentinel8000 commented 1 year ago

Im continue the work on my project. And i try use the zones feature.

I know overlaping not allowed - my question is, if we starting with multi zone mode, with defined 0 and 1 zone, can we switch back into the full zone?

Sketch:


MD_Parola P = MD_Parola(HARDWARE_TYPE_P, CS_PIN, 4);

void setup()
{
  P.begin(2);
  P.setZone(0, 0, 2);
  P.setZone(1, 3, 3);

  P.setIntensity(0, 0);
  P.setIntensity(1, 0);
}

void loop() {

if (P.getZoneStatus(0) && P.getZoneStatus(1))
  {
    P.displayZoneText(0, "TEST1", PA_LEFT, 100, 20, PA_SCROLL_LEFT, PA_SCROLL_LEFT);   
    P.displayZoneText(1, "TESZ2", PA_LEFT, 100, 20, PA_NO_EFFECT, PA_NO_EFFECT);     
  }

}

Now we have 2 zone displaying 2 text, but there is any way use the two zone together as one zone?

thank you Gabor

MajicDesigns commented 1 year ago

Zones cannot overlap if you are trying to use both at the same time because the animations will interfere with each other. However, if you are only using one zone then you can (re)declare the zone you are using (.setZone()) with overlaps to the other zone. Once you have finished with the single zone change it back to original configuration to make sure there is no interference.