-
Notifications
You must be signed in to change notification settings - Fork 57
Description
-
I used script: https://github.com/BLavery/lib_nrf24/blob/master/example-nrf24-recv-rpi.py ... thank you Brian Lavery 👍
-
radio2.begin(0, 25) csn=0 means pin nrf24-csn to rpi-gpio8 (CE0_N) and pin nrf24-ce to rpi-gpio25
-
while True: .... akpl_buf = [(c& 255), ... (like in another example)
-
I change library https://github.com/BLavery/lib_nrf24/blob/master/lib_nrf24.py :
-
after lines self.spidev.open(0, csn_pin) self.ce_pin = ce_pin i add line:
-
self.spidev.max_speed_hz=(4000000); because: RasPI: HARDWARE FAIL: Radio not responding, verify pin connections, wiring, etc. nRF24/RF24#205 (comment)
-
and to line 226 i use line "if isinstance(value, (int, long)):" (not: "if isinstance(value, int)")
-
Commands on raspberry pi zero (virgin sd card with Raspberry Pi OS Lite):
-
sudo raspi-config ... to config. wifi (ssid and password)
-
sudo apt update
-
sudo apt full-upgrade
-
sudo apt install git
-
sudo git clone https://github.com/BLavery/lib_nrf24
-
cd lib_nrf24
-
sudo nano example-nrf24-recv-rpi.py ....... see modification
-
sudo nano lib_nrf24.py ...... see modification
-
sudo apt-get install python-pip
-
sudo pip install spidev
-
sudo python example-nrf24-recv-rpi.py
-
-
Sorry for my bad english
-
Other links:
-
https://www.raspberrypi.org/documentation/hardware/raspberrypi/spi/README.md
-
https://forum.mysensors.org/topic/1887/what-s-the-difference-between-nrf24l01-and-nrf24l01