- Scratch Based Default Extensions
- Artificial Intelligence
- Innovative Extensions
- Machine Learning Environment
- Quarky
- Quarky Intellio I2C Communication
- Quarky Advance Sensors Extension
- Quarky Connect
- Display (Quarky)
- Quarky (Main)
- Robot (Quarky)
- Sensors (Quarky)
- Speaker (Quarky)
- Quarky Ultimate Robots
- Quarky Expansion Board
- Mars Rover
- Humanoid (Quarky)
- Quadruped (Quarky)
- IoT House (Quarky)
- Quarky Mecanum
- Quarky Robotic Arm
- Dabble
- Quarky Advance Line Following
Servo (Arduino Alvik)
Extension Description
Control external servo motors connected to Arduino Alvik, set precise angular positions, and adjust servo angles using PictoBlox blocks and Python functions.
-
Available in: Block Coding, Python Coding
-
Mode: Stage Mode, Upload Mode
-
WiFi Required: No
-
Compatible Hardware in Block Coding: Arduino Alvik
-
Compatible Hardware in Python: Arduino Alvik
-
Object Declaration in Python: alvik = ArduinoAlvik()
Introduction
The Servo (Arduino Alvik) blocks allow users to control external servo motors connected to the robot’s Servo A or Servo B expansion ports. These blocks support both direct angle positioning and relative angle adjustments.
Using these blocks, you can:
- Set a servo motor to a specified angle.
- Independently control servos connected to Servo A or Servo B.
- Increase or decrease the current servo angle.
- Develop robotic attachments with controlled mechanical movement.
These blocks are useful for building robotic arms, grippers, moving attachments, and other servo-based automation projects.

Connecting Arduino Alvik with PictoBlox
Before using the Servo (Arduino Alvik) blocks, connect your robot to PictoBlox using USB or Bluetooth.
Follow the step-by-step instructions in the Arduino Alvik Connection Guide.
Read More
PictoBlox Blocks
All articles loaded
No more articles to load
Python Functions
This function sets the selected servo motor to a specified absolute angle in degrees.
Syntax: set_servo_angle(1, 90)
This function returns the current angle setting of the selected servo motor in degrees.
Syntax: get_servo_angle( )
This function increases or decreases the selected servo motor’s angle by the specified number of degrees. Positive values increase the angle, while negative values decrease it.
Syntax: increase_servo_angle(1, 10)
This function sets the servo motors connected to Servo A and Servo B to independently specified angles using a single command.
Syntax: set_both_servo_angles(90, 90)
This function resets the selected servo motor’s angle setting to the reset value defined by the supported Python implementation.
Syntax: reset_servo_angle(1)
All articles loaded
No more articles to load
Table of Contents
