Closed Philoneous closed 9 months ago
Following investigation was unable to replicate this problem.
Tested with the code below and hardware (Arduino SPI library) and software (bitbang) SPI worked ok on both AVR and ESP32 platforms. My ESP32 is a ESP32 Dev Board not Nano - could this make a difference?
#include <MD_Parola.h>
#include <MD_MAX72xx.h>
#define ESP32_TEST
#define HARDWARE_TYPE MD_MAX72XX::FC16_HW
#define MAX_DEVICES 4
#ifdef ESP32_TEST
// ESP32 Definitions
#define CLK_PIN 18
#define DATA_PIN 23
#define CS_PIN 5
#else
// AVR Definitions
#define CLK_PIN 13
#define DATA_PIN 11
#define CS_PIN 10
#endif
// 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)
{
Serial.begin(115200);
Serial.println("-----");
Serial.print("MOSI: "); Serial.println(MOSI);
Serial.print("MISO: "); Serial.println(MISO);
Serial.print("SCK: "); Serial.println(SCK);
Serial.print("SS: "); Serial.println(SS);
if (!P.begin()) Serial.println("!!P.begin() error");
P.print("Hello!");
}
void loop(void)
{
}
Close as no response from OP
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? [x ] If you are requesting help a better choice may be the Arduino forum
Subject of the issue
Software SPI does not work on Arduino Nano ESP32
Your Environment
Library Version:3.7.1 Arduino IDE version:2.2.1 Host OS and Version:Win 10 CPU Hardware model/type:
Steps to Reproduce
Whenever I use the constructor for software SPI (MD_Parola P = MD_Parola(HARDWARE_TYPE, DATA_PIN, CLK_PIN, CS_PIN, MAX_DEVICES)) the Matrix doesn't work. Using the Hardware constructor and the according pins works, however.
Expected Behaviour
Software SPI should be functional when defining the pins and using the according constructor.
Actual Behaviour
matrix remains blank
Code Demonstrating the Issue