adafruit-circuitpython-rfm9x


Nameadafruit-circuitpython-rfm9x JSON
Version 2.2.16 PyPI version JSON
download
home_page
SummaryCircuitPython library for RFM95/6/7/8 LoRa 433/915mhz radio modules.
upload_time2023-12-09 17:32:23
maintainer
docs_urlNone
author
requires_python
licenseMIT
keywords adafruit lora radio rfm95 rfm9x rfm96 rfm97 rfm98 hardware micropython circuitpython
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            Introduction
============

.. image:: https://readthedocs.org/projects/adafruit-circuitpython-rfm9x/badge/?version=latest
    :target: https://docs.circuitpython.org/projects/rfm9x/en/latest/
    :alt: Documentation Status

.. image:: https://raw.githubusercontent.com/adafruit/Adafruit_CircuitPython_Bundle/main/badges/adafruit_discord.svg
    :target: https://adafru.it/discord
    :alt: Discord

.. image:: https://github.com/adafruit/Adafruit_CircuitPython_RFM9x/workflows/Build%20CI/badge.svg
    :target: https://github.com/adafruit/Adafruit_CircuitPython_RFM9x/actions/
    :alt: Build Status

.. image:: https://img.shields.io/badge/code%20style-black-000000.svg
    :target: https://github.com/psf/black
    :alt: Code Style: Black

CircuitPython module for the RFM95/6/7/8 LoRa 433/915mhz radio modules.

Dependencies
=============
This driver depends on:

* `Adafruit CircuitPython <https://github.com/adafruit/circuitpython>`_
* `Bus Device <https://github.com/adafruit/Adafruit_CircuitPython_BusDevice>`_

Please ensure all dependencies are available on the CircuitPython filesystem.
This is easily achieved by downloading
`the Adafruit library and driver bundle <https://github.com/adafruit/Adafruit_CircuitPython_Bundle>`_.

Installing from PyPI
====================

On supported GNU/Linux systems like the Raspberry Pi, you can install the driver locally `from
PyPI <https://pypi.org/project/adafruit-circuitpython-rfm9x/>`_. To install for current user:

.. code-block:: shell

    pip3 install adafruit-circuitpython-rfm9x

To install system-wide (this may be required in some cases):

.. code-block:: shell

    sudo pip3 install adafruit-circuitpython-rfm9x

To install in a virtual environment in your current project:

.. code-block:: shell

    mkdir project-name && cd project-name
    python3 -m venv .venv
    source .venv/bin/activate
    pip3 install adafruit-circuitpython-rfm9x

Usage Example
=============

Initialization of the RFM radio requires specifying a frequency appropriate to
your radio hardware (i.e. 868-915 or 433 MHz) and specifying the pins used in your
wiring from the controller board to the radio module.

This example code matches the wiring used in the
`LoRa and LoRaWAN Radio for Raspberry Pi <https://learn.adafruit.com/lora-and-lorawan-radio-for-raspberry-pi/>`_
project:

.. code-block:: python

    import digitalio
    import board
    import busio
    import adafruit_rfm9x

    RADIO_FREQ_MHZ = 915.0
    CS = digitalio.DigitalInOut(board.CE1)
    RESET = digitalio.DigitalInOut(board.D25)
    spi = busio.SPI(board.SCK, MOSI=board.MOSI, MISO=board.MISO)
    rfm9x = adafruit_rfm9x.RFM9x(spi, CS, RESET, RADIO_FREQ_MHZ)

Note: the default baudrate for the SPI is 50000000 (5MHz). The maximum setting is 10Mhz but
transmission errors have been observed expecially when using breakout boards.
For breakout boards or other configurations where the boards are separated, it may be necessary to reduce
the baudrate for reliable data transmission.
The baud rate may be specified as an keyword parameter when initializing the board.
To set it to 1000000 use :

.. code-block:: python

    # Initialze RFM radio with a more conservative baudrate
    rfm9x = adafruit_rfm9x.RFM9x(spi, CS, RESET, RADIO_FREQ_MHZ, baudrate=1000000)

Optional controls exist to alter the signal bandwidth, coding rate, and spreading factor
settings used by the radio to achieve better performance in different environments.
By default, settings compatible with RadioHead Bw125Cr45Sf128 mode are used, which can
be altered in the following manner (continued from the above example):

.. code-block:: python

    # Apply new modem config settings to the radio to improve its effective range
    rfm9x.signal_bandwidth = 62500
    rfm9x.coding_rate = 6
    rfm9x.spreading_factor = 8
    rfm9x.enable_crc = True

