Not sure what you are asking or what you have. Your pictures are difficult at best to follow.
Please read the advice in the topic "How to get the best from this forum". How to get the best out of this forum Also posting an annotated schematic along with your code will help us help you. Links to the hardware items technical information is also needed as we do not all have the same parts.