need help

can you explain more or an example ?

I told you and example is already in the Arduino's IDE.
Have you gone through these examples in you attempt to learn how to code?

Is this an X-Y Problem?