You might want to look at this How to get the best out of this forum before you proceed any further.
It tells you how to ask a question here.
We need code, which you provided but we also need a schematic which you didn't. That link to redit is totally unacceptable here.