Scribbler 3 Robot Block Reference
Motors
DRIVE blocks control the Scribbler 3 Robot’s drive wheels and standard servos connected via P0-P5 on the exposed hacker port.
drive
The drive block runs the Scribbler robot motors at a direction and speed determined by the user. The Scribbler robot will continue running the motors while also running block commands until the stop driving block command is used.
rotate
The rotate block rotates the Scribbler robot in place, in either direction, to an angle and at a top speed determined by the user. The angle, from 1 to 359 degrees, can be typed in or selected from a drop-down angle selector. The Scribbler robot will not run the next block command until the Scribbler robot stops moving.
stop driving
The stop driving block immediately disables the Scribbler robot motors.
drive speed
The drive speed block sets the left and right motor speeds as percentages of the top speed. Negative values are for backward travel, positive values for forward travel. When a value is outside of the -100 to 100 percent range, the block will use the closest value, either -100 or 100 percent. If a duration is specified, in milliseconds, the Scribbler robot will not run the next block command until the Scribbler robot stops moving. If the duration is over the maximum range of 65,535 milliseconds, then the block will use a duration of 65,535 milliseconds. If the duration is either unspecified, at the default of zero, out of range, or in the negative, then the Scribbler robot will continue running block commands while running the motors, until the stop driving command is used.
drive distance
The drive distance block moves the left and right motors to each travel a distance, in units of inches, tenths of an inch, centimeters, millimeters, or encoder counts. Negative values are for backward travel, positive values for forward travel. If given different distances, then the motor traveling further will run at the specified speed, and the other will run at a slower speed so that both motors will stop at the same time. The speed is given as a percent of the maximum capable speed, in a range of 1 to 100 percent. The distance range is displayed next to the unit, and changes with the unit. If a speed or distance value is outside of the valid range, the block will use the closest valid value. The Scribbler robot will not run the next block command until the motors stop moving.
drive to
The drive to block moves the scribbler to a new XY coordinate based on the X and Y changes entered. The Scribbler robot begins keeping track of where it is in an imaginary coordinate grid (where X is left/right, and Y is forward/backward relative to its starting position) when it begins its program. As long as all the motions in the program are drive distance or drive to blocks and there are no arcs or curves, the Scribbler robot will be able to accurately position and orient itself on the imaginary grid. The X and Y axes of the imaginary grid are established at the beginning of the program. The movement amounts entered into the block refer to how far the robot should move, not what coordinates to move to.
When the drive to block is used, the Scribbler will first pivot (turn) and point itself in the direction it should move, and then it will move to the new coordiate. The total distance that it travels is:
drive a turn
The drive a turn block rotates the Scribbler robot around a point, with a radius that is a specified distance to the side of the center of the robot, in units of inches, tenths of an inch, centimeters, millimeters, or encoder counts. The radius can be 0, to rotate in place, or it can be positive, to rotate around a point to the right of the Scribbler robot, or negative, to rotate around a point to the left of the Scribbler robot.
The angle to rotate can be negative, to drive in reverse, or positive, to drive forward. If the radius is zero, the Scribbler robot will spin clockwise with a positive angle and counterclockwise with a negative angle. The angle value is valid from -1,080 to 1,080, while the radius value range is displayed next to the unit, and changes with the unit. If a speed or distance value is outside of the valid range, then the block will use the closest valid value. The Scribbler robot will not run the next block command until the motors stop moving.