So apparently you didn't read post 20. The RPI-1031 is not so much a tilt sensor as an orientation sensor. Man, I should have learned not to waste my time explaining things to you. And of course, the time spent doing the drawing was a wasted effort as well.
Furthermore, you ignored the advice in post 20 to use the PICkit logic tool to easily test the sensor. You wouldn't want to inadvertently learn anything.
So instead of understanding how the sensor works and spending a few minutes testing it out with the PICkit logic tool, you think it would be better to start ripping parts off the board and randomly changing code that you don't understand in the hopes of finding something that "sorta works, maybe, most of the time if I UNDERSTAND it right??" Oh right, I forgot your famous phrase...."HOPEFULLY it will work, IF it's CODED right." Gotcha. I understand perfectly now.