|
| 1 | +Introduction |
| 2 | +============ |
| 3 | + |
| 4 | +This is the official home of the python wrappers for the RF24 stack. It is meant for Linux-based SoC boards like the Raspberry Pi. |
| 5 | + |
| 6 | +.. warning:: This repo is currently under construction and is meant as a place holder for the proper package name on pypi.org |
| 7 | + |
| 8 | +Pinout |
| 9 | +====== |
| 10 | + |
| 11 | +.. image:: https://lastminuteengineers.com/wp-content/uploads/2018/07/Pinout-nRF24L01-Wireless-Transceiver-Module.png |
| 12 | + :target: https://lastminuteengineers.com/nrf24l01-arduino-wireless-communication/#nrf24l01-transceiver-module-pinout |
| 13 | + |
| 14 | +The nRF24L01's CE and IRQ pins can be connected to other GPIO pins on the SoC. The MISO, MOSI, SCK are limited to the corresponding counterparts on the SoC's SPI bus. The CSN pin is limited to the chosen SPI bus's "Chip Select" options (Also labeled as "CE" pins on many Raspberry Pi pinout diagrams). The following table shows the default pins used in all the `examples <examples.html>`_ for this package. |
| 15 | + |
| 16 | +.. csv-table:: |
| 17 | + :header: nRF24L01, Raspberry Pi |
| 18 | + |
| 19 | + GND, GND |
| 20 | + VCC, 3V |
| 21 | + CE, GPIO22 |
| 22 | + CSN, "GPIO8 (CE0)" |
| 23 | + SCK, "GPIO11 (SCK)" |
| 24 | + MOSI, "GPIO10 (MOSI)" |
| 25 | + MISO, "GPIO9 (MISO)" |
| 26 | + IRQ, GPIO12 |
| 27 | + |
| 28 | +The IRQ pin is not typically connected, and it is only used in the interrupt_configure example. |
| 29 | + |
| 30 | +.. warning:: If connecting a nRF24L01+PA+LNA module to the Raspberry Pi, you MUST use a external 3V power supply because the Raspberry Pi (all models) do not provide enough power for the nRF24L01+PA+LNA modules. |
| 31 | + |
| 32 | +.. important:: It is highly recommended that the nRF24L01's VCC and GND pins have a parallel capacitor to stablize the power supply. Usually 100 microfarad is enough, but the capacitance ultimately depends on the nature of your power supply's stability. |
| 33 | + |
| 34 | +Dependencies |
| 35 | +============ |
| 36 | + |
| 37 | +To build this python package locally, you need to have boost.python installed. |
| 38 | + |
| 39 | +.. code-block:: |
| 40 | +
|
| 41 | + sudo apt install libboost-python-dev |
| 42 | +
|
| 43 | +Make sure that the following dependencies are also installed (sometimes the OS comes with these included). Notice that RPi.GPIO (for python) is used to manage the GPIO pins on the Raspberry Pi. |
| 44 | + |
| 45 | +.. code-block:: |
| 46 | +
|
| 47 | + sudo apt install python3-dev python3-setuptools python3-rpi.gpio |
| 48 | +
|
| 49 | +Documentation |
| 50 | +============= |
| 51 | + |
| 52 | +Before submitting contributions, you should make sure that any documentation changes builds successfully. This can be done locally. |
| 53 | + |
| 54 | +Documentation Dependencies |
| 55 | +-------------------------- |
| 56 | + |
| 57 | +This package's documentation is built with the python package Sphinx and the readthedocs theme for sphinx. |
| 58 | + |
| 59 | +.. code-block:: |
| 60 | +
|
| 61 | + pip install Sphinx sphinx-rtd-theme |
| 62 | +
|
| 63 | +To build the documentation locally: |
| 64 | + |
| 65 | +.. code-block:: |
| 66 | +
|
| 67 | + cd docs |
| 68 | + sphinx build -E -W . _build |
| 69 | +
|
| 70 | +The "docs/_build" folder should now contain the html files that would be hosted on deployment. direct your internet browser to the html files in this folder to make sure your changes have been rendered correctly. |
| 71 | + |
| 72 | +.. note:: The flags ``-E`` and ``-W`` will ensure the docs fail to build on any error or warning (just like it does when deploying the docs online). |
0 commit comments