Deprecated: Required parameter $query follows optional parameter $post in /var/www/html/wp-content/plugins/elementor-extras/modules/breadcrumbs/widgets/breadcrumbs.php on line 1215
Quarky Ultimate Robots - Blocks, Python Functions, Projects | PictoBlox Extension
[PictoBloxExtension]

Quarky Ultimate Robots

Pictoblox Extension Graphics- Ultimate Kit-05
Extension Description
Controls the various configurations of the Quarky robots.

Introduction

Python Functions

The function is used to draw a text string on any image.
Syntax: cv2.putText(image, text, org, font, fontScale = 2, color = (255, 0, 0), thickness, lineType = cv2.LINE_AA)
The block sets the oscillator parameters for the selected servo motor.
Syntax: setoscillationparameters(servo motor number = 1, amplitude = 30, offset = 90, time period = 1000, phase difference = 0)
The function sets the threshold for the LDR (Light) sensor connected to the selected pin. Threshold helps users decide whether the sensor is active or not. If the sensor value is greater than the threshold value, the sensor is active, or else it is inactive.
Syntax: setldrthreshold(threshold_value = 1500)
The function returns the red, green, or blue value of the color saved from the last data request.
Syntax: adaio.getRGB(color = “red”)
The function sets the servo motors of the humanoid hip, foot and hand to the specified angles at the specified speed.
Syntax: moveall(time = 1000, servo angles = [90,90,90,90,90,90])
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 is used to return the ceiling value of a number, which means it is used to round a number up to the nearest integer that is greater than the number itself.
Syntax: math.ceil(x)
This function creates a anti-clockwise circle trajectory in the Y plane for a robotic arm, given the center position in the X and Z axes, and the radius of the circle.
Syntax: roboticArm.moveincircleanticlockcise(XPOS = 0, ZPOS = 80, RADIUS = 50, YPOS = 180, TIME = 4000)
This function’s parameters match the Quarky board’s regular line following settings, defining motor speeds: F for forward on white, and T1 and T2 for gentle turning along the black line.
Syntax: setlinefollowerparameter(F = 35, T1 = 40, T2 = 10)
This function is used to check whether the expression of the face number specified in the argument is equal to the specified expression. Like is the face 1 happy?
Syntax: isexpression(face = 1, expression = “happy”)
The function changes the specified effect on its sprite by the specified amount. There are seven different effects to choose from: colour, fisheye, whirl, pixelate, mosaic, brightness, and ghost.
Syntax: changeeffect(effect_name = “COLOR”, effect_value = 25)
The function holds a sprite’s or the Stage’s volume. This block can be displayed as a Stage monitor.
Syntax: setvolume()
The function reports how loud the noise that a microphone receives, on a scale of 0 to 100.
Syntax: loudness()
The function sets the RGB LED display matrix to display the specified character.
Syntax: showtext(character = “A”, color = [0, 0 , 0])
The function returns the analog reading of the sensor connected to the specified analog pin of the Quarky. The value varies between 0 to 4095.
Syntax: readanalogsensor(analog_pin = “A1”)
The function sets the servo motor connected to the specified servo pin to the specified angle.
Syntax: moveservo(servo_pin = “Servo 1”, angle = 90)
The function reports the landmark identified in the image on analysis.
Syntax: landmark()
The function sets the current Quarky Gripper Robot’s gripper servo motor angle to the specified value.
Syntax: setgripperangle(angle = 90)
The function resets the oscillator parameter for all the servo motors.
Syntax: resetoscillationparameters()
The function reports the state of the Gas sensor connected to the selected pin. The block returns 1 when the analog reading of the sensor is greater than the threshold value set by the user. Else it reports 0.
Syntax: gassensorstatus(pin = “A1”)
The function sets the selected servo motor angle to the specified angle in the specified time. This creates a smooth motion for the servo motor from the current angle to the specified angle.
Syntax: movelimb(servo name = “RHip”, angle = 90, time = 1000)
The function sets the angles of the place action of the pick and place robot to a specified value.
Syntax: setplaceangle(angle = 90)
This function is used to control an end–effector of the robotic arm to move in an arc.
Syntax: roboticArm.moveinarc(XPOS = 0, ZPOS = 80, RADIUS = 50, START = 90, END = 270, YPOS = 180, TIME = 4000)
This function enables the robot to follow a line continuously until it detects a checkpoint (both IR sensors on black); it stops only at the checkpoint or with a reset.
Syntax: dolinefollowinguntilcheckpointdetect(next_checkpoint = 1)
This function returns the x position of the face detected. You can specify the face for which the value is needed. The position is mapped with the stage coordinates.
Syntax: x(face = 1)
The function points its sprite in the specified direction; this rotates the sprite.
Syntax: setdirection(angle = 15)
The function sets the specified effect on its sprite to the specified amount. There are seven different effects to choose from: color, fisheye, whirl, pixelate, mosaic, brightness, and ghost.
Syntax: seteffect(effect_name = “COLOR”, effect_value = 25)
The function reports the time lapsed since the PictoBlox is launched and increases gradually; every second it will have increased by 1.
Syntax: timer()
The function runs the specified text message on the RGB LED of Quarky. You can also set the speed and the color of the text.
Syntax: showscrollingtext(message = “Hi I am Quarky”, speed = 1, color = [0, 0 , 0])
The function reports the image description identified in the image on analysis – a Human-readable sentence that describes the contents of the image.
Syntax: imagedescription()
All articles loaded
No more articles to load
Table of Contents