That's how your post should have appeared; thank you for trying, at least! Welcome to the forum!
Now, since you've asked no question, I have two:
Is your posting in the correct forum category? Because it's pretty simple, needs nothing specific to an ESP32, and you're a newbie, I suspect this belongs in the programming category, but I may be wrong; so tell me,
Do you have a question about your code? Or the circuit you didn't show us?