I am currently trying to follow this tutorial. I keep running into errors for the RPi part. I have received several error related to SPI. I removed SPI from my blacklist and followed the instructions from a question asked on StackExchange to get to my current problem. The python code given in the tutorial imports the nrf24 library. I receive this error when I run (from tutorial):
/home/pi/nrf24pihub/nrf24.py:374: RuntimeWarning: This channel is already in use, >continuing anyway. Use GPIO.setwarnings(False) to disable warnings.
GPIO.setup(self.irq_pin, GPIO.IN, pull_up_down=GPIO.PUD_UP)
Traceback (most recent call last):
File "raspberryfriend.py", line 13, in
radio.begin(0, 0,25,18) #set gpio 25 as CE pin
File "/home/pi/nrf24pihub/nrf24.py", line 381, in begin
self.write_register(NRF24.SETUP_RETR, (int('0100', 2) << NRF24.ARD) | (int('1111', 2) << NRF24.ARC))
File "/home/pi/nrf24pihub/nrf24.py", line 239, in write_register
return self.spidev.xfer2(buf)[0]
IOError: [Errno 22] Invalid argument
Here is the nrf24.py code. All I can gather is that the 'but' argument might exceed some storage limit, but the tutorial appears to have worked for others. How should I get around or fix this error? The error occurs in Python, so should I seek a solution from one of those forums?