Rotation along one axis.

You can attach code to a post.

To get pitch and roll, you don't need more than about 20 lines of code. See link in reply #1.