Read the forum guidelines to see how to properly post code. Images of code are nearly worthless. I cannot copy the code to a text editor or the IDE for examination.
Use the IDE autoformat tool (ctrl-t or Tools, Auto format) before posting code in code tags.
Photos of the setup are great if we can clearly see where each wire goes and the photos are labeled. Please include a schematic. Schematics are less ambiguous.