Announcement

Collapse
No announcement yet.

HELP --- Motor Power Code not working --- MIT App Inventor

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

  • Tom Eng
    replied
    I've moved this thread to the App Inventor subforum.

    Leave a comment:


  • Tom Eng
    replied
    Hi FTC7785,

    I agree with GearTicks. I think you want to use the enumerated "Direction_REVERSE" value that is available with the DcMotor object in App Inventor. Please take a look at the following screen shot for an example of how to reverse the direction of a DC motor.

    https://drive.google.com/open?id=0B_...ldrRFM3MFRJSFk

    Tom

    Leave a comment:


  • GearTicks
    replied
    You can't assign a string to a direction. You should use Direction_REVERSE instead. Also, in your code, depending on which bumpers are pressed, it is possible that you will assign the motor "spinner" a power two or three times in the loop. I think you want something like:
    Code:
    if FtcGamepad1.RightBumper
      then set spinner.Power to 1
    else if FtcGamepad1.LeftBumper
      then set spinner.Power to -1
    else
      set spinner.Power to 0

    Leave a comment:


  • Guest's Avatar
    Guest started a topic HELP --- Motor Power Code not working --- MIT App Inventor

    HELP --- Motor Power Code not working --- MIT App Inventor

    We are having issues with our blocks for using a bumper to move a motor forward and backward. Here is a picture of our blocks https://goo.gl/X0VhYa If anyone has any ideas, they would be greatly appreciated. We are having to use one controller for this weekend due to many members taking the SAT.

    Thanks
Working...
X