Noob needs assistance

Hi all; I have no programming experience in c, just Plc ladder logic; but I want to make a bipolar stepper control my kitchen sliding door to open and close. I've been looking for a sketch that would work based on a digital input, and also read current so to retract if something gets in the way while closing. Any help would be greatly appreciated. Thanks in advance

Can you share us actual setup look like.
but I want to make a bipolar stepper control my kitchen sliding door to open and close.
The intentions was close and open door you might use reed switch/ position sensor to determine position. Here i am could not able to understand why using stepper motor.

Requested to put block diagram and describe the problem statement

Why not just rig a garage door opener ,pressure switch in the floor under a mat, It will even have all the sensors to prevent something getting caught in the jam.

It will even have all the sensors to prevent something getting caught in the jam.

That made me giggle in the context of a kitchen. Doors have jambs not jams.

LOL. spell-check doesn't fix grammar. :stuck_out_tongue:

Here's a pic