I'm trying to make a short micro second square wave every second and the issue is there is too much waves before the pulse and after can anyone help on the coding side or maybe be able to add some components to clean up the signal.
-Thanks
That is a classic image of "ringing" in the circuit. You are pulsing a high impedance circuit and it is attempting to oscillate, but there is no amplification, so the oscillation slowly dies out. Match the impedance of the driving circuit to the circuit receiving the pulse.
Paul
Please read the post at the start of any forum , entitled "How to use this Forum".
What model Arduino are you using?
What load are you driving the square wave into?
As mentioned earlier, if you are using a x10 probe, have you compensated it?
Although that does not necessarily look like an uncompensated probe.