Introduction
After the quick start of QuecPython, this document introduces how to print “Hello World” with QuecPython.
Print “Hello World”
Connect the EVB to PC. It is necessary to install driver and download module firmware. See Chapter Development Environment Building and Development Process for the operation methods.
Print in Interactive Interface
As shown in the figure below, the port is connected to the “Interactive Port of QuecPython” with QPYcom. Then select Interactive interface. After that, following printing is carried out.
>>> print('hello world')
hello world
>>> print("hello world")
hello world
Compile helloworld.py
file and Print
- Create
helloworld.py
file and the compilation script is described below:
import utime # Importing a Timing Module
print_num = 5 # Define the number of prints
while print_num:
print("hello world")
print_num -= 1 # Decrement
utime.sleep(2) # Delay in 2 seconds
- Download the code to module.
- Select the file and run it.
- Running result.