No announcement yet.

Motor Controller Programming/Configuration

  • Filter
  • Time
  • Show
Clear All
new posts

  • Motor Controller Programming/Configuration

    Hi! I need help with some basic stuff. My team has the old, black motor controllers and I was wondering if I needed to set up blocks for them? I've been reading through the forums and it sounds like some people don't. I have an app made that should run our robot, but I also don't know what to name the motor controller in the configuration. If I don't set up blocks for the motor controller, where do I find the configuration name? Thank you

  • #2
    In the configuration, you can just name it something like "MotorController" or "Wheels". It doesn't really matter.

    From what I can tell from reading the java op modes, the HiTechnic NXT DC Motor Controller and the Matrix DC Motor Controller are the ones where you might want to use the FtcDcMotorController component in App Inventor.

    For the HiTechnic NXT motor controller, you need to switch the MotorControllerDeviceMode to read_only in order to read the current motor power. After that you need to switch back to write_only mode to set power to the motors. Here's an example of blocks that switch to read_only mode every 17th loop to read the motor power.

    For the Matrix motor controller, there are two blocks that access features that are unique to the Matrix motor controller: SetMotorPowerForGroup and BatteryVoltage. Here's an example f blocks that use these two blocks.