MicroPython到底是啥
1、进入MicroPython的官网主页:https://www.micropython.org/

2、有一段说明。MicroPython is a lean and efficient implementation of the霸烹钟爷Python 3programming language that includes a small subset of the Python standard library and is optimised to run on microcontrollers and in constrained environments.The MicroPythonpyboardis a compact electronic circuit board that runs MicroPython on the bare metal, giving you a low-level Python operating system that can be used to control all kinds of electronic projects.MicroPython is packed full of advanced features such as an interactive prompt, arbitrary precision integers, closures, list comprehension, generators, exception handling and more. Yet it is compact enough to fit and run within just 256k of code space and 16k of RAM.MicroPython aims to be as compatible with normal Python as possible to allow you to transfer code with ease from the desktop to a microcontroller or embedded system.接下来是找的百度百科的说明。https://baike.baidu.com/item/MicroPython/23388906?fr=aladdinMicroPython是Python3编程语言的一个完整软件实现,用C语言编写,被优化于运行在微控制器之上。MicroPython是运行在微控制器硬件之上的完全的Python编译器和运行时系统。提供给用户一个交互式提示符(REPL)来立即执行所支持的命令。除了包括选定的核心Python库,MicroPython还包括了给予编程者访问低层硬件的模块。MicroPython努力与普通的Python(称为CPython)尽可能兼容,这样如果你了解Python就已经知道了MicroPython。另一方面,您对MicroPython的了解越多,您在Python中的表现就越好。除了实现一系列核心Python库之外,MicroPython还包括用于访问低级硬件的“机器”等模块。
3、看到上面的一堆说明,有没有感觉更懵了。那我们用语文老师教我们的比喻手法通俗的说明一下。a-将支持MicroPython的开发板比做是我们平时用的电脑;b-MicroPython就相当于我们在电脑上写Python脚本时需要安装的Python环境。MicroPython它只是遵循了Python3的语法,以及实现了一些Python基础核心库,它是Python延伸出来的一个产物。
4、McrioPython的优势是什么?在MicroPython出世之前,单片机嵌入式大部分都是用C语言开发的,还要了解各罩脾青槊种寄存器知识。拿STM32来说,控制一个引脚,光定义就一堆,刚入门的新手用起来头大。MicroPython它干了啥事呢?它就是把那些C语言封装起来了,让用户可以用Python的语法去调用,这样会让之前从事Python开发工作的人快速进行单片机,同时也方便刚入门的新手学习,毕竟掌握Python比掌握C语言来的更简单快捷。叨叨了这么多,那到底该怎么用MicroPython开发呢?首先你的有一块支持MicroPython的开发板,官网的板子叫pyboard的,某宝上有一些仿照的或者代购的,比较贵也没有必要。国内呢有一个TPYBoard v102,他和pyboard功能完全一致,资料大部分都是中文的,而且很丰富,主要更便宜些,可以买来试一下。
5、这是一个开篇,计划是将我学习过的MicroPython的经验以及TPYBoard v102的一些使用心得,通过百度经验的方式共享给大家。欢迎大家持续关注。哈哈