SunFounder Thales Kit for Raspberry Pi Pico, Release 1.0
3.4.12 Turn the Knob
In the previous lessons, we have used the digital input on the Pico. For example, a button can change the pin from low
level (off) to high level (on). This is a binary working state.
However, Pico can receive another type of input signal: analog input. It can be in any state from fully closed to fully
open, and has a range of possible values. The analog input allows the microcontroller to sense the light intensity, sound
intensity, temperature, humidity, etc. of the physical world.
Usually, a microcontroller needs an additional hardware to implement analog input-the analogue-to-digital converter
(ADC). But Pico itself has a built-in ADC for us to use directly.
Pico has three GPIO pins that can use analog input, GP26, GP27, GP28. That is, analog channels 0, 1, and 2.
In addition, there is a fourth analog channel, which is connected to the built-in temperature sensor and will not be
introduced here.
In this lesson, we try to read the analog value of potentiometer.
88
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 ...