Announcement

Collapse
No announcement yet.

App Inventor Easy To Follow Autonomous Guide - Pictures!

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • App Inventor Easy To Follow Autonomous Guide - Pictures!

    Hey all!

    We noticed the large demand for a guide to making an autonomous code in App Inventor and, after having gone to a competition today without an autonomous, solved all our issues and made a step by step guide to Autonomous Programming in App Inventor.

    Step One - Setup
    Step 2 - FirstBlocks
    Step 3 - How to Define Procedures
    Step 4 - Finish Defining First Procedures
    Step 5 - Stop Procedure
    Step 6 - Continuous Rotational Servo
    Step 7 - Timing is Key
    Step 8 - Put it together - Part 1, Part 2
    Example of something useful - Ramp code

    Thanks to everyone on the forum, ya'lls posts have been more than helpful many times over, hope this can repay what we owe to this community.
    Regards,
    7621

  • #2
    Nice work!

    GHS Robotics

    Comment


    • #3
      Thanks. That was a good help.
      Thanks,
      Programmer - FTC Delta Kappa

      Comment


      • #4
        Great work FTC-Team7621!

        I noticed that you set power to a negative number for the upside-down motor. An alternative is to set the upside-down motor's Direction to Direction_REVERSE.

        Comment


        • #5
          Originally posted by Comrade 17 View Post
          Great work FTC-Team7621!

          I noticed that you set power to a negative number for the upside-down motor. An alternative is to set the upside-down motor's Direction to Direction_REVERSE.
          Yes, I considered such but I feel like it added a lot of extra block dragging to put in. To be honest, I don't even use the -1 value. Our team merely wires it in the reverse (We are using the old motor controllers) and then forward is just 1 on both.

          Question, I want to add more about how to work with a sensor input but... I don't actually know how.

          http://s22.postimg.org/7l4hb5edd/Does_This_Work.png
          Would this code work? My goal is to have the robot go backwards until the ultrasonic sensor reports less than "5" as its value. I haven't tested it yet so would this create the intended effect or do I need something more/less

          Comment


          • #6
            Originally posted by FTC-Team7621 View Post
            Yes, I considered such but I feel like it added a lot of extra block dragging to put in. To be honest, I don't even use the -1 value. Our team merely wires it in the reverse (We are using the old motor controllers) and then forward is just 1 on both.

            Question, I want to add more about how to work with a sensor input but... I don't actually know how.

            http://s22.postimg.org/7l4hb5edd/Does_This_Work.png
            Would this code work? My goal is to have the robot go backwards until the ultrasonic sensor reports less than "5" as its value. I haven't tested it yet so would this create the intended effect or do I need something more/less

            Instead of using the FtcUltrasonicSensor.ToString block, you should use the FtcUltrasonicSensor.UltrasonicLevel block, which returns a number. Other than that, I think your blocks would work.

            Comment


            • #7
              Thanks for this tutorial. We have used it with some success.
              Unfortunately, when we start auto, sometimes it runs our program as defined, other times it runs something not even in the program.

              For example. We have it set to simply run straight forward for 7 seconds. It will do that occasionally when we start auto. Other times one wheel turns and the other doesn't. Sometimes the turn in opposite directions, causing the robot to run in circles. Sometimes it doesn't do anything. We have not found any consistency with when it will run and when it won't.

              Any assistance?

              Comment


              • #8


                Here are our blocks.

                Comment


                • #9
                  Originally posted by FTC-Team7621 View Post
                  Yes, I considered such but I feel like it added a lot of extra block dragging to put in. To be honest, I don't even use the -1 value. Our team merely wires it in the reverse (We are using the old motor controllers) and then forward is just 1 on both.

                  Question, I want to add more about how to work with a sensor input but... I don't actually know how.

                  http://s22.postimg.org/7l4hb5edd/Does_This_Work.png
                  Would this code work? My goal is to have the robot go backwards until the ultrasonic sensor reports less than "5" as its value. I haven't tested it yet so would this create the intended effect or do I need something more/less
                  Hi Folks,

                  Just a heads up, if you are planning to use encoders with your motors, it's better to not reverse the polarity of the input power wires. It can cause issues when you are trying to use encoder, closed loop control (motor control thinks it needs to apply a positive voltage, but the polarity of the input voltage to the motors is reversed...).

                  Tom

                  Comment


                  • #10
                    Originally posted by Tom Eng View Post
                    Hi Folks,

                    Just a heads up, if you are planning to use encoders with your motors, it's better to not reverse the polarity of the input power wires. It can cause issues when you are trying to use encoder, closed loop control (motor control thinks it needs to apply a positive voltage, but the polarity of the input voltage to the motors is reversed...).

                    Tom
                    Another heads up, normally ultrasonic sensors read in a range of 1-5. But when you use the .UltrasonicLevel block, it will actually return a number ranging between 0-255. That is what i have found in my testing, and that is what has worked.
                    FTC 8567 -Lead Programmer, 3-D Print Specialist, Lead CAD Designer

                    Comment

                    Working...
                    X