Need help for Auto Reverse Polarity DC motor


#1

Hello. I’m looking a solution for my motorized slider to move back and forth continuously . I need Auto Reverse Polarity of DC motor using Orion board+ two limit switchers on both sides of slider. I figured out with a code in mBlock, it almost done but I need a help with this code. Revering is working but I can’t change speed continuously from potentiometer. Can you check this script, please ?