implements fingerprint sensor to motorcycle

hi all, i am new here, and i want to ask about the code that i can use to run this project,
so i want to turn on my motorcycle with fingerprints, and i am constrained by translating logic into code in arduino, i have 2 channel relay, one to turn motorcycle, another for starter, i've seen some videos on youtube, and he said i just add the code in the FOUND MATCH part of the FINGERPRINTS sample code, but I have not understand what code I should write, is there anything that can help me ..

the logic is , if the sensor detects the correct finger, the motorcycle will light up, and when the sensor detects the correct finger for the second time the motorcycle will starter (motorcycle can be used), as its safety, if within a few minutes when the motorcycle is on and not there is a new fingerprint detected, then the relay will automatically switch off the power

Do you have your fingerprint scanner working already?

What code do you have now?

yes, for the fingerprint running normally, I have tried it and verified it in the enroll code example, and now i need the code to turn on the relay using fingerprint, as I have explained, i need the code to turn the motorcycle with fingerprint,

currently I do not have the modified code yet, but after I see the video on youtube, he said, just add the code in the FOUND MATCH part of the sample FINGERPRINTS, so for now I just stick to the original code FINGERPRINTS
and in the FOUND MATCH section I can not add any code yet, because I do not know what code I should write ...
so the problem is "CODE LIKE WHAT SHOULD I WRITE, LET ME CAN MOVE A MOTORCYCLE WITH A FINGERY SENSOR, HERE I HAVE 2 CHANNEL RELAYS, ONE TO MOVE A MOTORCYCLE, ONE MORE TO STARTER MOTORCYCLES ..

Start by inserting print statements that just say the fingerprints do or do not match.
Then choose some suitable relays that can be operated directly from the Arduino (i.e. ones that do not draw too much current).

Then add some code alongside the print statements to operate outputs when the correct fingerprint is detected. Use a multimeter to check the relay operates.

on which part I added the statement, sorry I am still learning ..

Something like this:

void loop() {
  if (readFingerprint(*fingerprint)) {
    if (isMatch(fingerprint)) {
      Serial.println(F("We have a match!"));
    }
    else {
      Serial.println(F("No match!"));
    }
  }
}

bool isMatch(Fingerprint fingerprint) {
  // Check whether it's a good fingerprint.
  if (good) return true;
  return false;
}

at the beginning, do i have to declare the pins used for the relay as output, for example (pinMode (4, OUTPUT)) or int relay = 4;

ipandiana:
at the beginning, do i have to declare the pins used for the relay as output, for example (pinMode (4, OUTPUT))

Yes. Pins are by default set to INPUT.

or int relay = 4;

Make that

const byte relayPin = 4;

const: tells the compiler it's a fixed value, so changing it in code will give an error, and it allows for optimisations.
byte: the value fits in a single byte, no need to waste memory.
relayPin: a more descriptive name than just relay.

while (p != FINGERPRINT_NOFINGER){
p = finger.getImage();
digitalWrite(relay2,LOW);
Serial.print(" RELAY ON");
}
digitalWrite(relay2,HIGH);
Serial.print(" RELAY OFF ");
}

b=digitalRead(relay1); //how in this section of coding does not directly execute, but when there is a true fingerprint then the code runs,
am i wrong entering coding

if(!b){
digitalWrite(relay1,HIGH);
Serial.print("RELAY1 OFF");
}
else{
digitalWrite(relay1,LOW);}

Dear Sir,
This Project is worked below the code. I am interested to this project

hi all, i am new here, and i want to ask about the code that i can use to run this project,
so i want to turn on my motorcycle with fingerprints, and i am constrained by translating logic into code in arduino, i have 2 channel relay, one to turn motorcycle, another for starter, i've seen some videos on youtube, and he said i just add the code in the FOUND MATCH part of the FINGERPRINTS sample code, but I have not understand what code I should write, is there anything that can help me ..

the logic is , if the sensor detects the correct finger, the motorcycle will light up, and when the sensor detects the correct finger for the second time the motorcycle will starter (motorcycle can be used), as its safety, if within a few minutes when the motorcycle is on and not there is a new fingerprint detected, then the relay will automatically switch off the power

I am working on same things. Just started. If you share code then It will help us.