This project is a library to interface with AWS IoT ExpressLink modules with Linux/macOS/Windows devices running Python or microcontrollers running CircuitPython and MicroPython. It uses AT commands and provides a thin Python wrapper for parsing and integrating into your Python-based projects.
It currently follows and implements the AWS IoT ExpressLink Technical Specification v1.1. You can find the full programmer's guide and further documentation here.
Tested and built for Python 3.7+ using pySerial on Linux/macOS/Windows, CircuitPython 7, and MicroPython 1.19 on compatible microcontrollers.
If you are using the Arduino framework, you can use the awslabs/aws-iot-expresslink-library-arduino library for C++.
For additional resources, tutorials, workshops, and videos, please see the aws/iot-expresslink repository.
On Python using Linux/macOS/Windows, you need pySerial to access the UART serial interface.
On CircuitPython, there are no hard dependencies apart from the built-in modules.
On MicroPython, there are no hard dependencies apart from the built-in modules.
On Python using Linux/macOS/Windows, download and copy the aws_iot_expresslink.py
file from this repository into your project or package folder. You can also install it as pip package using pip install git+https://github.com/awslabs/aws-iot-expresslink-library-python.git
On CircuitPython, download and copy the aws_iot_expresslink.py
file from this repository into your CIRCUITPY/lib/
folder.
On MicroPython, download and copy the aws_iot_expresslink.py
file from this repository into your /pyboard/
folder using rshell.
See the auto-generated API documentation. This documentation can also be generated locally using pdoc: pip install pdoc && pdoc aws_iot_expresslink.py
See the examples/
folder in this repository for full examples.
First, import the library:
import board
from aws_iot_expresslink import ExpressLink
Second, create the ExpressLink
object and pass necessary signal pins:
el = ExpressLink(port='/dev/tty.usbserial-14440') # pySerial on Linux
el = ExpressLink(rx=board.RX, tx=board.TX) # CircuitPython
el = ExpressLink(rx=Pin(1), tx=Pin(0)) # MicroPython
Third, use the methods to interact with the AWS IoT ExpressLink module using the AT commands:
el.connect()
el.config.set_topic(1, "hello/world")
el.publish(1, "Hello from your device using AWS IoT ExpressLink!")
See CONTRIBUTING for more information.
This library is licensed under the MIT-0 License. See the LICENSE file.