It is difficult to look at INO files on an iPad.
Use CTRL T to format the sketch.
Please use code tags.
Use the </> icon in the posting menu.
[code] Paste sketch here. [/code]
Show us a good schematic of your circuit. Show us a good image of your wiring.
What exactly is the problem?