me and a group are constructing a minesweeping robot that uses a metal detector attached to the front that will continuously search for metal that comes within range of the coils.
What i am trying to achieve is to have the robot immediately stop once metal is detected. From my understanding i would be able to do this by using if statements that simply take an input signal from an external metal detector going in to the digital pins. So i think the code would go something like if metalinput is 1.5v> then send a signal to the motor controller to stop the motors.
However i am unsure of how exactly i would be connecting the metal detector up to the arduino and in what format the code would be.
I have built a small prototype of what i think it would look like which is in the images, but if i could get some direction on where to go from here that would be a great help.