See examples/rfm9x_simpletest.py for an expanded demo of the usage.


Documentation
=============

API documentation for this library can be found on `Read the Docs <https://docs.circuitpython.org/projects/rfm9x/en/latest/>`_.

For information on building library documentation, please check out `this guide <https://learn.adafruit.com/creating-and-sharing-a-circuitpython-library/sharing-our-docs-on-readthedocs#sphinx-5-1>`_.

Contributing
============

Contributions are welcome! Please read our `Code of Conduct
<https://github.com/adafruit/Adafruit_CircuitPython_RFM9x/blob/main/CODE_OF_CONDUCT.md>`_
before contributing to help this project stay welcoming.

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "adafruit-circuitpython-rfm9x",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "adafruit,lora,radio,rfm95,rfm9x,rfm96,rfm97,rfm98,hardware,micropython,circuitpython",
    "author": "",
    "author_email": "Adafruit Industries <circuitpython@adafruit.com>",
    "download_url": "https://files.pythonhosted.org/packages/01/e2/59cf9c63299d3ab1d682e058a9cd2e46949b121cc8d47e9055e57e10150e/adafruit-circuitpython-rfm9x-2.2.16.tar.gz",
    "platform": null,
    "description": "Introduction\n============\n\n.. image:: https://readthedocs.org/projects/adafruit-circuitpython-rfm9x/badge/?version=latest\n    :target: https://docs.circuitpython.org/projects/rfm9x/en/latest/\n    :alt: Documentation Status\n\n.. image:: https://raw.githubusercontent.com/adafruit/Adafruit_CircuitPython_Bundle/main/badges/adafruit_discord.svg\n    :target: https://adafru.it/discord\n    :alt: Discord\n\n.. image:: https://github.com/adafruit/Adafruit_CircuitPython_RFM9x/workflows/Build%20CI/badge.svg\n    :target: https://github.com/adafruit/Adafruit_CircuitPython_RFM9x/actions/\n    :alt: Build Status\n\n.. image:: https://img.shields.io/badge/code%20style-black-000000.svg\n    :target: https://github.com/psf/black\n    :alt: Code Style: Black\n\nCircuitPython module for the RFM95/6/7/8 LoRa 433/915mhz radio modules.\n\nDependencies\n=============\nThis driver depends on:\n\n* `Adafruit CircuitPython <https://github.com/adafruit/circuitpython>`_\n* `Bus Device <https://github.com/adafruit/Adafruit_CircuitPython_BusDevice>`_\n\nPlease ensure all dependencies are available on the CircuitPython filesystem.\nThis is easily achieved by downloading\n`the Adafruit library and driver bundle <https://github.com/adafruit/Adafruit_CircuitPython_Bundle>`_.\n\nInstalling from PyPI\n====================\n\nOn supported GNU/Linux systems like the Raspberry Pi, you can install the driver locally `from\nPyPI <https://pypi.org/project/adafruit-circuitpython-rfm9x/>`_. To install for current user:\n\n.. code-block:: shell\n\n    pip3 install adafruit-circuitpython-rfm9x\n\nTo install system-wide (this may be required in some cases):\n\n.. code-block:: shell\n\n    sudo pip3 install adafruit-circuitpython-rfm9x\n\nTo install in a virtual environment in your current project:\n\n.. code-block:: shell\n\n    mkdir project-name && cd project-name\n    python3 -m venv .venv\n    source .venv/bin/activate\n    pip3 install adafruit-circuitpython-rfm9x\n\nUsage Example\n=============\n\nInitialization of the RFM radio requires specifying a frequency appropriate to\nyour radio hardware (i.e. 868-915 or 433 MHz) and specifying the pins used in your\nwiring from the controller board to the radio module.\n\nThis example code matches the wiring used in the\n`LoRa and LoRaWAN Radio for Raspberry Pi <https://learn.adafruit.com/lora-and-lorawan-radio-for-raspberry-pi/>`_\nproject:\n\n.. code-block:: python\n\n    import digitalio\n    import board\n    import busio\n    import adafruit_rfm9x\n\n    RADIO_FREQ_MHZ = 915.0\n    CS = digitalio.DigitalInOut(board.CE1)\n    RESET = digitalio.DigitalInOut(board.D25)\n    spi = busio.SPI(board.SCK, MOSI=board.MOSI, MISO=board.MISO)\n    rfm9x = adafruit_rfm9x.RFM9x(spi, CS, RESET, RADIO_FREQ_MHZ)\n\nNote: the default baudrate for the SPI is 50000000 (5MHz). The maximum setting is 10Mhz but\ntransmission errors have been observed expecially when using breakout boards.\nFor breakout boards or other configurations where the boards are separated, it may be necessary to reduce\nthe baudrate for reliable data transmission.\nThe baud rate may be specified as an keyword parameter when initializing the board.\nTo set it to 1000000 use :\n\n.. code-block:: python\n\n    # Initialze RFM radio with a more conservative baudrate\n    rfm9x = adafruit_rfm9x.RFM9x(spi, CS, RESET, RADIO_FREQ_MHZ, baudrate=1000000)\n\nOptional controls exist to alter the signal bandwidth, coding rate, and spreading factor\nsettings used by the radio to achieve better performance in different environments.\nBy default, settings compatible with RadioHead Bw125Cr45Sf128 mode are used, which can\nbe altered in the following manner (continued from the above example):\n\n.. code-block:: python\n\n    # Apply new modem config settings to the radio to improve its effective range\n    rfm9x.signal_bandwidth = 62500\n    rfm9x.coding_rate = 6\n    rfm9x.spreading_factor = 8\n    rfm9x.enable_crc = True\n\nSee examples/rfm9x_simpletest.py for an expanded demo of the usage.\n\n\nDocumentation\n=============\n\nAPI documentation for this library can be found on `Read the Docs <https://docs.circuitpython.org/projects/rfm9x/en/latest/>`_.\n\nFor information on building library documentation, please check out `this guide <https://learn.adafruit.com/creating-and-sharing-a-circuitpython-library/sharing-our-docs-on-readthedocs#sphinx-5-1>`_.\n\nContributing\n============\n\nContributions are welcome! Please read our `Code of Conduct\n<https://github.com/adafruit/Adafruit_CircuitPython_RFM9x/blob/main/CODE_OF_CONDUCT.md>`_\nbefore contributing to help this project stay welcoming.\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "CircuitPython library for RFM95/6/7/8 LoRa 433/915mhz radio modules.",
    "version": "2.2.16",
    "project_urls": {
        "Homepage": "https://github.com/adafruit/Adafruit_CircuitPython_RFM9x"
    },
    "split_keywords": [
        "adafruit",
        "lora",
        "radio",
        "rfm95",
        "rfm9x",
        "rfm96",
        "rfm97",
        "rfm98",
        "hardware",
        "micropython",
        "circuitpython"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "3c0efce158ba2caaf5ad80da8cbe000d0dae83b9491cfc310c95cc95aa77894b",
                "md5": "8c31d61c921bd6d02d36b49ee1e9ccee",
                "sha256": "8bed154b62a3f049df98e032da45ef2d923884c5fc423dfea5080f3177c6b35b"
            },
            "downloads": -1,
            "filename": "adafruit_circuitpython_rfm9x-2.2.16-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "8c31d61c921bd6d02d36b49ee1e9ccee",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 15132,
            "upload_time": "2023-12-09T17:32:21",
            "upload_time_iso_8601": "2023-12-09T17:32:21.393878Z",
            "url": "https://files.pythonhosted.org/packages/3c/0e/fce158ba2caaf5ad80da8cbe000d0dae83b9491cfc310c95cc95aa77894b/adafruit_circuitpython_rfm9x-2.2.16-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "01e259cf9c63299d3ab1d682e058a9cd2e46949b121cc8d47e9055e57e10150e",
                "md5": "e8bffa54938b851fc590a5bbbaff9af8",
                "sha256": "d31179e23e507cdd702fc8f9eeb18affa82e379568ce7bbf66b23b33c391f1ae"
            },
            "downloads": -1,
            "filename": "adafruit-circuitpython-rfm9x-2.2.16.tar.gz",
            "has_sig": false,
            "md5_digest": "e8bffa54938b851fc590a5bbbaff9af8",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 39770,
            "upload_time": "2023-12-09T17:32:23",
            "upload_time_iso_8601": "2023-12-09T17:32:23.037671Z",
            "url": "https://files.pythonhosted.org/packages/01/e2/59cf9c63299d3ab1d682e058a9cd2e46949b121cc8d47e9055e57e10150e/adafruit-circuitpython-rfm9x-2.2.16.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-12-09 17:32:23",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "adafruit",
    "github_project": "Adafruit_CircuitPython_RFM9x",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [],
    "lcname": "adafruit-circuitpython-rfm9x"
}
        
Elapsed time: 3.13416s