Analog Output – LED Brightness Control

Analog Output - Controlling LED Brightness Level
Lesson Details
How to control the brightness of an LED in PictoBlox using analog output?


  • Creating a script to control an LED's brightness using the variable slider.
Classroom Bundle Used: STEM Classroom Bundle, STEM Mini Classroom Bundle
Download Resources

Lesson Overview

Students will learn the following things:

  • How to generate analog voltage output on digital pins using pulse width modulation (PWM).
  • Analog output block in PictoBlox.
  • Activity: Controlling the brightness of a LED.

Material Required

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

Component Image Quantity Available in Bundle
evive 1
USB A-B Cable 1

Lesson Outline

Analog Output - 25 minutes
  • What is the analog voltage output?
  • What pins in evive generate PWM.
  • Relationship between the voltage output and the duty cycle or input value.
  • Example of PWM for the following duty cycle:
    • 0%
    • 25%
    • 50%
    • 75%
    • 100%
Blocks in PictoBlox - 5 minutes

Define and show the use of set PWM pin () output as () block for analog output.

Activity - 25 minutes

Making a LED brightness control using the variable slider.

Download Lesson Resources

Next Lessons