
SunFounder Thales Kit for Raspberry Pi Pico, Release 1.0
Wiring
1. Connect 3V3 and GND of Pico to the power bus of the breadboard.
2. Insert the potentiometer into the breadboard, its three pins should be in different rows.
3. Use jumper wires to connect the pins on both sides of the potentiometer to the positive and negative power bus
respectively.
4. Connect the middle pin of the potentiometer to GP28 with a jumper wire.
5. Connect the anode of the LED to the GP15 pin through a 220 resistor, and connect the cathode to the negative
power bus.
Code
When the program is running, we can see the analog value currently read by the GP28 pin in the shell. Turn the knob,
and the value will change from 0 to 65535. At the same time, the brightness of the LED will increase as the analog
value increases.
import
machine
import
utime
potentiometer
=
machine
.
ADC(
28
)
led
=
machine
.
PWM(machine
.
Pin(
15
))
led
.
freq(
1000
)
(continues on next page)
3.4. Projects
89
Содержание Thales Kit
Страница 1: ...SunFounder Thales Kit for Raspberry Pi Pico Release 1 0 Jimmy SunFounder Jun 04 2021 ...
Страница 2: ......
Страница 4: ...ii ...
Страница 6: ...SunFounder Thales Kit for Raspberry Pi Pico Release 1 0 2 CONTENTS ...
Страница 10: ...SunFounder Thales Kit for Raspberry Pi Pico Release 1 0 6 Chapter 1 Introduction to Raspberry Pi Pico ...
Страница 12: ...SunFounder Thales Kit for Raspberry Pi Pico Release 1 0 8 Chapter 2 What is Included in This Kit ...
Страница 13: ...SunFounder Thales Kit for Raspberry Pi Pico Release 1 0 2 1 Components List 2 1 Components List 9 ...
Страница 42: ...SunFounder Thales Kit for Raspberry Pi Pico Release 1 0 38 Chapter 2 What is Included in This Kit ...
Страница 140: ...SunFounder Thales Kit for Raspberry Pi Pico Release 1 0 136 Chapter 3 For MicroPython User ...
Страница 164: ...SunFounder Thales Kit for Raspberry Pi Pico Release 1 0 160 Chapter 4 For Arduino User ...