I am a bit lost with this simple "hello world" sketch where I am trying to have two different texts scroll through two segments/zones.
After uploading this, only the text "Hello Zone 0" scrolls in zone 0. Zone 1 remains dark.
When changing the P.begin(0); to P.begin(8); and removing the comments for the static text lines below, both zones display their respective texts correctly, but without animation.
I tried almost everything vice versa and also consulted the docs, but I remain stuck with this.
Many thanks in advance for any comments,
Alex
// Program to demonstrate the MD_Parola library
//
// Simplest program that does something useful - Hello World!
//
// MD_MAX72XX library can be found at https://github.com/MajicDesigns/MD_MAX72XX
//
#include <stdio.h>
#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 HARDWARE_TYPE MD_MAX72XX::FC16_HW
#define MAX_DEVICES 8
#define CLK_PIN 13
#define DATA_PIN 11
#define CS_PIN 10
// Hardware SPI connection
MD_Parola P = MD_Parola(HARDWARE_TYPE, CS_PIN, MAX_DEVICES);
// Arbitrary output pins
// MD_Parola P = MD_Parola(HARDWARE_TYPE, DATA_PIN, CLK_PIN, CS_PIN, MAX_DEVICES);
void setup(void)
{
P.begin(0);
//P.begin(8);
P.setZone(0,0,3);
P.setZone(1,4,7);
P.setSpeed(50);
}
void loop(void)
{
if (P.displayAnimate())
P.displayZoneText(1, "Hello Zone 1", PA_CENTER, P.getSpeed(), P.getPause(), PA_SCROLL_LEFT, PA_SCROLL_LEFT);
if (P.displayAnimate())
P.displayZoneText(0, "Hello Zone 0", PA_CENTER, P.getSpeed(), P.getPause(), PA_SCROLL_LEFT, PA_SCROLL_LEFT);
/*
P.displayZoneText(0, "Zone 0", PA_CENTER, 0, 0, PA_PRINT, PA_NO_EFFECT);
P.displayZoneText(1, "Zone 1", PA_CENTER, 0, 0, PA_PRINT, PA_NO_EFFECT);
P.displayAnimate();
*/
}