compiling errors MD_MAX72xx on arduino uno with 8x8 matrix [SOLVED]

Hello,

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?

Kind regards,
Peter

Hi,

Can you please post a copy of your sketch, using code tags?
They are made with the </> icon in the reply Menu.
See section 7 http://forum.arduino.cc/index.php/topic,148850.0.html

Thanks.. Tom.... :slight_smile:

TomGeorge:
Hi,

Can you please post a copy of your sketch, using code tags?
They are made with the </> icon in the reply Menu.
See section 7 http://forum.arduino.cc/index.php/topic,148850.0.html

Thanks.. Tom.... :slight_smile:

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

Hi,
Where did you get the Library from.
Can you post a link?
The code you have posted is not complete.

Tom.... :slight_smile:

What version of the IDE are you using?

Please also make sure that you have the latest version of the library from the distribution (links below - arduino libraries).

I am using Arduino IDE 1.6.5
and this is the link to the library: https://github.com/mariusrugan/MD_MAX72XX

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 :slight_smile:
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

I found the solution for it
This can be closed

Thx a lot for all the help!

Hi,
Good to hear, you can edit the subject of this thread, just ad [SOLVED] to it so that it will be recognized as such.

Tom... :slight_smile: