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 Advance Line Following - Blocks, Python Functions, Projects | PictoBlox Extension
[PictoBloxExtension]

Quarky Advance Line Following

QRK Line Following
Extension Description

Introduction

The extension helps you to speed up your quarky in the line following using blocks and Python functions.

Read More

PictoBlox Blocks

Controls the camera functionality, allowing users to turn the camera on or off and switch to other camera.
Starts the script whenever you press a specified button of the wizbot.
Calibrates wizbot sensors, ensuring accurate readings for line following
Switches the state of the wizbot to Grid mode.
The block takes the motor port, the direction of rotation (forward or reverse) and speed of rotation (between 0 to 100 %) as input from the user and rotates the motor accordingly.
evive has two tactile switches; this block checks if either of them is pressed. The switch whose state you want to check can be chosen from the drop-down menu on this block. It returns “true” if the switch is pressed and “false” if the switch is not pressed.
The block compares the latest string message in the terminal with the data input by the user in the block. If the data matches, it returns the true, else it returns false. 
The block reports either the temperature or humidity (selected from the dropdown menu) from DHT sensor connected to the digital pin selected from the drop-down menu.
The block is used to draw characters and symbols on evive TFT Display. The matrix size for the block is 20 horizontally and 16 vertically. 
This block defines the PWM pins to which each of the servos is connected.
This block defines the PWM pins to which all the four servos of legs(2 servos of legs + 2 servos of feet) are connected.
The blocks turn their sprite the specified amount of degrees clockwise. This changes the direction the sprite is facing.
The block gives its sprite a speech bubble with the specified text — the speech bubble stays until another speech or thought block is activated, or the stop sign is pressed.
The block will play the specified sound, with no pause to its script.
Blocks held inside this block will loop a given amount of times, before allowing the script to continue. If a decimal is put in, the number is rounded up.
Scripts placed underneath this block will activate when the specified key is pressed.
The block checks whether its sprite is touching a specified color. If it is, the block returns “true”.
The block checks if the first value is equal to the other value. If the values are equal, the block returns true; if not, false. This block is not case-sensitive.
The block will change the specified variable by a given amount.
The block enables or disables the automatic display of the box on the human pose or hand detection on the stage. This is useful when you want to see if the detection is happening or not.
The recognize () in image after () seconds block starts the camera and takes an image after the specified time and analyzes it. It then saves the image features in PictoBlox.
The function enables or disables the automatic display of the box on face detection on the stage.
This block is used to analyze the image received as input from the camera, for the handwritten and printed text.
When the block is executed, the recognition window will open and you will get a specified time during which PictoBlox will record whatever you say. Once recorded, the speech will be converted to the text of the language you spoke in and saved locally.
The block opens the recognition window and shows the machine learning analysis on the camera feed. Very good for visualization of the model in PictoBlox.
The block trains the NLP model with the data added with add () as () block.
The block enables or disables the automatic display of the box on object detection on the stage. This is useful when you want to see if the object detection happens during the analysis or not.
The block causes the text in the Text to Speech extension to be spoken using the pronunciation of the given language but does not translate the text.
The block returns the PictoBlox language of the current user. This block can be used with the translate () to () block, to translate to or from the end user’s set language.
All articles loaded
No more articles to load

Block Coding Examples

All articles loaded
No more articles to load

Python Functions

The function changes its sprite’s size by the specified amount. The default sprite size is 100; size values below that percentage are for shrunken sprites, and size values above it are for overlarge sprites.
Syntax: changesize(percentage = 10)
The function changes the volume of a sprite by the specified amount.
Syntax: changevolume(volume = -10)
The function reports the mouse pointer’s current y position on the stage.
Syntax: mousey()
The function sets the Pen Size to the given number. The pen draws a trail of circles. The diameter of the circle, in pixels, is equal to the pen size.
Syntax: setsize(size = 1)
The function sets the RGB LED display matrix to display the specified pattern: “rainbow”, “rainbow strip”, “cloud colors”, “party colors”, “forest colors”, and “lava colors”.
Syntax: showpattern(pattern = “rainbow”)
The function returns the distance reading from the specified ultrasonic sensor.
Syntax: getdistance(sensor_number = 1)
The function sets the specified motor of the Quarky robot to the specified direction (“FORWARD” or “BACKWARD”) and specified speed.
Syntax: runmotor(motor = “L”, direction = “FORWARD”, speed = 100)
The function reports the number of specified features to count in the image. The options are celebrities, brands, objects, and image tags in a single image can be reported.
Syntax: imagefeaturecount(feature_type = “object”)
The function reports the handwritten text identified from the analysis.
Syntax: handwrittentextresult()
The function sets the Quarky Gripper Robot’s gripper servo motor angle for a close position to the specified value.
Syntax: setcloseangle(angle = 90)
Keras models can be used to detect trends and make predictions, using the model.predict() function.
Syntax: model.predict(image_array)
The function reports the analog reading of the LDR (Light) sensor connected to the selected pin. The value will vary between 0 to 4095.
Syntax: ldrvalue(pin = “A1”)
The function gets the last color value from the specified feed and stores it in PictoBlox or Quarky.
Syntax: adaio.getcolordata(feedname = “feed name”)
The function sets the servo motors of the head to the specified angle.
Syntax: setheadangle(Angle = 90)
The function sets the servo motors of the humanoid hand to the specified angles at the specified speed.
Syntax: movehand(time = 1000, servo angles = [90,90])
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 reverses the forward direction of the specified motor of the Quarky Expansion Board.
Syntax: reversemotordirection(motor port = 1)
The function is used to calculate the inverse hyperbolic tangent of a given value.
Syntax: math.atanh(x)
This function creates a 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. The function calculates the points on the trajectory and sends instructions to the arm to travel to each point sequentially.
Syntax: roboticArm.moveincircleclockwise(XPOS = 0, ZPOS = 80, RADIUS = 50, YPOS = 180, TIME = 4000)
This function sets the three pins for IR sensors used in line following for left, middle, and right detection.
Syntax: setirsensor(set_left = ‘D1’, set_middle = ‘D2’, set_right = ‘D3’)
This function is used to get the expression of the analyzed face. The parameter can be used to select the identifying number of the face whose expression is to be analyzed.
Syntax: expression(face = 1)
The function sets its sprite’s size to the specified amount. The default sprite size is 100%; anything lower than that will decrease the size of the sprite on the stage, and anything above will increase the size of the sprite on the stage.
Syntax: setsize(percentage = 100)
The function sets its sprite’s volume to the specified amount. It only affects the sprite (or the Stage) that the block is in.
Syntax: setvolumeto(volume = 100)
The function changes the pen size by the specified amount.
Syntax: changesize(size = 1)
The function sets the brightness of the RGB LED display matrix.
Syntax: setbrightness(brightness = 20)
The function returns the state of the digital sensor connected to the specified pin of the Quarky.
Syntax: readdigitalsensor(digital_pin = “D1”)
The function stops the specified motor of the Quarky.
Syntax: stopmotor(motor = “L”)
The function reports the name/x position/y position/width/height or confidence of the recognized celebrity/brand/object/image tag. If the number is out of range, then the function will return NULL.
Syntax: imagefeatureinfo(feature_type = “object”, number = 1, information = “name”)
The function reports the printed text identified from the analysis.
Syntax: printedtextresult()
The function sets the Quarky Gripper Robot’s gripper servo motor angle for an open position to the specified value.
Syntax: setopenangle(angle = 90)
All articles loaded
No more articles to load
Table of Contents