SunFounder Thales Kit for Raspberry Pi Pico, Release 1.0
Code
The method of controlling the extended LED is the same as the method of controlling the on-board LED, the only
difference is that the operating pin is changed to 15.
import
machine
import
utime
led
=
machine
.
Pin(
15
, machine
.
Pin
.
OUT)
while
True
:
led
.
toggle()
utime
.
sleep(
1
)
toggle()
can switch the pin between high level and low level, and you can see the LED blinking.
Also see reference here:
•
3.4.3 Reading Button Value
From the name of GPIO (General-purpose input/output), we can see that these pins have both input and output func-
tions. In the previous two lessons, we used the output function, in this chapter we will use the input function to input
read the button value.
54
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 ...