interlock with analog input

hi

can I ask?

how to program interlock with analog input? thanks

*input is inserted into adc port

An analog input just senses voltage, that's all it does. What do you mean by "interlock"

static bool locked = false;
if(analogRead(inPin) > threshold)
  locked = true;

How to unlock?