Project 2: Adjust Led Brightness - Keyestudio Smart Little Turtle Robot V3 Manual

Table of Contents

Advertisement

www.keyestudio.com
}
//*****************************************************************
The LED flickers faster through the test result, therefore, pins and delay
time could affect flash frequency.

Project 2: Adjust LED Brightness

delay time in the code so as to demonstrate different breathing effect.
PWM is a means of controlling the analog output via digital means. Digital
control is used to generate square waves with different duty cycles (a signal
that constantly switches between high and low levels) to control the analog
output.In general, the input voltage of port are 0V and 5V. What if the 3V is
required? Or what if switch among 1V, 3V and 3.5V? We can ' t change
resistor constantly. For this situation, we need to control by PWM.
(1) Description
In previous lesson, we control LED
on and off and make it blink.
In this project, we will control LED
brightness
through
simulate breathing effect. Similarly,
you can change the step length and
PWM
to
67

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents