Forum Archive

Using the roll and pitch

reefboy1

Is there a way to access the roll and pitch??by this I mean the tilting of the devise

ccc

Yes... motion.get_attitude() returns the attitude of the device (roll, pitch, yaw).

reefboy1

Ok, thank you.

reefboy1

Say if I tilt up or down, is it possible to have that print something that always appears when I tilt up or down?

ccc

Yes. Pitch is probably the value that you should be looking at. To see how these values change in realtime, check out tilting_color.py at https://github.com/cclauss/Pythonista_scene

reefboy1

That's really cool! I'm trying to make a flight simulator, and that's why I was asking ... Any suggestions? In trying to make the Abe react to the tilting of the devise