Project help Please

Hey guys,
I am an absolute beginner to arduino and I want some help on a ball sorting project.We have two balls to sort out: Metal and Wood.We are thinking of using an inductive proximity sensor that A NPN inductive proximity sensor and using a stepper motor. What we want to do is to have a continous rotation in steps in one direction if the inductive sensor does not detect anything but if it does detect to rotate the other way for an angle of 90 degrees and rotate back the other way it is. Please let me know if it is possible.

The sensor gives 1023 if it detects metal and 0 if it does not.
So based on this need an if statement that would rotate the stepper in the other direction for 90 degrees. If consecutive metal balls come it should rotate 180. Is this possible not?

Sounds like a reasonable project for an Arduino.

“sensor gives 1023 if it detects metal and 0 if it does not”

Do you mean 0 to 5 volts?

Yes 0 and 5V but i need help with the coding part as I am so lost.

Suggest you look at the many examples that come with the IDE.

You will get some great training by doing so.