Hall effect sensor stepper help !

Hello,

I am trying to get this action to work with a the AccelStepper library. The movement can be seen here in this video at 22:43

I have two linear hall sensors and a 28BYJ-48 stepper motor. But I am really stuck on the code for this.

Any help would be greatly appreciated
Thank you !

-Rory