To elaborate on the question:
- These pikes are long enough to out-range a knight's lance.
- The infantry soldiers are well trained and organized.
- They wait until the order is given, as to attack simultaneously.
- When the cavalry is too close to abort the charge (or risk trampling their own soldiers), the order is given and the pikes are revealed.
It's likely that the pikes will be hidden with grass/foliage or by the army's ranks (assuming multiple rows of pikemen).
Would the pikemen be able to properly brace themselves quickly enough to break the cavalry charge?