MicroPython is based on ANSIC, and its syntax is basically the same as Python3. It has an independent parser, compiler, virtual machine and class library. Currently it supports 32-bit based ARM processors, such as STM32F401, STM32F405, and STM32F407.
MicroPython is Python that can run on a microcontroller. That is to say, you can develop microcontroller programs through the Python scripting language. It is open source under the MIT license, and authorized persons have the rights to copy, modify, distribute and sublicense. Designed by George Damien, a theoretical physicist at the University of Cambridge. Similar to Arduino, but MicroPython is more powerful. Its syntax is basically the same as Python3, and it has its own parser, compiler, virtual machine and class library. Currently it supports 32-bit based ARM processors, such as STM32F405, STM32f407, etc., which means that the ARM processor STM32F405 can directly run the Python language and use the Python language to control the microcontroller.
Micropython Development Board
Micropython has attracted the attention of many people from the moment it was born, and corresponding development boards have also come into being.
pyboard official version
Currently, there are many supported development boards, such as the official pyboard, which already has two versions: pybv10 and pybv11. This version is also called the initial version of micropython, using stm32f405 as the mcu, 1024KiB flash ROM and 192KiB RAM, with a TF card slot. The official website is www.micropython.org.
tpyboard domestic version
Tpyboard is almost the earliest dedicated development board that supports micropython in China. The official website is www.tpyboard.com. It is understood that there are basic version V0X, wifi version V202, lan version V201 and GPRS and GPS version V70X. At the same time, the website also released relatively complete Chinese documentation for tpyboard and micropython (http://docs.tpyboard.com/zh/latest/)
openmv
With the development of micropython, some special development boards have appeared, such as openmv, a development board with a camera that supports micropython. This development board uses the STM32f7 series of MCUs, which has stronger image processing capabilities. You can use a few python codes A controllable camera can be completed.
lopy
lopy is a development board based on micropyhton that supports three wireless modes: LoRa, WiFi and Bluetooth. It can be used for micro wireless gateways, alarms, and robot control. Etc., supports arduino IDE, Pymakr IDE (can't find what software it is), and supports Microsoft Azure cloud services.
What micropython can do
Since micropython uses Python language to control the microcontroller, what the microcontroller can do can basically reflect what it can do.
Let’s take a look at what the microcontroller can do?
Currently, microcontrollers have penetrated into every field of our lives. It is almost difficult to find any field without traces of microcontrollers. Missile navigation devices, control of various instruments on aircraft, computer network communication and data transmission, real-time control and data processing of industrial automation processes, widely used smart IC cards, security systems for civilian luxury cars, video recorders, The control of cameras, fully automatic washing machines, program-controlled toys, electronic pets, etc. are all inseparable from microcontrollers. Not to mention robots, smart instruments, medical equipment and various smart machines in the field of automatic control. Therefore, the learning, development and application of microcontrollers will create a group of scientists and engineers in computer applications and intelligent control.
MCUs are widely used in the fields of instrumentation, household appliances, medical equipment, aerospace, intelligent management and process control of special equipment, and can be roughly divided into the following categories:
INTELLIGENT INSTRUMENTS
MCU has the advantages of small size, low power consumption, strong control function, flexible expansion, miniaturization and ease of use. It is widely used in instruments and meters. Different types of sensors can measure physical quantities such as voltage, current, power, frequency, humidity, temperature, flow, speed, thickness, angle, length, hardness, elements, pressure, etc. The use of microcontroller control makes instruments digital, intelligent, and miniaturized, and its functions are more powerful than those using electronic or digital circuits.
For example, precision measuring equipment (voltmeter, power meter, oscilloscope, various analyzers).
Industrial Control
The single-chip microcomputer has the advantages of small size, strong control function, low power consumption, strong environmental adaptability, flexible expansion and easy use. It can be constructed with a single-chip microcomputer. Various forms of control systems, data acquisition systems, communication systems, signal detection systems, wireless sensing systems, measurement and control systems, robots and other application control systems. For example, intelligent management of factory assembly lines, intelligent elevator control, various alarm systems, and computer networking to form a secondary control system, etc.
household appliances
Nowadays, household appliances are widely controlled by single-chip microcomputer, from rice cookers, washing machines, refrigerators, air conditioners, color TVs, other audio and video equipment, to Electronic weighing equipment and white goods, etc.
Network and Communications
Modern microcontrollers generally have communication interfaces, which can easily communicate with computers, providing excellent material conditions for applications in computer networks and communication equipment. Today’s communication equipment basically realizes the intelligence of microcontrollers. Control, from mobile phones, telephones, small program-controlled switches, building automatic communication calling systems, train wireless communications, to mobile phones, trunked mobile communications, radio walkie-talkies, etc. that can be seen everywhere in daily work.
Medical equipment field
MCUs are also widely used in medical equipment, such as medical ventilators, various analyzers, monitors, ultrasonic diagnostic equipment and hospital beds Calling system and so on.
Modular system
Some special-purpose microcontrollers are designed to implement specific functions, allowing for modular application in various circuits without requiring users to understand them. internal structure. For example, a music integrated microcontroller has a seemingly simple function that is miniaturized in a pure electronic chip (different from the principle of a tape drive), which requires complex computer-like principles. For example: the music signal is stored in the memory in digital form (similar to a ROM), read out by the microcontroller, and converted into an analog music electrical signal (similar to a sound card). In large circuits, this modular application greatly reduces the size, simplifies the circuit, reduces damage and error rates, and facilitates replacement.
Automotive Electronics
MCUs are widely used in automotive electronics, such as engine controllers in cars, automotive engine intelligent electronic controllers based on CAN bus, and GPS Navigation system, ABS anti-lock braking system, braking system, tire pressure detection, etc.
In addition, microcontrollers are widely used in the fields of industry and commerce, finance, scientific research, education, electric power, communications, logistics, defense, aerospace and other fields.
The above is the detailed content of What MicroPython can do. For more information, please follow other related articles on the PHP Chinese website!