How do I post a code that exceeds the 9000 character post rule?
You attach the .ino file.
But 50% of the people who could have answered your question won't open the .ino file. Maybe they're browsing on their phone on the way to work or something.
The best way is to trim your code down to the smallest possible example which shows the error. 90% of the time, this will show you where the error is and you've just answered your own problem.