MAX7219 LED Matrix Controllers

I have been playing with the 8x8 led matrixs and have had good success using the arduino pins. I now want to move on and use a MAX7219 LED Matrix Controller. I ran the code below and got errors, and am now stuck.

The code is an example and the same code that I have found when googling… So if you could help that would be great to get me started.

#include <Sprite.h>
#include <Matrix.h>

// Hello Matrix
// by Nicholas Zambetti <http://www.zambetti.com>

// Demonstrates the use of the Matrix library
// For MAX7219 LED Matrix Controllers
// Blinks welcoming face on screen

// Created 13 February 2006

/* create a new Matrix instance
   pin 0: data  (din)
   pin 1: load  (load)
   pin 2: clock (clk)
*/
Matrix myMatrix = Matrix(0, 2, 1);

void setup()
{
}

void loop()
{
  myMatrix.clear(); // clear display

  delay(1000);

  // turn some pixels on
  myMatrix.write(1, 5, HIGH);
  myMatrix.write(2, 2, HIGH);
  myMatrix.write(2, 6, HIGH);
  myMatrix.write(3, 6, HIGH);
  myMatrix.write(4, 6, HIGH);
  myMatrix.write(5, 2, HIGH);
  myMatrix.write(5, 6, HIGH);
  myMatrix.write(6, 5, HIGH);

  delay(1000);
}

Error:

C:\Users\NOTEBOOK\Dropbox\Ardunio\libraries\Matrix\Matrix.cpp:34:26: error: WConstants.h: No such file or directory
C:\Users\NOTEBOOK\Dropbox\Ardunio\libraries\Matrix\Matrix.cpp: In constructor 'Matrix::Matrix(uint8_t, uint8_t, uint8_t, uint8_t)':
C:\Users\NOTEBOOK\Dropbox\Ardunio\libraries\Matrix\Matrix.cpp:76: error: 'OUTPUT' was not declared in this scope
C:\Users\NOTEBOOK\Dropbox\Ardunio\libraries\Matrix\Matrix.cpp:76: error: 'pinMode' was not declared in this scope
C:\Users\NOTEBOOK\Dropbox\Ardunio\libraries\Matrix\Matrix.cpp: In member function 'void Matrix::putByte(uint8_t)':
C:\Users\NOTEBOOK\Dropbox\Ardunio\libraries\Matrix\Matrix.cpp:105: error: 'LOW' was not declared in this scope
C:\Users\NOTEBOOK\Dropbox\Ardunio\libraries\Matrix\Matrix.cpp:105: error: 'digitalWrite' was not declared in this scope
C:\Users\NOTEBOOK\Dropbox\Ardunio\libraries\Matrix\Matrix.cpp:107: error: 'HIGH' was not declared in this scope
C:\Users\NOTEBOOK\Dropbox\Ardunio\libraries\Matrix\Matrix.cpp:111: error: 'HIGH' was not declared in this scope
C:\Users\NOTEBOOK\Dropbox\Ardunio\libraries\Matrix\Matrix.cpp: In member function 'void Matrix::setRegister(uint8_t, uint8_t)':
C:\Users\NOTEBOOK\Dropbox\Ardunio\libraries\Matrix\Matrix.cpp:119: error: 'LOW' was not declared in this scope
C:\Users\NOTEBOOK\Dropbox\Ardunio\libraries\Matrix\Matrix.cpp:119: error: 'digitalWrite' was not declared in this scope
C:\Users\NOTEBOOK\Dropbox\Ardunio\libraries\Matrix\Matrix.cpp:124: error: 'HIGH' was not declared in this scope
C:\Users\NOTEBOOK\Dropbox\Ardunio\libraries\Matrix\Matrix.cpp: In member function 'void Matrix::syncRow(uint8_t)':
C:\Users\NOTEBOOK\Dropbox\Ardunio\libraries\Matrix\Matrix.cpp:135: error: 'LOW' was not declared in this scope
C:\Users\NOTEBOOK\Dropbox\Ardunio\libraries\Matrix\Matrix.cpp:135: error: 'digitalWrite' was not declared in this scope
C:\Users\NOTEBOOK\Dropbox\Ardunio\libraries\Matrix\Matrix.cpp:140: error: 'HIGH' was not declared in this scope

The code is an example and the same code that I have found when googling

It's strange, then, that you failed to google the first error message. The solution (replace WConstants.h with Arduino.h) has been posted many. many times.