原创 关于MicroPython是否可以真正用在产品开发的讨论

2017-3-8 12:58 1698 10 10

这几天,在MicroPython官方论坛上,发起了关于MicroPython是否可以真正用在产品开发上(Is MicroPython ready for real world deployment)的讨论,非常有趣。我觉得值得大家看看,所以简单的翻译和整理了一下。


问:

If I wanted to deploy a large number of devices and have them run reliably, would MicroPython be a risky choice?

在设备上运行MicroPython是否可靠?


答:

We are using Micropython in several projects (medical & industrial certified measurement equipment) for ~2 years. It was a bold decision, but it already paid off.


有网友回答说:我们在多个项目中(医疗和工业测量认证设备)使用Micropython超过2年了。这是一个大胆的决定,但是它已经得到了回报。


坏处

提升了硬件资源需求

缺乏面向对象的编程技能


好处

开发效率

可追溯性

可测试性

可移植性

许可和支持(开源)


问:

don't the other benefits exist for C/C++ (with or without an widely used OS/RTOS) ? e.g. clang or gcc, FreeRTOS, etc?

是否有其他类似C/C++的功能?如 clang或gcc、FreeRTOS等


答:

MPY outperforms all the tools we know (even the ones we can't afford) for our application portfolio and a broad range of different MCU types. We came to MPY while searching for a lightweight python implementation for a linux based system to get rid of bloated shell scripts.

对我们的应用程序以及广泛的不同的单片机类型,MPY优于我们知道的所有工具(甚至包括买不起的)。我们为了摆脱臃肿的shell脚本,在寻找基于linux系统的轻量级的python时发现了MPY。


For this first project it ended up with getting rid of linux replacing it with MPY. Two years later we cover ultra low power systems (consuming 500nA with active REPL!) to real-time image processing, all with just one development and runtime environment.

对于第一个项目最终用MPY取代了linux。两年后我们实现了超低功耗系统(包括REPL仅消耗500 nA)进行实时图像处理,使用同一个开发和运行环境。


I'd say problems with the uPy side of things are extremely rare and the API is also very stable, and even if there is a bug or feature missing the fix takes a couple of days at most (either fix by main devs or time to get PR merged).

对于uPy我想说的是问题非常少和API也非常稳定。即使发现了一个bug或功能缺失,修复也最多需要几天(包括主要开发者修复和PR合并时间)


Frankly I don't think there are many other scripting language implementations out there that work as good for the pros mentioned by chuckbook already.

坦率地说,我不认为还有其他脚本语言可以像chuckbook提到的一样好。


Lua is ok but it's not Python. CPython works but good luck getting it to compile on non-pc or embedded pc hardware. Or trying to understand the code. C and C++ are tried and tested and pretty awesome if yo know how to use them properly, but are not scripting languages at all.

Lua不错但不如Python。CPython可以使用,但是需要在个人计算机或嵌入式pc硬件上编译、理解代码。C和C++久经考验,非常不错,但是你需要知道如何正确地使用它们。


文章评论0条评论)

登录后参与讨论
相关推荐阅读
shaoziyang 2017-12-15 11:06
《micropython 入门指南》正式出版了
第一本专门介绍MicroPython的中文图书《MicroPython入门指南》由电子工业出版社正式出版了(各大书店和网络书店都有)。MicroPython是近年开源社区中最热门的项目之一,它功能强大...
shaoziyang 2017-11-01 15:30
《MicoPython入门指南》一书即将发行
《MicoPython入门指南》一书即将发行,这是第一本专业介绍MicroPython的中文书籍,请大家多关注和支持。​​...
shaoziyang 2017-07-13 19:50
micro:bit 专用电池扩展板
最近Microbit这么火,就想着要做点什么,于是就有了这个Microbit的专用电池扩展板。它完美配合原版的microbit,可以为microbit增加电池、蜂鸣器功能,功能上超过 MI:power...
shaoziyang 2017-06-13 09:09
用pyboard的dac播放音乐
官方的PyBoard带有DAC功能,使用DAC,我们可以播放简单的音乐。 先准备好两根铜丝,一个有源音箱,一个音频线。 然后从官方网站下载两个文件: http://micropython.org/...
shaoziyang 2017-06-13 09:03
microbit巡线小车 BoBBoT
BoBBoT 是一个使用 BBC micro:bit 控制的巡线小车套件,它很容易组装。 它特别为儿童设计,让孩子可以通过实践学习计算机科学概念。使用 BoBBoT 可以学习: 算法设计 (流程图和...
shaoziyang 2017-06-12 08:29
micropython升级到了 1.9.1
micropython升级到了 1.9.1,主要改进有: v1.9.1 修复了 stm32 的 USB 存储, lwIP 绑定和 VFS 问题 This release provides an imp...
我要评论
0
10
1
2
3
4
5
6
7
8
9
0
关闭 站长推荐上一条 /3 下一条