Python and MicroPython Resources¶
Introductory Satlink 3 and XLink 500 Python Videos:¶
The series of short videos bellow will help you get started with integrating python scripts into Satlink 3 and XLink 500.
- Getting Started part 1
- Getting Started part 2
- Hook Linkcomm into PyCharm
- Getting Python script into LinkComm
- Basic measurement script setup
- Basic task script setup
- Basic Txformat script setup
Any non-Sutron trademarks captured in these videos remain the property of their respective owners.
Python Tutorials:¶
MicroPython Resources:¶
- Home page
- Discussion Forums
- Source code
- MicroPython Tutorial (using their PyBoard)
- Library Documentation
- Original KickStarter for MicroPython
- Follow on KickStarter to support the ESP8266 (WiFi IoT board)
- KickStarter for LoPy board (LoRa, WiFi, BLE IoT board)
- KickStarter for FiPy board (LoRa, WiFi, BLE, LTE, SigFox IoT board)
- MicroPython Tutorial with the BBC:MicroBit
Python Videos:¶
- Learn Python in One Video by Derek Banas. Rapid overview of python syntax and manipulation of strings, lists, tuples, dictionary, conditionals, loops, functions, user input, string functions, file I/O, classes, ect.:
- Damien George introduces MicroPython and why he created it:
- Multi-part Video on Python starting with the very basics:
- Learn about Decorators and when to use them:
- Creating beautiful python code. Comparing typical programmer approach with code examples to equivalent python implementation. A talk given by one of the python developers:
- PyCharm Overview:
More Python Articles and Links¶
MicroPython Built-In Libraries¶
A number of libraries have been written for MicroPython, these are built-in to a port and can be imported by Python programs. The Satlink 3 and XLink 500 port of MicroPython initially includes all the libraries that could be easily ported and did not require additional hardware or conflict with the use of Sutorn hardware. Some of the libraries are bare bones ports, and most are optional.
- Nice documentation of libraries available for the pyBoard port of MicroPython: http://docs.micropython.org/en/v1.8.3/pyboard/library/index.html
Here’s a list of the standard libraries that have been ported to the Satlink 3 and XLink 500:
- array
- builtins
- cmath
- collections
- gc
- math
- micropython
- struct
- sys
- errno
- _thread
Here’s a list of the optional libraries that have been ported to the Satlink 3 and XLink 500 (which ones we keep is tbd):
- umachine
- pyb
- stm
- binascii
- re
- zlib
- json
- heapq
- hashlib
- time
- struct
- machine
- urandom
- uctypes
- os
Currently not supported:
- select
- lwip
- framebuf
- btree
- axtls
- mbedtls
- timeq
- webrepl
- websocket
- dupterm
- vfs
MicroPython Standard Libraries¶
MicroPython takes a minimalistic approach but yet tries to support as much of Python 3.4/3.5 as possible. To do this any standard Python libraries which can be written in Python are written in Python. It looks very impressive, but many of the libraries are just stubs. For instance if you look at ‘poplib’ and examine ‘poplib.py’ the last remark for it was “poplib: Add dummy module” indicating that the last update only created a “dummy module” or a stub for where code should go in the future. It’s also possible to embed precompiled Python code into a port using a concept called “frozen modules”. The future usefulness of these libraries is up to the community.
- This is a link to the library repository: https://github.com/micropython/micropython-lib
MicroPython Cross Compiler and Windows Version.¶
Roberthh has a web page with a pre-built copy of MicroPython built for Windows, as well as the mpy-cross Cross Compiler that converts .py in to .mpy. The latest version of mpy-cross is not compatible with the version of uPy Satlink 3 and XLink 500 are currently using, but we can access the history, and the Oct 11, 2016 version seems to work. MicroPython.exe is based on the Linux port, and will have differences from our port.
Udacity Free Courses¶
Programming Foundations with Python: (6 weeks, beginner level)
https://www.udacity.com/course/programming-foundations-with-python–ud036
Very beginner level but using Python: (3 Months, beginner level)
https://www.udacity.com/course/intro-to-computer-science–cs101