What are you proposing the code must do in order to "find" the location of the limit switch? What motor control devices are you using?
English seems just fine, the lack of details is the problem.
The ESP8266 supports interrupts in any GPIO, except GPIO16.
Please post a schematic. Hand drawn, photographed and posted is fine. Include all pin names/numbers, components, their part numbers and/or values and power supplies.
Post technical information for relevant components.
Please answer the other questions posted by @Paul_KD7HB.
ESP12f Available pin is too little, this does not affect the use,Now the important question is each run last lap cannot detect limit1.
Pics has been updated.
A fundamental truth for programming: if you can't describe what you want to happen and how that be approached, you will NEVER be able to write the code.
KEY3 I use the interrupt,I know this is not the best way,key1 and key2 during the process of running after the encounter limit1, electricity the opportunity to have a short stop.
For beginners, there is no way that your have any good solution, please advise.