1866 views|4 replies

7

Posts

0

Resources
The OP
 

MicroPython several issues [Copy link]

 

1. The built-in hardware driver library requires secondary packaging of external PY references, which is too troublesome. It would be much better to directly use the hardware driver function written in C for external references!!!

2. It is found that the built-in hardware driver library of circuitpython does not have a secondary encapsulation of external PY references. It is directly a driver function written in C, calling the LL library

3. Regarding the second point, if someone knows how to explain it, it is really convenient to write the hardware driver in the firmware in C, but the space occupied and the speed are definitely different.

Latest reply

As for the running efficiency, any interpreted scripting language cannot compare with the binary method. However, in many cases, this loss does not affect the operation of the system. For example, if the temperature is collected once every second, there is actually not much difference between 1ms and 10ms. Any programming language is just a tool to solve problems. If you are too concerned about running efficiency, you can only program in machine code, not assembly.   Details Published on 2020-4-18 20:46
 
 

1w

Posts

25

Resources
2
 

Micropython provides a basic usage environment. Although it is very convenient, everyone's requirements may vary greatly, so it is impossible to integrate too many functions into the firmware. Fortunately, Micropython is open source, and you can add C language functions by yourself, which is not only efficient, but also can add custom functions. For specific methods, please refer to the official documentation and previous posts in the community.

 
 
 

7

Posts

0

Resources
3
 

The bottleneck of MPY is that there are few libraries, and the libraries are not concise enough. Most of them are secondary encapsulation, slow running and low execution efficiency. It is not suitable for industrial applications. It seems suitable for rapid development in the fields of AI and the Internet of Things. I came here for this reason. I felt that the source code was a pit. It is not much better than C. I need to save the library myself.

Comments

There are already quite a few libraries on GitHub, covering most commonly used sensors.  Details Published on 2020-4-18 20:46
There are already quite a few libraries on GitHub, covering most commonly used sensors.  Details Published on 2020-4-18 20:40
 
 
 

1w

Posts

25

Resources
4
 
hengshu published on 2020-4-18 16:18 The bottleneck of MPY is that there are few libraries, and the libraries are not concise enough. Most of them are secondary encapsulation, slow running and low execution efficiency. It is not suitable for industrial applications. I feel that...

There are already quite a few libraries on GitHub, covering most commonly used sensors.

 
 
 

1w

Posts

25

Resources
5
 
hengshu published on 2020-4-18 16:18 The bottleneck of MPY is that there are few libraries, and the libraries are not concise enough. Most of them are secondary encapsulation, slow running and low execution efficiency. It is not suitable for industrial applications. I feel that...

As for the running efficiency, any interpreted scripting language cannot compare with the binary method. However, in many cases, this loss does not affect the operation of the system. For example, if the temperature is collected once every second, there is actually not much difference between 1ms and 10ms.

Any programming language is just a tool to solve problems. If you are too concerned about running efficiency, you can only program in machine code, not assembly.

 
 
 

Guess Your Favourite
Just looking around
Find a datasheet?

EEWorld Datasheet Technical Support

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京B2-20211791 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号
快速回复 返回顶部 Return list