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. Connect one lead of the photoresistor to the GP28 pin, then connect the same lead to the positive power bus with
a 10K ohm resistor.
3. Connect another lead of photoresistor to the negative power bus.
4. Insert the LED into the breadboard, connect its anode pin to the GP16 in series with a 220 resistor, and connect
its cathode pin to the negative power bus.
5. Insert the passive buzzer and S8050 transistor into the breadboard. The anode pin of the buzzer is connected
to the positive power bus, the cathode pin is connected to the
collector
lead of the transistor, and the
base
lead
of the transistor is connected to the GP15 pin through a 1k resistor.
emitter
lead is connected to the negative
power bus.
Note:
• The color ring of the 22 resistor is red, red, black, black and brown.
• The color ring of the 10k resistor is brown, black, black, red and brown.
Code
import
machine
import
utime
led
=
machine
.
Pin(
16
, machine
.
Pin
.
OUT)
photoresistor
=
machine
.
ADC(
28
)
buzzer
=
machine
.
PWM(machine
.
Pin(
15
))
(continues on next page)
94
Chapter 3. For MicroPython User
Содержание 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 ...