Please enable JavaScript to use CodeHS

Introduction to Physical Computing with Arduino

Lesson 2.1 Loops

Description

In this lesson, students will connect and control a servo motor using their Arduino device. They will learn to use for and while loops to control components, along with the write command from the Servo library.


Objective

Students will be able to:

  • Use for and while loops to control the flow of their programs
  • Control a servo motor by using the Servo library and the write command in Arduino programs
  • Understand why and how libraries are used in Arduino programs