Quarky Mecanum
Extension Description
Code omnidirectional robot!
- Available in: Block Coding, Python Coding
- Mode: Stage Mode, Upload Mode
- WiFi Required: No
- Compatible Hardware in Block Coding: Quarky
- Compatible Hardware in Python: Quarky
- Object Declaration in Python: meca = Mecanum(1, 2, 7, 8)
- Extension Catergory: Quarky
Introduction
PictoBlox Blocks
All articles loaded
No more articles to load
Block Coding Examples
All articles loaded
No more articles to load
Python Functions
The Quarky Mecanum Robot Drive Motors are initialized by the function, which assigns each motor to a specific port. This allows the robot to be programmed to move the motors in the desired direction.
Syntax: Mecanum(Front Left = 1, Back Left = 2, Back Right = 7, Front Right = 8)
The function allows the robot to move in the specified direction at a given speed.
Syntax: runrobot(direction = “forward”, speed = 100)
The function causes the robot to move in a specified direction with a specified speed for a given amount of time before stopping automatically.
Syntax: runtimedrobot(direction = “forward”, speed = 100, time = 1000)
The function allows the robot to cease all activity by stopping all its motors.
Syntax: stoprobot()
The function sets the motors of a device to a specified speed. It uses a scale of -100 to 100, where -100 is the motor running in reverse at full speed, 100 is the motor running in the forward direction at full speed, and 0 is when the wheel is stopped.
Syntax: runallmotors(FL speed = 50, BL speed = 50, BR speed = 50, FR speed = 50)
The function controls the speed of a selected motor, allowing it to run at a specified speed.
Syntax: runmotor(motor = “fl”, speed = 100)
The function sets the ports for the left and right servo motors of a pick-and-place robot.
Syntax: initialisepickplace(left servo = 5, right servo = 4)
The function sets the angles of the pick action of the pick and place robot to a specified value.
Syntax: setpickangle(angle = 40)
The function sets the angles of the place action of the pick and place robot to a specified value.
Syntax: setplaceangle(angle = 90)
The function takes the desired angle values and sets the pick and place arm to those angles.
Syntax: setarmangle(angle = 90)
This function moves the servo motors of a pick and place robot to the angle specified by the user, allowing the robot to pick up an object.
Syntax: pick()
This function moves the servo motors of a pick and place robot to the angle specified by the user, allowing the robot to place down an object.
Syntax: place()
The function sets the port of the servo motor for the gripper robot in the code, making it easier to control.
Syntax: initialisegripper(servo port = 4)
The function sets the angle of a robot’s gripper servo motor to a specified value.
Syntax: setgripperangle(angle = 90)
This function sets the angle of the Gripper Robot’s gripper servo motor to a particular value when it is in the closed position.
Syntax: setcloseangle(angle = 40)
This function sets the angle of the Gripper Robot’s gripper servo motor to a particular value when it is in the open position.
Syntax: setopenangle(angle = 90)
This function allows the Gripper Robot to close its gripper.
Syntax: closearm()
This function allows the Gripper Robot to open its gripper.
Syntax: openarm()
All articles loaded
No more articles to load
Python Coding Examples
All articles loaded
No more articles to load
Table of Contents