Inductive sensor code

Lack of little knowledge for coding of inductive sensor

My idea was to be able to monitor a gear with the sensor and be able to get a message when the gear is stationary. Ie my plan is pt. to make digital input signal (ON / OFF) and get an output when the sensor has not detected "on / off" for 2 sec.

Here I need some help with the code part.

Anyone who has some inspiration? It's been a while since I've been nerded with it

Read up on

if...else statements

millis() [and the proper method to do timing: millis() - last_time > 2000]

digitalRead()

and probably digitalWrite() to turn on red and green leds for alarm and good.

Lack of little knowledge for coding of inductive sensor

Arduino doesn't make a programmable inductive sensor, so you are in the wrong place, apparently.

Now the Arduino is programmable, and can read an inductive sensor, but that was not your question.