Motor code for drone works only 1 time

Post links or tell us all about the motor, the ESC, how they are wired and where the power to run them comes from.

Just now there is nothing that should make it run once but not again.

Have you calibrated the ESC?

See this possibly interesting thread

a7