We used the built in accelerometer of the roborio as a tilt sensor.
This year, in autonomous, we had a problem. Our robot was top heavy. If we tried to get over obstacles in autonomous, if we went too fast, we tipped. If we went too slow, we got stuck. The tilt sensor was our salvation. You can see it in action in this youtube video.
https://www.youtube.com/watch?v=roVc581joiA
As 247 goes over the moat, the announcer indicates that we look stuck. What you see on the film is that we drift back to the back side of the moat, and then suddenly charge forward.
Well, the drift isn't a drift. We programmed it to wait two seconds and check the tilt. If we weren't on flat ground, we would go slowly back, and then gun it full speed to finish the job.
It worked quite nicely. We also used it as an anti-tip sensor. If the tilt got too high, we cut wheel speed or moved in reverse to prevent tipping. That one didn't always work, as seen in the same video at about 1:10.