How about adapting something like this?
https://css-tricks.com/how-to-ask-a-goo ... he-forums/
1. Provide a link
Are you following an online tutorial? Can you provide a link to a datasheet for the hardware that you are trying to use? Did you copy some code from somewhere?
2. Provide Code Samples
People will find it easier to help you if you provide a short, executable example of the code that you are using. This means they can try to re-create your problem. Posting what you have tried to do is a lot more helpful that just asking someone to write the entire solution for you.
Remember to post them between [ code][/ code] tags.
Linking to a GitHub repository is also a good way to share your code.
3. Explanation Illustration/Photograph or Screenshot
Can you provide a visual aid that might help people understand your problem or help you diagnose a wiring problem? You can link to images stored elsewhere using the [img ][/ img] tags.
4. Exact details
Be Specific. "It doesn't work" won't get you answers. What error messages do you get?
Which model of Raspberry Pi you are using or which operating system will help get you the right answers.
5. What you tried / What you thought would happen
What behavior did you witness and how does this differ to what you expected? Provide details of what you expect to happen or what you are trying to achieve.