Navigation

    Robolink logo
    • Register
    • Login
    • Search
    • [[global:header.categories]]
    • [[global:header.recent]]
    • [[global:header.tags]]
    • [[global:header.popular]]
    • [[global:header.users]]
    • [[global:header.groups]]
    As of September 2021, we have moved technical support to Robolink Help

    Welcome to the Robolink Community forum!

    You can post here to interact with others in the Robolink community. We're checking it weekly, and we'll respond to some messages. If you're looking for technical support, head over to Robolink Help.

    Gyroscope in Blocky

    Educators Corner
    2
    4
    1703
    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.
    • G
      GEMSLPC last edited by

      What can I do with the Gyroscope in Blocky? I feel like I am missing something? The codrone has sensors but I don't really understand how to access them. I can make it fly around and use the keyboard as a remote but isn't there more? Can it read colors or sense how close to the ground it is, or is all this in python? Would love some help.

      1 Reply Last reply Reply Quote 0
      • robolink_leila
        robolink_leila @GEMSLPC last edited by

        @gemslpc We don't have a sample code for that particular activity that can do an emergency stop midflight. Blockly is able to listen for the emergency stop command while simultaneously running code, but in Python, this is not possible. What I suggest is writing a code that uses basic flight commands to fly through each hoop. After each hoop, check the gyroscope and use set_yaw() to turn left or right if you need to correct.

        1 Reply Last reply Reply Quote 0
        • G
          GEMSLPC last edited by

          Great!
          Would it be possible to give me an example python code of what it would look like to have the codrone check itself in space and correct it's course.
          For example if the challenge was to create a program that allows your codrone to successfully fly thru 3 hoops of various heights turn around and go back thru ( straight line) and land. How would that look in python with an emergency stop?

          The students challenge would read " Your Lieutenant has decided that your flight skills are above par. You and your flight partner have been selected to preform at the local air show. A copy of the course has been provided. Good Luck and as always personal touches are encouraged!"

          Thank-you!

          robolink_leila 1 Reply Last reply Reply Quote 0
          • robolink_leila
            robolink_leila last edited by

            Hi @GEMSLPC! The gyroscope and sensor functionality for Blockly is still under development. If you want to see how to use our sensors with Python, you can see our documentation page. There you will find the complete list of what CoDrone has on board!

            1 Reply Last reply Reply Quote 0
            • First post
              Last post