Table of Contents

set servo () to angle ()

Description

The block sets the servo motor connected to the specified servo pin of the Quarky Expansion board to the specified angle. The expansion board can control 8 servos at a time.

Example

In this example, we will demonstrate how to control the door of the IoT House.

In this example, we will demonstrate how to control the door of the IoT House.

Circuit

Connect the servo motor to the Quarky Expansion Board servo pin 5.

Door Control

The door of the IoT House is controlled with a servo motor. You need to make the servo motor set to 0 angles before assembling the door. You can do it with the following script.

Door Control Script

The following script makes the door closed by default and opens it for 1 second when the space key is pressed.

Output

Press the space key to make the door open.

Read More
All articles loaded
No more articles to load