I constantly get these compiling errors when trying to upload an example from the MD_Max722xx library:
Build options changed, rebuilding all C:\Private\Arduino_Projects\libraries\MD_MAX72XX\src\MD_MAX72xx.cpp: In member function 'void MD_MAX72XX::spiSend()': C:\Private\Arduino_Projects\libraries\MD_MAX72XX\src\MD_MAX72xx.cpp:289:41: error: no matching function for call to 'SPIClass::transfer(uint8_t*&, unsigned int)'
SPI.transfer(_spiData, SPI_DATA_SIZE);*
^* C:\Private\Arduino_Projects\libraries\MD_MAX72XX\src\MD_MAX72xx.cpp:289:41: note: candidate is: In file included from C:\Private\Arduino_Projects\libraries\MD_MAX72XX\src\MD_MAX72xx.cpp:25:0: C:\Private\Arduino_Projects\libraries\SPI/SPI.h:55:6: note: static byte SPIClass::transfer(byte) byte SPIClass::transfer(byte _data) {
am I doing something wrong?
How can this be solved?
the code is nothing special, it's one of the examples that came with the library
// Program to exercise the MD_MAX72XX library
//
// Uses most of the functions in the library
#include <SPI.h>
#include <MD_MAX72xx.h>
// 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 PRINTD(x) Serial.println(x, DEC)
#else
#define PRINT(s, x)
#define PRINTS(x)
#define PRINTD(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 4
#define CLK_PIN 13 // or SCK
#define DATA_PIN 11 // or MOSI
#define CS_PIN 10 // or SS
// SPI hardware interface
MD_MAX72XX mx = MD_MAX72XX(CS_PIN, MAX_DEVICES);
// Arbitrary pins
//MD_MAX72XX mx = MD_MAX72XX(DATA_PIN, CLK_PIN, CS_PIN, MAX_DEVICES);
// We always wait a bit between updates of the display
#define DELAYTIME 100 // in milliseconds
void scrollText(char *p)
{
uint8_t charWidth;
uint8_t cBuf[8]; // this should be ok for all built-in fonts
PRINTS("\nScrolling text");
mx.clear();
while (*p != '\0')
{
charWidth = mx.getChar(*p++, sizeof(cBuf)/sizeof(cBuf[0]), cBuf);
It's just giving me errors compiling it.
The errors are not related to the code, but to the library files
There is only one official release site for the library (mine). I have had other people report problems with downloads from this other site. Please try the official release.
marco_c:
There is only one official release site for the library (mine). I have had other people report problems with downloads from this other site. Please try the official release.
I finally got it working
But I noticed the orientation is turned 90°, the horizontal scrolling isnt going from from the right matrix to left one. But on the right matrix from bottom to top and then goes on to the 2nd one, ...
Using, for example, the maxmatrix library, the scrolling is ok