SunFounder Thales Kit for Raspberry Pi Pico, Release 1.0
The centered potentiometer is used to adjust the sensing distance range of the PIR.
Turn the knob of the distance adjustment potentiometer
clockwise
to increase the sensing distance
range, and the maximum sensing distance range is about 0-7 meters. If it rotates
counterclockwise
,
the sensing distance range is reduced, and the minimum sensing distance range is about 0-3 meters.
3.4.8 Fading LED
So far, we have used only two output signals: high level and low level (or called 1 & 0, ON & OFF), which is called
digital output. However, in actual use, many devices do not simply ON/OFF to work, for example, adjusting the speed
of the motor, adjusting the brightness of the desk lamp, and so on. In the past, a slider that can adjust the resistance
was used to achieve this goal, but this is always unreliable and inefficient. Therefore, Pulse width modulation (PWM)
has emerged as a feasible solution to such complex problems.
A digital output composed of a high level and a low level is called a pulse. The pulse width of these pins can be
adjusted by changing the ON/OFF speed.
Simply put, when we are in a short period (such as 20ms, most people’s visual retention time), Let the LED turn on,
turn off, and turn on again, we won’t see it has been turned off, but the brightness of the light will be slightly weaker.
During this period, the more time the LED is turned on, the higher the brightness of the LED. In other words, in the
cycle, the wider the pulse, the greater the “electric signal strength” output by the microcontroller. This is how PWM
controls LED brightness (or motor speed).
•
Pulse-width modulation - Wikipedia
There are some points to pay attention to when Pico uses PWM. Let’s take a look at this picture.
76
Chapter 3. For MicroPython User
Summary of Contents for Thales Kit
Page 1: ...SunFounder Thales Kit for Raspberry Pi Pico Release 1 0 Jimmy SunFounder Jun 04 2021 ...
Page 2: ......
Page 4: ...ii ...
Page 6: ...SunFounder Thales Kit for Raspberry Pi Pico Release 1 0 2 CONTENTS ...
Page 140: ...SunFounder Thales Kit for Raspberry Pi Pico Release 1 0 136 Chapter 3 For MicroPython User ...
Page 164: ...SunFounder Thales Kit for Raspberry Pi Pico Release 1 0 160 Chapter 4 For Arduino User ...