Quantcast
Viewing all articles
Browse latest Browse all 4834

Troubleshooting • How to restore Serial pins in Python

Using RPi.GPIO library I use Serial pins 14 and 15 for other task but later I want to use them for (hardware) serial using serial library.

Code:

GPIO.setmode(GPIO.BCM)GPIO.setup(14,GPIO.OUT)
After this code Serial no longer works. No error, just no data on the Tx pin. Calling

Code:

GPIO.cleanup()
makes no difference, I cannot get Serial to work until I reboot. How to fix this?

Statistics: Posted by Smajdalf — Fri Jan 03, 2025 6:16 pm



Viewing all articles
Browse latest Browse all 4834

Trending Articles