Help Making motor stop via IR Sensor (KeyesIR)

Hello guys, My project is connecting a Stepper Motor (with L293D Motorshield), Fingerprint Scanner, Bluetooth Hc06, all together with 2 IR Sensors (KeyesIR). Right now Everything is working perfectly except for My sensor. My goal is to control the stepper motor through Bluetooth, Fingerprint and Sensors. If an obstacle is passing through the sensor I want the motor to stop and go backward, or else to continue everything else. I tried to put the if/else statement in the beginning of the loop to the end, as you will see in my code, but what its doing is that when the sensor is working, its not allowing me to scan the finger.
And if there’s nothing between the sensor and the motor turns on and i try to pass an object after the motor is on, it wont stop. I want to be able to control the motor as soon as an object passes by the Sensor. Here are my codes can anybody please help? Thank you!

#include"FPS_GT511C3.h"     // Fingerprint scanner Library
#include"SoftwareSerial.h"    //Bluetooth, (Communication Library)
#include "AFMotor.h"       // Stepper motor MotorShield
#include "LiquidCrystal.h"    //LCD library (Ignore for now)
FPS_GT511C3 FingerPrint(50,51);   //Define Pins of fingerprint
AF_Stepper Mymotor(2048, 1);  //Define Steps Per revolution, and which port from the motor shield for stepper.
char val;    // Define Val for the Bluetooth State
int SensorVal= 0; // Variable for reding pin status
int IRSensorPin = A15;  // Defines the Pin# of the IRSensor1




void setup() {
  Serial.begin(115200);    //Serial monitor, (Bluetooth works better with this baudrate
  delay(100);
  FingerPrint.Open();
  FingerPrint.SetLED(true);     //Turn on sensor of fingerprint
Mymotor.setSpeed(14);   // Set speed of motor (RPM's)
pinMode(IRSensorPin, INPUT);

}

void loop() {
 
  
  
  SensorVal = analogRead(IRSensorPin);
  if (SensorVal > 600)
  {
  
  // FingerPrint Scanner Configuration
if (FingerPrint.IsPressFinger())
{
  FingerPrint.CaptureFinger(false);
  int FingerPic = FingerPrint.Identify1_N();
  if (FingerPic < 200)
  {
    if(FingerPic == 0 || FingerPic == 1)
    {
       
         //Fingerprin

    Serial.println( "Finger verified, Welcome Home: Darlin!"); 
    Serial.println("Motor Initializing");
    Mymotor.step(10000, FORWARD, DOUBLE);
      delay(1000);
      Mymotor.release();
      Serial.println("Motor Stopped");
    FingerPic == ' ';
         }
  }
    
  
  else
  {
    Serial.println(" Cannot verify, Keep Trying :)");
  }
}
  
// Bluetooth Configuration
    if (Serial.available())
  {
    val = Serial.read();
    Serial.write(val);
  }
  if(val == 'o')
  {
    Serial.println("Motor Initializing");
  Mymotor.step(10000, BACKWARD, DOUBLE);
  delay(100);
  Mymotor.release();
  Serial.println("Motor Stopped");
  val = ' ';

  }
  if(val == 'c')
  {
    Serial.println("Motor Initializing");
    Mymotor.step(10000, FORWARD, DOUBLE);
       delay(100);
    Mymotor.release();
    Serial.println("Motor Stopped");
    val = ' ';
}

  }
  else 
  {
    Serial.println("Motor Stopped by IR");
    Mymotor.release();
    delay(500);
  }
    


}
    FingerPic == ' ';

You are starting to piss me off. You are cross-posting the same question ( http://forum.arduino.cc/index.php?topic=323089.msg2232654#msg2232654 )

In another thread ( http://forum.arduino.cc/index.php?topic=323536 ) you blank out your question after someone answers it. This also seems to be a cross-post.

Keep doing this and you will be banned.

Sorry for pissing you off I didn't cross-post the SAME question for the first link that you put, that was for the connection of the bluetooth, and for the second link you posted, yes i did blank out the post because I realized i posted it in the wrong place, it was meant to be in the programing. I want to delete the other posts but It doesnt let me thats why Im doing it. Is there any way ? Once again i apologize, Im totally new to forum

To be honest, it was hard to tell.

Hello guys, My project is connecting a Stepper Motor (with L293D Motorshield), Fingerprint Scanner, Bluetooth Hc06, all together with 2 IR Sensors (KeyesIR). Right now Everything is working perfectly except for My sensor. My goal is to control the stepper motor through Bluetooth, Fingerprint and Sensors. If an obstacle is passing through the sensor I want the motor to stop and go backward, or else to continue everything else. I tried to put the if/else statement in the beginning of the loop to the end, as you will see in my code, but what its doing is that when the sensor is working, its not allowing me to scan the finger.

I suggest you learn how to use paragraphs. This is hard going reading this. Paragraphs aren't just to keep Teacher happy. They help the reader understand what you are saying.

For example, what does this mean?

If an obstacle is passing through the sensor I want the motor to stop and go backward, or else to continue everything else.

If there is an obstacle you want the motor to stop, or else continue?

... but what its doing is that when the sensor is working, its not allowing me to scan the finger.

So if there is an obstacle (or no obstacle, it isn't clear) you can't scan the finger? What finger? What does that have to do with the obstacle, the motor, or the sensor?

If you want answers you have to post questions that make sense.

You’re right let me explain what I really want. I am working a door that opens through bluetooth and fingerprint scanner.I have that working fine but I need help with the sensors. I want to be able to stop the Motor as soon as an obstacle passes by any of the sensors, and if there isn’t anything in the middleI want the code to run normal. (example: An Elevator door. as soon as someone puts their hands, the door stops and goes backward. Does that makes sense now? or it needs to be more clear? Thank you for your time.

Nekle_Tech:
yes i did blank out the post because I realized i posted it in the wrong place, it was meant to be in the programing. I want to delete the other posts but It doesnt let me thats why Im doing it. Is there any way ? Once again i apologize, Im totally new to forum

You are not so new to the forum, because blanking your question after starting a new thread seems to be a dirty routine.

You did that not only here:

but also here:

and here:

I don't like replying to a question that perhaps was never asked once upon a time.

So I will handle your questions as if you didn't ask.

And wish you good luck kidding around with somebody else!

I see. That is such rude behaviour. Take yourself to another forum. Thread locked.
Nekle_Tech banned for four weeks.

How to use this forum