Help please. I am using my tablet with my new m prime one printer.

Help please. I am using my tablet with my new m prime one printer.
I just stated testing the stepper motor movement using the tablet.
I hooked up the x motor and hit the x movement button on my tablet and it worked. then plugged in the end stop on my ramps 1.4 it worked untill I hit the end stop. Now I have unplugged the end stop and gcode printr looses connection when I turn on the power to the printer. I do have connection if I have the power to the printer turned off. ??