omz:forum

    • Register
    • Login
    • Search
    • Recent
    • Popular

    Welcome!

    This is the community forum for my apps Pythonista and Editorial.

    For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.


    Trivial example for motion module not working

    Pythonista
    motion
    1
    2
    1098
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • sigge
      sigge last edited by sigge

      This simple example return a zero-vector, ie. no values for for the gravity (returns (0.0, 0.0, 0.0)). Why?

      Running on iPad Pro 2019.

      import motion
      
      def main():
      	motion.start_updates()
      
      	mf = motion.get_gravity()
      	print(mf)
      
      	motion.stop_updates()
      	
      	
      if __name__ == '__main__':
      	main() 
      
      1 Reply Last reply Reply Quote 0
      • sigge
        sigge last edited by

        Insering a sleep for a few hundred ms seems to work. Resolved!

        1 Reply Last reply Reply Quote 0
        • First post
          Last post
        Powered by NodeBB Forums | Contributors