Please enable JavaScript to use CodeHS

Intro to Programming in JavaScript with Arduino

Program Control with Arduino

Students learn how to apply control structures, such as if/else statements and loops to create programs that will react to the outside world. They build programs that use sensors to detect temperature, light, and distance and make decisions based on the information collected.

Lessons

10.1 Loops

  • Loops
  • Loops
  • Pulsing LED with Loops
  • Light LED Based on Potentiometer
  • LED Blink
  • +5 more

10.2 If/Else Statements

  • If/Else Statements
  • If/Else Statements
  • LED Brightness with Potentiometer
  • Stoplight LEDs
  • LED Brightness using Buttons
  • +4 more

10.3 Arithmetic, Comparison, and Logical Operators

  • Arithmetic, Comparison, and Logical Operators
  • Arithmetic, Comparison, and Logical Operators
  • Potentiometer with AND
  • Potentiometer with OR
  • Potentiometer Controlling LED
  • +4 more

10.4 Functions

  • Functions
  • Functions
  • Using Functions
  • Using Functions with Parameters
  • Distance LEDs
  • +4 more

10.5 Using Motors

  • Exploration: Controlling Motors
  • Exploration 2.5 Follow-up
  • Motors Example
  • Driverless Car
  • Car Simulation
  • +1 more

10.6 Program Control with Arduino Quiz

  • Program Control with Arduino Quiz

Courses that include this module