Hi, i have been playing with many RPI so far but right now i have a beginner question:
Why is this warning issued when i try to use the GPIO 8?
>>> gpio.setup(8, gpio.OUT);
__main__:1: RuntimeWarning: This channel is already in use, continuing anyway. Use GPIO.setwarnings(False) to disable warnings.
Now i know that it might have to do with it being an UART / Serial pin. But i have disabled it with raspi-config > advanced > Disable serial
Apart from the warning, everything seems to work OK, so should i worry about it?
Greetings!
Re: Serial GPIO pins
But is it specific to that particular GPIO pin only?
Are you using other GPIO pins, but not seeing the warning message for those?
Is you program exiting cleanly with.
You may notice that if you reboot the pi, run your program, and find that it does not show the warning, but if you then close the program and re-run it, that it does........
Texy
Are you using other GPIO pins, but not seeing the warning message for those?
Is you program exiting cleanly with
Code: Select all
GPIO.cleanup()
You may notice that if you reboot the pi, run your program, and find that it does not show the warning, but if you then close the program and re-run it, that it does........
Texy
Various male/female 40- and 26-way GPIO header for sale here ( IDEAL FOR YOUR PiZero ):
https://www.raspberrypi.org/forums/viewtopic.php?f=93&t=147682#p971555
https://www.raspberrypi.org/forums/viewtopic.php?f=93&t=147682#p971555
Re: Serial GPIO pins
Thanks for your reply.texy wrote:But is it specific to that particular GPIO pin only?
Are you using other GPIO pins, but not seeing the warning message for those?
Is you program exiting cleanly with.Code: Select all
GPIO.cleanup()
You may notice that if you reboot the pi, run your program, and find that it does not show the warning, but if you then close the program and re-run it, that it does........
Texy
I was testing the program right after boot up. So there is no other program using those pins.
My best hypothesis is that i haven't fully disabled serial yet, even if i deactivated it from raspi-config.
Is this reasonable?
Greetings,
Re: Serial GPIO pins
The GPIO will be in serial mode (ALT0 I think). You have told the system not to use the GPIO for its purposes, but the GPIO is still configured. Ignore the warning.
Re: Serial GPIO pins
JUst for the record, i ignored the warning so far and my RPI isn't burning in fire yet.
Greetings,
Greetings,