Help with LED matrix displaying counter sketch

Hi all,

i have just started getting into Arduino programming and have a project that i am planning. I have been looking around on the internet t0 try to solve what i want to do but with no luck and getting myself more confused!

i am trying to make a counter/ score display. i started off using a LCD screen in my kit and 2 buttons (add 1 point, Add 10 points) the idea is to keep track of a score and display on the screen. I had this code working

// include the library code:
#include <LiquidCrystal.h>

// initialize the library with the numbers of the interface pins
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);

// set up a constant for the score switchPin
const int switchPin = 6;
const int switchPin2 = 7;

int hits = 0;

// variable to hold the value of the switchPin
int switchState = 0;
int switchState2 = 0;

void setup() { 
 Serial.begin(9600); 
  // set up the number of columns and rows on the LCD 
  lcd.begin(16, 2);

  // set up the switch pin as an input
  pinMode(switchPin,INPUT);
  pinMode(switchPin2,INPUT);

  lcd.clear();
  lcd.setCursor(0, 0);
  lcd.print("Start Game");
  lcd.setCursor(0, 1);
  lcd.print("Get Ready");
}

void loop() {  
  // check the status of the switch
  switchState = digitalRead(switchPin);
  switchState2 = digitalRead(switchPin2);

  // compare the switchState to its previous state
     if (switchState == HIGH) {
      hits = hits + 10;
      lcd.clear();
      lcd.setCursor(0, 0);
      lcd.print("Score");
      lcd.setCursor(0, 1);
      lcd.print(hits);
    }
    
    if (switchState2 == HIGH) {
      hits = hits + 1;
      lcd.clear();
      lcd.setCursor(0, 0);
      lcd.print("Score");
      lcd.setCursor(0, 1);
      lcd.print(hits);
    }

  }

i then wanted to display the score on 4 LED matrix that i got from ebay
http://www.ebay.co.uk/itm/131382969866

and i have connected them up the same as in this instructables
http://www.instructables.com/id/Multiple-LED-Matrixes-with-Arduino/3/

How do i go about getting a similar code to work on the LED matrix?? i dont need the game start bits i just want it to start displaying 0000 and then start counting upwards of 1 or 10 depending on the button pressed and it doesnt need to scroll!

i have got confused on whether i should be looking at using binary type coding or can i send to print

any direction or help would be great!

Definitely can't send to print. You need to use code that will manage the LED matrix for you if you do not want to do that yourself.

The Ledcontrol library seems quite popular and I have my MD_MAX72xx library. I am sure there are many more, but both these will do the job and I am sure that there is example code that you can copy.

If you want to have more fancy text effects then MD_Parola library is also worth a look.

Both my libraries are linked from the post footer below.

cheers for the reply, i will have a look through your MAX72xx library too, hopefully it will start making sense. is there any good tutorials or guides about led matrix that could help me under stand better?

There is a lot of information on LED matrices, most of it pretty much the same - Google is your friend here "LED Matrix Arduino tutorial". There is a long explanation in the Playground on this site, which comes up in the Google search. Another place could be www.thebox.myzen.co.uk/Workshop/Introduction.html