Weird signal coming from a digital pin

Hello,

It is beyond my understanding why anyone would think it's a good idea to post an image of text!!!

Before you do anything else please take a moment to read General guidance
And
How to use this forum
Especially item #7 on posting code.

I suspect that if you put your oscilloscope probe pretty much anywhere on the Arduino you'll get the same or similar. I also suspect that if you move the ground connection for the 'scope probe to the ground on the Arduino it will go away or be substantially reduced. Make sure you connect only one ground to the 'scope.

What you are seeing is ringing. This is a brief oscillation in the parasitic inductance and capacitance that exists in all circuits. It will be being triggered by a sudden change in current somewhere in the circuit in response to what the code is doing. I suspect it is associated with the power connections, which is why I said to try moving the 'scope ground connection to the Arduino.