Please enable JavaScript to use CodeHS

Introduction to Physical Computing with Arduino

Lesson 2.2 If/Else Statements

Description

In this lesson, students will learn how buttons can be used to allow for additional user input in their programs. They will learn to use conditionals to control components, along with the digitalRead command.


Objective

Students will be able to:

  • Use conditionals to control the flow of their programs
  • Control components by using buttons and the digitalRead command in Arduino programs