Quarky Expansion Board
Extension Description
Controls the various input and outputs of the Quarky Expansion Board.
- 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: quarkyexpansion = Expansion()
- 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 function initializes the Expansion Board of Quarky for use. Without initialization, the board will not respond to any other functions.
Syntax: initexpansion()
The function sets the servo motor connected to the specified servo pin of the Quarky Expansion board to the specified angle. The expansion board can control up to 8 servos simultaneously.
Syntax: moveservo(servo port = 1, angle = 40)
The function moves all the servo motors connected to the Quarky Expansion board servo ports 1 through 8.
Syntax: moveall(angle 1 = 90, angle 2 = 90, angle 3 = 90, angle 4 = 90, angle 5 = 90, angle 6 = 90, angle 7 = 90, angle 8 = 90, time = 1000)
The function sets the analog state of the specified pin to the specified value between 0 to 255.
Syntax: setanalogoutput(servo port = 1, PWM = 50)
The function sets the specified motor of the Quarky Expansion board to the specified direction (“FORWARD” or “BACKWARD”) and specified speed.
Syntax: runmotor(motor port = 1, direction = “FORWARD”, speed = 100)
The function stops the specified motor of the Quarky Expansion Board.
Syntax: stopmotor(motor port = 1)
The function reverses the forward direction of the specified motor of the Quarky Expansion Board.
Syntax: reversemotordirection(motor port = 1)
All articles loaded
No more articles to load
Python Coding Examples
All articles loaded
No more articles to load
Table of Contents