SunFounder Thales Kit for Raspberry Pi Pico, Release 1.0
Note:
You can save your code under any name, but it’s best to describe what kind of code it is, and don’t name it with
meaningless names such as
abc.py
. It is important to note that if you save the code file name as
main.py
, it will
run automatically when the power is turned on.
When your program is saved, it will run automatically and you will see 2 lines of information in the Shell area.
>>> %Run -c $EDITOR_CONTENT
Hello, World!
The first of these lines is an instruction from Thonny telling the MicroPython interpreter on your Pico to run the
contents of the script area – the ‘EDITOR_CONTENT’. The second is the output of the program – the message you
told MicroPython to print.
In Script mode, it is very easy for you to open the previously saved code again, but the code entered in Interactive
Mode will not be saved and can only be re-entered.
Click the open icon in the Thonny toolbar, just like when you save the program, you will be asked whether you want
to save it to
This Computer
or
Raspberry Pi Pico
, for example, click
Raspberry Pi Pico
and you will see a list of
all programs you save to your Pico.
Find hello_world.py in the list, if your Pico is new, it will be the only file there, and click it to select it, then click OK.
Your program will be loaded into Thonny, ready to edit or run it again for you.
48
Chapter 3. For MicroPython User
Summary of Contents for Thales Kit
Page 1: ...SunFounder Thales Kit for Raspberry Pi Pico Release 1 0 Jimmy SunFounder Jun 04 2021 ...
Page 2: ......
Page 4: ...ii ...
Page 6: ...SunFounder Thales Kit for Raspberry Pi Pico Release 1 0 2 CONTENTS ...
Page 140: ...SunFounder Thales Kit for Raspberry Pi Pico Release 1 0 136 Chapter 3 For MicroPython User ...
Page 164: ...SunFounder Thales Kit for Raspberry Pi Pico Release 1 0 160 Chapter 4 For Arduino User ...