This function is a a MicroPython extension. If in doubt, remember the Zen of MicroPython :. 代码开发是在MicroPython IDEuPyCraft上完成的。 The code development was done on uPyCraft, a MicroPython IDE. 现在,我们需要连接到MicroPython 提示符来发送一些命令。 Now we need to connect to the MicroPython prompt to send some commands. MicroPython 不包含“常规”Python附带的所有标准代码库。MicroPython does not include all the standard code libraries that come with“regular” Python.
最后,需要用到MicroPython 软件的二进制文件。 Finally, we will needed the binary file with the MicroPython software. 列表是python非常有用的数据结构,在MicroPython 中也可以使用。 Lists are a very useful data structure from Python which are also available in MicroPython . 我们将通过连接MicroPython 提示符并一次发送一个命令来运行代码。 We will run the code by connecting to the MicroPython prompt and sending a command at a time. MicroPython 支持不同的板(boards),RTOS和OS可相对容易地适应新系统。MicroPython supports different boards, RTOSes, and OSes, and can be relatively easily adapted to new systems. 如果你以某种方式移动BBCmicro:bit(作为某种手势),那么MicroPython 能够检测到这一点。 If you move your BBC micro: bit in a certain way(as a gesture) then MicroPython is able to detect this. 我们还发现,MicroPython 的中断时间非常困难,并且一次只能运行多个线程。 We have also found that MicroPython has a very hard time with interrupts and can't seem to run more than one thread at a time. 在本次演讲中,我将介绍在MicroPython 中编写快速高效的Python代码的技巧和技巧。 In this talk I will go over the tricks and techniques for writing fast andefficient Python code in MicroPython . 本教程将在MicroPython 的内部文件系统中创建一个FAT格式的文件,保存在FLASH存储器中[1]。 The file will be created on MicroPython 's internal file system, which uses a FAT format and is stored in the FLASH memory[1]. 由于不支持导入第三方模块,所以我们将在当前的MuMicroPython 文件中复制和粘贴源代码。 Since importing third-party modules is not supported, we will be copying and pasting the source code in the current Mu MicroPython file. 若是你真想知道如何让MicroPython 得以在BBCmicro:bit上充分利用,那么请阅读API参考文档。 If you really want to know how to make MicroPython fly on the BBC micro: bit then read the API reference documentation. 例如,MicroPython 做了很多与CPython不同的事情,同时仍然渴望成为Python语言实现。 For example, MicroPython does a lot of things differently than CPython, while still aspiring to be a Python language implementation. 为了鼓励你,我们在MicroPython 和代码编辑器(TouchDevelop和Mu)中隐藏了很多彩蛋(惊喜)。 To encourage you we have hidden a number of Easter eggs in MicroPython and the code editors(both TouchDevelop and Mu). 比如MicroPython 做了许多和Cpython不一样的事情,同时仍然成为Python语言的一种实现。 For example, MicroPython does a lot of things differently than CPython, while still aspiring to be a Python language implementation. 因此,为了充分利用MicroPython 的潜力,了解它的数据结构以及如何使用它们是很重要的。 So, in order to take advantage of the full potencial of MicroPython , it's important to know its data structures and how to use them. MicroPython 是Python3编程语言的一个实现,它经过优化,可以在微控制器上运行。MicroPython is a software implementation of the Python 3 programming language, written in C, that is optimized to run on a microcontroller. 本文所述步骤基于MicroPython 文档网站上的ESP8266指南,我建议你读一下该指南。 The procedure shown here is based on the guide provided for the ESP8266, on the MicroPython documentation website, which I encourage you to read. MicroPython 中的类型转换是一个简单的str,它放置在保持类型编号温度的变量前面。Type conversion in MicroPython is a snap with a simple str placed in front of the variable holding the temperature of type number.用于实时软件最广泛的Python版本是MicroPython ,大多是设计在ARMCortex-M3/4微控制器上运行。 The most widely-available Python version for real-time is the MicroPython port designed to run on microcontrollers such as the ARM Cortex-M3/4. 本MicroPython教程的目的是解释如何在MicroPython 中使用lambda函数,以及它们与常规函数的区别。 The objective of this post is to explain how to use lambda functions in MicroPython and their difference regarding regular functions. 接下来,我们将连接到MicroPython 提示符,确认文件真的位于ESP32/ESP8266MicroPython 文件系统中。 We will connect to the MicroPython prompt to confirm the file is actually there in the ESP32/ ESP8266 MicroPython file system. MicroPython ,是Python3编程语言的一个完整软件实现,用C语言编写,被优化于运行在微控制器之上。MicroPython is a software implementation of the Python 3 programming language, written in C, that is optimized to run on a microcontroller. 这类区别、以及超出MicroPython 核心功能的特定于端口的扩展都将在但单独的、特定于端口的文件中进行介绍。 Any such differences, and port-specific extensions beyond the MicroPython core functionality, would be described in the separate port-specific documentation. MicroPython 在BBCmicro:bit的运用中最棒的一点是它可以让人很容易地将设备的不同功能联系在一起。One of the most wonderful aspects of MicroPython on the BBC micro: bit is how it lets you easily link different capabilities of the device together. MicroPython 是澳大利亚程序员和物理学家DamienGeorge,在2013年一次成功的Kickstarter众筹活动之后最初创建的。MicroPython was originally created by the Australian programmer and physicist Damien George, after a successful Kickstarter backed campaign in 2013. MicroPython 是澳大利亚程序员和物理学家DamienGeorge,在2013年一次成功的Kickstarter众筹活动之后最初建立的。MicroPython was originally created by the Australian programmer and physicist Damien George, after a successful Kickstarter backed campaign in 2013.
Display more examples
Results: 78 ,
Time: 0.0175