Controlling a Servo Motor using PictoBlox

Angry Bird: Control Servo using Ultrasonic Sensor
Lesson Details
How to control the angle of a servo motor in PictoBlox?


  • Making a smart intrusion detection system that detects intrusion with the help of an ultrasonic sensor and prevents someone from stealing the egg by controlling the bird's movement using a servo motor.
Classroom Bundle Used: STEM Classroom Bundle, STEM Mini Classroom Bundle
Download Resources

Lesson Overview

In this session, students will learn how to control a servo motor using PictoBlox programming by doing the following activities:

  1. Setting the servo motor to a specified angle input by the user.
  2. Controlling the servo using the Ultrasonic Sensor.

Material Required

1 set of the following material per group of 3-5 students:

Lesson Outline

How to control servo motor using PictoBlox? - 10 minutes
  • What is a servo motor?
  • How to control the servo position using pulse width modulation?
  • How to control the servo motor using a set servo on () to () angle block in PictoBlox?
Activity 1 - 10 minutes
  • Make a program that set the servo motor to a specified angle input by the user.
Activity 2 - 40 minutes
  • In this activity, we will control the servo motor angle depending on whether the ultrasonic sensor detects the object.

Download Lesson Resources

Next Lessons