Raspberry Introduction to Software
MicroPython
MicroPython
Python is an interpreted general-purpose language. Since the first version of Python was designed and released by Guido van Rossum of the National Research Institute for Mathematics and Computer Science in 1991, Python has rapidly become one of the most popular languages in the world with its concise syntax, excellent code readability and hot community resources.
What is an interpreted language?
The computer cannot directly understand the high-level language we use when programming. When the computer executes the program, it needs to translate the code written in a high-level language into a machine language that it can understand in some way and then execute it. There are two ways to translate high-level language into machine language: using a compiler or using an interpreter to translate a high-level language.
Therefore, we refer to programming languages that use a compiler for translation as a compiled language, while a language that uses an interpreter for translation is known as an interpreted language.
However, the powerful Python is not omnipotent. Although Python performs well on desktop computers, large terminals and servers, it cannot be deployed on microcontrollers with limited resources and small memory. As a result, MicroPython, a Python-based interpreted language specially designed for microcontrollers, was born. MicroPython optimizes Python cleverly, and the optimized MicroPython can run perfectly in all kinds of resource-constrained microcontrollers. MicroPython also inherits various advantages of Python, such as its ease of use.
MicroPython has made strides in keeping compatibility with ordinary Python as much as possible. If you are a beginner, you will learn a lot about Python while learning MicroPython. On the other hand, if you already have some understanding of Python, you will be able to quickly get started with MicroPython while deepening your knowledge.