Implementation of DIY Manual Support Request

Typically that code goes into setup()

Typically that code goes into loop() or some other function and could go into setup().

There thingies called code tags that surround the code to make it more readable and easy to copy and other thingies. Please, could you edit your post and use code tags?