
SunFounder Thales Kit for Raspberry Pi Pico, Release 1.0
3.4 Projects
3.4.1 Hello, LED!
Just as printing “Hello, world!” is the first step in learning programming, letting the LED light up is the traditional
entry to learning physical programming.
There is a small LED on the top of the Pico. Like other LEDs, it will glow when power is on and go out when power
is off.
Code
Let’s copy this code into Thonny and click “Run Current Script” or simply press F5 to run it to make the LED blink!
Don’t forget to left click on the bottom right corner and switch the python version name to MicroPython (Raspberry
Pi Pico).
import
machine
import
utime
led_onboard
=
machine
.
Pin(
25
, machine
.
Pin
.
OUT)
while
True
:
led_onboard
.
value(
1
)
utime
.
sleep(
2
)
led_onboard
.
value(
0
)
utime
.
sleep(
2
)
3.4. Projects
49
Содержание 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 ...