Additional information about your setup
Here is a paste of my os-release command on my pi.
What is the problem?
I am trying to run some python code on my pi, using GPIO, and I am getting the "RuntimeWarning: Channel is already in use" for the digital pin I am using. This is the first time I've ever tried using GPIO pins on this pi and on this install of Octopi.
What did you already try to solve it?
I've tried using a GPIO.cleanup() in my code - it's a relatively fresh install of Octopi, and I've only just started running scripts from it. I have searched the forums here for mention of the same issue, and there are some issues that I've found that talk about issues with GPIO things (here, and here, for instance) but not threads that mention the issue of the channels already being in use and throwing a warning.
More details about what I'm trying to do:
I've been running into errors and problems all day, and I'm starting to run out of steam. This forum may not even be the right place to post about this, but I'm doing this stuff on the Octopi build of Raspbian, so I thought I might find help here.
On my first script that uses GPIO, why would I get runtime warnings that channels are already in use for two different digital pins (GPIO17, and GPIO25 - I am using GPIO.BCM, and sending the ints 17 or 25 in my setup) ?
I only have one raspberry pi, so I'm trying to get it to do double duty managing my printer as well as managing some arduino devices that serve temperature and other sensor data through nRF24L01 modules to the pi which are posted into a Google Sheets document.
I'm still working through other errors from the nrf24 library I'm using, but my question here is what I can do about the warnings that the GPIO pins are in use. Should I just ignore the warnings? That doesn't seem like best practice.
Here is all my code. I'm also using this library for the nRF24 module. The gdrive_controller all works, I've just included it to be complete. When I run main.py, I get this error:
/home/pi/smarthome/lib_nrf24.py:377: RuntimeWarning: This channel is already in use, continuing anyway. Use GPIO.setwarnings(False) to disable warnings.
self.GPIO.setup(self.ce_pin, self.GPIO.OUT)
It seems that the CE pin value that I am sending into the nrf24 library is flagged as already being in use when the library tries to set up the module on that pin. I am not sure why this is happening.
Thanks for any help!