MajicDesigns / MD_MAX72XX

LED Matrix Library
GNU Lesser General Public License v2.1
307 stars 122 forks source link

Raspberry Pico Support please #50

Closed garymeg closed 1 year ago

garymeg commented 1 year ago

IMPORTANT

Before submitting this issue [X] Have you tried using the latest version of the library? [X] Have you checked this has not already been submitted and/or resolved? [ ] If you are requesting help a better choice may be the Arduino forum

Subject of the issue

Error When used on Raspberry Pico

Your Environment

Library Version: Latest Arduino IDE version: Any Host OS and Version: Win 11 CPU Hardware model/type: Matrix hardware model/type: [ ] Parola [ ] Generic [ ] ICStation [X ] FC-16 [ ] Custom (describe how wired)

Steps to Reproduce

Explain how to reproduce this issue. Please provide working code below to demonstrate the issue. Upload any code that works on Arduino uno/nano it will not work on Pico

Expected Behaviour

Explain what should happen. Load Example hello code, Hello should display

Actual Behaviour

Explain what happens instead. Provide log messages if relevant. Just get a few LED flickering very fast on top or bottom line in center

Code Demonstrating the Issue

Insert your compilable code here (no code snippets).
````// 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 <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::PAROLA_HW
#define MAX_DEVICES 11

#define CLK_PIN   18
#define DATA_PIN  19
#define CS_PIN    7

// 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();
}

void loop(void)
{
  if (P.displayAnimate())
    P.displayText("Hello", PA_CENTER, P.getSpeed(), P.getPause(), PA_SCROLL_DOWN, PA_SCROLL_UP);

}
garymeg commented 1 year ago

Mistake on my part sorry