laser receiver + display

I have made an arduino programm with a seven segment display and a button. When I press on the button the display counts up. But for my project I want to do it whit a laser receiver. If the laser receiver receives light, it has to count up. I also already have a programm for the laser receiver but how can i put these programms togheter. Could anyone help?

These are my programms…

1)Laser receiver
int licht;

void setup() {
// put your setup code here, to run once:
Serial.begin (9600);
pinMode (13,OUTPUT);

}

void loop() {
// put your main code here, to run repeatedly:
licht=analogRead(0);
Serial.println(licht);
if (licht<940) {
digitalWrite(13,HIGH);
}
else {
digitalWrite (13,LOW);
}
delay(100);

}

  1. Display + button
    const int a = 2;
    const int b = 3;
    const int c = 4;
    const int d = 5;
    const int e = 6;
    const int f = 7;
    const int g = 8;
    const int drukknop = 9;

int ktnu = 0;
int knopteller = 0;
int ktvorige= 0;

boolean zero(){
digitalWrite(a, HIGH);
digitalWrite(b, HIGH);
digitalWrite(c, HIGH);
digitalWrite(d, HIGH);
digitalWrite(e, HIGH);
digitalWrite(f, HIGH);
digitalWrite(g, LOW);
return true;}

boolean one(){
digitalWrite(a, LOW);
digitalWrite(b, HIGH);
digitalWrite(c, HIGH);
digitalWrite(d, LOW);
digitalWrite(e, LOW);
digitalWrite(f, LOW);
digitalWrite(g, LOW);
return true;}

boolean two(){
digitalWrite(a, HIGH);
digitalWrite(b, HIGH);
digitalWrite(c, LOW);
digitalWrite(d, HIGH);
digitalWrite(e, HIGH);
digitalWrite(f, LOW);
digitalWrite(g, HIGH);
return true;}

boolean three(){
digitalWrite(a, HIGH);
digitalWrite(b, HIGH);
digitalWrite(c, HIGH);
digitalWrite(d, HIGH);
digitalWrite(e, LOW);
digitalWrite(f, LOW);
digitalWrite(g, HIGH);
return true;}

boolean four(){
digitalWrite(a, LOW);
digitalWrite(b, HIGH);
digitalWrite(c, HIGH);
digitalWrite(d, LOW);
digitalWrite(e, LOW);
digitalWrite(f, HIGH);
digitalWrite(g, HIGH);
return true;}

boolean five(){
digitalWrite(a, HIGH);
digitalWrite(b, LOW);
digitalWrite(c, HIGH);
digitalWrite(d, HIGH);
digitalWrite(e, LOW);
digitalWrite(f, HIGH);
digitalWrite(g, HIGH);
return true;}

boolean six(){
digitalWrite(a, HIGH);
digitalWrite(b, LOW);
digitalWrite(c, HIGH);
digitalWrite(d, HIGH);
digitalWrite(e, HIGH);
digitalWrite(f, HIGH);
digitalWrite(g, HIGH);
return true;}

boolean seven(){
digitalWrite(a, HIGH);
digitalWrite(b, HIGH);
digitalWrite(c, HIGH);
digitalWrite(d, LOW);
digitalWrite(e, LOW);
digitalWrite(f, HIGH);
digitalWrite(g, LOW);
return true;}

boolean eight(){
digitalWrite(a, HIGH);
digitalWrite(b, HIGH);
digitalWrite(c, HIGH);
digitalWrite(d, HIGH);
digitalWrite(e, HIGH);
digitalWrite(f, HIGH);
digitalWrite(g, HIGH);
return true;}

boolean nine(){
digitalWrite(a, HIGH);
digitalWrite(b, HIGH);
digitalWrite(c, HIGH);
digitalWrite(d, LOW);
digitalWrite(e, LOW);
digitalWrite(f, HIGH);
digitalWrite(g, HIGH);
return true;}

boolean leeg(){
digitalWrite(a, LOW);
digitalWrite(b, LOW);
digitalWrite(c, LOW);
digitalWrite(d, LOW);
digitalWrite(e, LOW);
digitalWrite(f, LOW);
digitalWrite(g, LOW);
return true;}

void setup(){

pinMode(a, OUTPUT);
pinMode(b, OUTPUT);
pinMode(c, OUTPUT);
pinMode(d, OUTPUT);
pinMode(e, OUTPUT);
pinMode(f, OUTPUT);
pinMode(g, OUTPUT);
pinMode(drukknop, INPUT);

}
void loop(){
ktnu = digitalRead(drukknop);

if (ktnu != ktvorige) {
if (ktnu == HIGH) {

knopteller++;
Serial.println(“aan”);
Serial.print("aantal keren gedrukt: ");
Serial.println(knopteller);
} else {
Serial.println(“uit”);
}
delay(200);
}
int t = 1000;

switch (knopteller){
case 0: zero(); break;
case 1: one(); break;
case 2: two(); break;
case 3: three(); break;
case 4: four(); break;
case 5: five(); break;
case 6: six(); break;
case 7: seven(); break;
case 8: eight(); break;
case 9: nine(); break;
case 10: zero(); break;
}

}

Thank you

How fast are your receiving that laser pulses?

According to the example program I guess that you're using an LDR (Light Dependent Resistor). These are not very fast. A photo transistor might be the better choice for that setup.

What device is generating the laser pulses?