creating a scoreboard on the 4 digit 7 segment display

hi all,

So I'm trying to create a score keeper for a game of pong on my 4 digit 7 segment display. Ideally the score for 1 player will be digit 1 and the score for player 2 will be in digit 4. I understand how to generate the numbers but i dont know how to have the digits displaying different numbers. I also dont understand to change this score as each player scores.

any help with the coding will be greatly appreciated

cheers

c

Post your code so far. Use code tags. Post a schematic diagram and links to your components. Read the forum sticky post to find out how to do all those things.

int pinA = A2;
int pinB = A3;
int pinC = A4;
int pinD = A5;
int pinE = A6;
int pinF = A7;
int pinG = A8;
int d1 = A9;
int d2 = A10;
int d3 = A11;
int d4 = A12;    

void setup () {
pinMode(pinB, OUTPUT);
pinMode(pinC, OUTPUT);
pinMode(pinD, OUTPUT);
pinMode(pinE, OUTPUT);
pinMode(pinF, OUTPUT);
pinMode(pinG, OUTPUT);
pinMode(pinG, OUTPUT);
pinMode(d1, OUTPUT);
pinMode(d2, OUTPUT);
pinMode(d3, OUTPUT);
pinMode(d4, OUTPUT);
}

void loop () {

if(score[0]==0 && score[1]==0)         //0:0 score
  digitalWrite(d1, LOW);
  digitalWrite(d2, HIGH);
  digitalWrite(d3, HIGH);
  digitalWrite(d4, LOW);
  digitalWrite(pinA,HIGH);
  digitalWrite(pinB,HIGH);
  digitalWrite(pinC,HIGH);
  digitalWrite(pinD,HIGH);
  digitalWrite(pinE,HIGH);
  digitalWrite(pinF,HIGH);
  digitalWrite(pinG,LOW);
}

My apology's, This is my code for the scoring system so far. When the display is connected it does display the nil-nil score expected however when i try to add to my code to allow other scores like 1-0

if(score[0]==1 && score[1]==0)         //1:0 score
  digitalWrite(d1, LOW);
  digitalWrite(d2, HIGH);
  digitalWrite(d3, HIGH);
  digitalWrite(d4, HIGH);
  digitalWrite(pinA,LOW);
  digitalWrite(pinB,HIGH);
  digitalWrite(pinC,HIGH);
  digitalWrite(pinD,LOW);
  digitalWrite(pinE,LOW);
  digitalWrite(pinF,LOW);
  digitalWrite(pinG,LOW);
  delay(10)
  digitalWrite(d1, HIGH);
  digitalWrite(d2, HIGH);
  digitalWrite(d3, HIGH);
  digitalWrite(d4, LOW);
  digitalWrite(pinA,HIGH);
  digitalWrite(pinB,HIGH);
  digitalWrite(pinC,HIGH);
  digitalWrite(pinD,HIGH);
  digitalWrite(pinE,HIGH);
  digitalWrite(pinF,HIGH);
  digitalWrite(pinG,LOW);

using code like this it simply just displays the 1 from the start regardless of the actual score.

1 out of 3. Good start. Keep going.