【MicroPython】官方的例程

dcexpert   2016-5-16 22:56 楼主
可能一些网友还不知道怎样学习MicroPython,不知道哪里可以找到入门的例程。其实在MicroPython的源码中,已经提供了几百个各种各样的测试例程,包括了pyb、io、文件读写、unicode、硬件驱动、嵌入汇编等,各种需要的例程都有。 这些测试例程在源码的tests目录下,里面还有很多子目录,每个子目录中又有很多测量程序。
..
basicstests/struct1: Add testcase for an unknown type char.
2 days ago
benchtests: Update for _io/_collections module having been renamed.
14 days ago
cmdlinepy/repl: Check for an identifier char after the keyword.
3 months ago
extmodtests/extmod: Move split-on-empty-match tests to a separate test file.
20 days ago
feature_checktests: Actuall add feature check for complex type being available.
5 months ago
floatpy/formatfloat: Fix further cases of buffer overflow in formatting.
2 months ago
importtests: Add test for relative import without package context.
11 months ago
inlineasmtests: Add a test for argument passing to inline-asm functions.
2 months ago
iotests: Make "io" modules fixes for CPython compatibility.
14 days ago
jnitests/jni: Add test for working with container of List interface.
6 months ago
micropythonpy/viper: Allow casting of Python integers to viper pointers.
3 months ago
misctests: Make "io" modules fixes for CPython compatibility.
14 days ago
pybstmhal: Convert to use internal errno symbols; enable uerrno module.
6 days ago
pybnativepy: Fix stack access in thumb native emitter.
2 years ago
stresstests: Add new subdir "stress/" specifically for stress tests.
2 months ago
unicodetests: Move int+unicode test to unicode-specific test directory.
8 months ago
unixpy/mpprint: Fix sign extension when printf'ing %u, %x and %X.
4 months ago
wipycc3200: Rename 'server' class to 'Server' for consistency.
3 months ago
READMEtests/README: Explain how tests get skipped
8 months ago
pyboard.pytests: Add a suite of tests specifically for the pyboard.
2 years ago
run-bench-teststests/run-bench-tests: Process tests in alphabetical order.
15 days ago
run-teststests/run-tests: Factor out list supported external boards.
9 days ago
run-tests-exp.pyunix: Rename "_os" module to "uos" for consistency with baremetal ports.
5 months ago
run-tests-exp.shrun-tests-exp.sh: Typo fix in comment.
a year ago
大家可以把需要测试的程序复制到PYFLASH或者TF卡中,然后导入运行。 https://github.com/micropython/micropython 本帖最后由 dcexpert 于 2016-5-16 23:02 编辑

回复评论 (6)

谢谢分享学习一下
点赞  2016-5-16 23:03
感谢分享哦!
点赞  2016-5-17 02:01
有没用定时器做输入捕获的例子啊,尝试了,没成功
点赞  2016-5-21 16:28
引用: xinmeng_wit 发表于 2016-5-21 16:28
有没用定时器做输入捕获的例子啊,尝试了,没成功

定时器是支持输入捕捉功能的,需要将通道的mode设置为Timer.IC。不过没有找到例程,请参考一下

https://bbs.eeworld.com.cn/thread-485618-1-1.html
点赞  2016-5-21 16:51
SD文件读写的例子是哪一个?
点赞  2016-9-28 09:49
引用: suoma 发表于 2016-9-28 09:49
SD文件读写的例子是哪一个?

你下载micropython源码,在drive目录下有sdcard的驱动和例子。
点赞  2016-9-28 10:10
电子工程世界版权所有 京B2-20211791 京ICP备10001474号-1 京公网安备 11010802033920号
    写回复