
SunFounder Thales Kit for Raspberry Pi Pico, Release 1.0
Buttons require pull-up resistors or pull-down resistors. If there is no pull-up or pull-down resistor,
the main controller may receive a ‘noisy’ signal which can trigger even when you’re not pushing the
button.
6. Connect the negative power bus of the breadboard to Pico’s GND.
Code
When the button is pressed, the current will flow from 3V3 through the button to GP14, in other words, GP14 will
read a high-level signal ‘1’; otherwise, it will read a low-level signal ‘0’.
import
machine
import
utime
button
=
machine
.
Pin(
14
, machine
.
Pin
.
IN)
while
True
:
if
button
.
value()
==
1
:
(
"You pressed the button!"
)
utime
.
sleep(
1
)
Pull-up Working Mode
Next is the wiring and code when the button in the pull-up working mode, please try it.
56
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 ...