mirror of
https://github.com/lumapu/ahoy.git
synced 2025-08-01 07:28:20 +02:00
added pyRF24 build instructions from mslookup
This commit is contained in:
parent
20c145013e
commit
d876fe841e
1 changed files with 52 additions and 4 deletions
|
@ -16,7 +16,6 @@ Thanks go to all who contributed, and are continuing to contribute,
|
|||
by providing their time, equipment, and ingenuity!
|
||||
|
||||
|
||||
|
||||
Required Hardware Setup
|
||||
-----------------------
|
||||
|
||||
|
@ -26,11 +25,61 @@ Required Hardware Setup
|
|||
- NRF24L01+ Radio Module connected as described, e.g., in [2]
|
||||
(Instructions at [3] should work identically, but [2] has more
|
||||
pretty pictures.)
|
||||
- TMRh20's 'Optimized High Speed nRF24L01+ Driver' [3], installed
|
||||
- TMRh20's 'Optimized High Speed nRF24L01+ Driver' [3], installed
|
||||
as per the instructions given in [4]
|
||||
- Python Library Wrapper, as per [5]
|
||||
|
||||
|
||||
Building the NRF24 Python Wrapper
|
||||
---------------------------------
|
||||
|
||||
You have to install the NRF24 Python Library, as a Dependency for the Raspberry Pi Version of Ahoy.
|
||||
|
||||
To do that correctly, I have contacted the developer of NRF24 via github
|
||||
[Python 3 Wrapper not installing properly #845](https://github.com/nRF24/RF24/issues/845)
|
||||
as I could not get the Python Wrapper for NRF24 to be built.
|
||||
|
||||
- Install Raspberry Pi OS lite x86 with raspberry pi imager
|
||||
- Connect nrf24 module to raspberry pi (as described in github)
|
||||
- Login with user pi
|
||||
- Execute `sudo apt update && sudo apt -y upgrade`
|
||||
- Execute `sudo raspi-config` and
|
||||
- Select "Expand filesystem" in "Advanced Options"
|
||||
- Activate "SPI" in "Interface Options"
|
||||
- "Finish" to exit `raspi-config` Tool, reboot YES!
|
||||
- Login as pi user again
|
||||
|
||||
```code
|
||||
sudo apt install cmake git python3-dev libboost-python-dev python3-pip python3-rpi.gpio
|
||||
|
||||
sudo ln -s $(ls /usr/lib/$(ls /usr/lib/gcc | \
|
||||
tail -1)/libboost_python3*.so | \
|
||||
tail -1) /usr/lib/$(ls /usr/lib/gcc | \
|
||||
tail -1)/libboost_python3.so
|
||||
|
||||
git clone https://github.com/nRF24/RF24.git
|
||||
cd RF24
|
||||
|
||||
export RF24_DRIVER=SPIDEV
|
||||
rm Makefile.inc #just to make sure there is no old stuff
|
||||
mkdir build && cd build
|
||||
cmake ..
|
||||
make
|
||||
sudo make install
|
||||
|
||||
cd ../pyRF24
|
||||
rm -r ./build/ ./dist/ ./RF24.egg-info/ ./__pycache__/ #just to make sure there is no old stuff
|
||||
python3 -m pip install --upgrade pip
|
||||
python3 -m pip install .
|
||||
python3 -m pip list #watch for RF24 module - if its there its installed
|
||||
|
||||
cd ..
|
||||
cd examples_linux/
|
||||
python3 getting_started.py # to test and see whether RF24 class can be loaded as module in python correctly
|
||||
```
|
||||
|
||||
If there are no error messages on the last step, then the NRF24 Wrapper has been installed successfully.
|
||||
|
||||
|
||||
Example Run
|
||||
-----------
|
||||
|
@ -81,7 +130,7 @@ This can be used to inject debug payloads
|
|||
The message must be in hexlified format
|
||||
|
||||
Use of variables:
|
||||
* tttttttt expands to current time like we know from our `80 0b` command
|
||||
* `tttttttt` expands to current time like we know from our `80 0b` command
|
||||
|
||||
Example injects exactly the same as we normally use to poll data
|
||||
|
||||
|
@ -139,4 +188,3 @@ References
|
|||
- [3] https://nrf24.github.io/RF24/index.html
|
||||
- [4] https://nrf24.github.io/RF24/md_docs_linux_install.html
|
||||
- [5] https://nrf24.github.io/RF24/md_docs_python_wrapper.html
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue