Retard the ignition timing.
Pinging is a word used to describe the noise created in an engine when detonation occurs. Detonation is when combustion starts on two flame fronts and collide violently together. (heard as a rattling sound as the throttle is opened)The audible pinging noise is a result of the sudden increase in combustion pressure being reached before the piston is in the correct position to convert it to power. So retarding the timing will move the maximum combustion pressure point to a position where no second flame front spontaneously ignites.