How do I Post to the Game Q&A Forum?

Welcome to the FTC Game Q&A Forum! If this is your first time here, please refer to the Instructions for Forum Use section before posting.

Thank you!

Posts created to sell a product or service are not permitted and will be deleted!

Page 1 of 2 12 LastLast
Results 1 to 10 of 12

Thread: Newbie in Block Programming

  1. #1
    Junior Member
    Join Date
    Aug 2015
    Location
    CID, Iowa
    Posts
    7

    Newbie in Block Programming

    I went through the tutorial and I cant figure out why my left motor is going in reverse when i use the gamepad, but the right motor is working fine. Sorry for this easy question. is there a a way I can post the picture somehow?

  2. #2
    I am not sure about Block Programming but typically your motors are mirror images of each other on your bot. Often you have to reverse one of the motors in your coding by inserting a negative value usually when you set up the robot. Usually when referring to motor power.



    See that negative right before gamepad1? My guess is you would add a negative in the set motor1 power to tgtPower line as well. Probably right before tgtPower but as I said, I don't know anything about Blocks. I was actually looking through the sub-forum to find out more about it. In Android Studio you basically build the motors in another part of the program, set the power reversed there and never worry about it again. Not sure if that's how it works in Blocks...

    Hope this helps.

    To answer your second question, I post pics by uploading them to imgur then copy the direct link address there. Back at this site you put "[img]" then the website link you copied then "[/img]" but don't use the quotation marks. Always preview your post first since you can't edit it later. (At least, I can't)

  3. #3
    Technology Expert
    Join Date
    Jan 2015
    Location
    California
    Posts
    204
    The recommended way of dealing with this is to use a Motor Direction block at the beginning of your op mode. That way you only have to do it once, not every time you get the value from the gamepad and not every time you set the power for the motor.

    Screen Shot 2017-02-05 at 3.43.09 PM.jpg

  4. #4
    Yup, that sounds like a good idea. Thanks for the clarification. I figured there was an initial place to set motor direction. I'm going to have a few sutdents test the Blocks method in the coming weeks and have them compare it to the Android Studio they are used to dealing with.

  5. #5
    Technology Expert
    Join Date
    Jan 2015
    Location
    California
    Posts
    204
    Quote Originally Posted by FTC6180 View Post
    Yup, that sounds like a good idea. Thanks for the clarification. I figured there was an initial place to set motor direction. I'm going to have a few sutdents test the Blocks method in the coming weeks and have them compare it to the Android Studio they are used to dealing with.
    I would love to hear how that goes. I know that the Blocks programming mode is aimed at teams with less programming experience, but it has some advantages beyond just the graphical interface. For example, it's easy to update an opmode while the phone is connected to the robot. No need to unplug. Also, the turn-around time from when you modify an opmode to when you can test it is just a few seconds. No need to compile/build an app and reinstall it. Another advantage is that you don't need to install Android Studio. All you need is a browser. I've used an inexpensive Chromebook and it worked fine.

  6. #6
    Here is how to reverse a motor:

  7. #7
    Junior Member
    Join Date
    Aug 2015
    Location
    CID, Iowa
    Posts
    7
    Thanks for the response. That was a big help. We were able to get the motor running the right way and now are going to try to add two more motors to our programming.

  8. #8
    Junior Member
    Join Date
    Aug 2015
    Location
    CID, Iowa
    Posts
    7
    Quote Originally Posted by FTC6180 View Post
    Here is how to reverse a motor:
    Could this also be used to start the basis for an autonomous mode program?

  9. #9
    I wouldn't think so just because you wouldn't be setting anything to the joysticks in autonomous mode. We are getting into that next week. I would recommend having it run for a certain amount of time or have it run using encoders. We are just trying this out for next year but I'll post a basic auto code next week if we get something decent up and running. Right now we haven't even figured out how to run more than 2 motors so we have a ways to go.

  10. #10
    Junior Member
    Join Date
    Aug 2015
    Location
    CID, Iowa
    Posts
    7
    this is what we were able to do this weekend. maybe this will help.
    [IMG]

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •