pastergaming.blogg.se

Robotc commands
Robotc commands








robotc commands
  1. ROBOTC COMMANDS HOW TO
  2. ROBOTC COMMANDS CODE

#define MediumMoveAdjust 0 // Adjust to go straight: - Left + Right #define SlowMoveAdjust 0 // Adjust to go straight: - Left + Right?

robotc commands

Positive numbers turn more right, negative numbers turn more left.*/ #define StartMoveSpeed 200 // Lowest Motor Speed value for start of motion /* The section sets up the motor speeds for slow, medium, fast The adjust numbers help make the robot run straight. * Motor speed can be in the range of 200 - 400 only */ #include // For control of the two DC Motors /*-( Declare Constants and Pin Numbers )-*/ // NOTE: Pins 9 (Motor1) and 10 (Motor2) are predefined, unchangeable

ROBOTC COMMANDS HOW TO

* YourDuino Basic Robot Kit V2 User EDitable Software Sketch How To Page that goes with this Software Sketch: WHAT IT DOES: - Runs the robot motors - Program the robot to make different moves such as Forward, SpinRight, Back etc. Try changing the timing and order of the different commands in the Editable Area of the Software Sketch. What did the Robot do? How do the commands in the Editable Area control what the robot does? Now you can copy and paste the software Sketch below into the Arduino IDE and try it out as-is on your own Robot. (defined by the original programmer - don't change this!)

ROBOTC COMMANDS CODE

  • Motor Control Area: Code which specifies what the motors will do in each of the different Commands.
  • Editable Area: C ontains the code that You can change to make a new robot control program!.
  • Setup Area: T his is code that runs only once at the beginning to set things up (defined by the original programmer - don't change this!).
  • Definition Area: This is where the Motor Control Library, motor speeds and adjustments are defined (created by the original programmer - don't change this!).
  • There are basically 4 parts to the Software Sketch after the Title and introduction: How to use this code It's interesting to look at the format of the code in the Software Sketch below.
  • You can mix and match commands to make the Robot run in many different patterns.
  • Time is measured in milliseconds (Ms) so 1000 Ms = 1 second, 500 Ms = 1/2 second, etc.
  • BackwardSlow, BackwardMedium, BackwardFast, BackwardMax.
  • ForwardSlow, ForwardMedium, ForwardFast, ForwardMax.
  • You can change the Robot Commands in these ways:
  • Wait: Stops the robot for a certain length of time that you decide.
  • SpinLeft: Runs the left motor in reverse and the right motor in forward.
  • SpinRight: Runs the right motor in reverse and the left motor in forward.
  • TurnLeft: Makes the right motor go forward with the left motor stopped.
  • TurnRight: Makes the left motor go forward with the right motor stopped.
  • robotc commands

  • Backward: Runs both motor in a backward direction.
  • robotc commands

    Forward: Runs both motors in the forward direction.Some of the different Commands and what they do are listed below: Robot Commands and Editing Now that you have built the Robot and have it running, you can learn to edit the Commands and create a newSoftware Sketch to make the Robot follow your own commands.










    Robotc commands