Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange
2

Question How to use a NPN transistor to "turn on" a Rpi GPIO pin? Answer Ah, you cannot "turn on" a Rpi GPIO pin. She won't listen to you, but you can ask her to behave as input or output! :) In geek English: A Rpi GPIO pin can be in "input mode" or "output mode". An "input" pin can input/read a signal which can be High or Low. An "output" ...


2

To determine what your program is doing, you need to save the output of the program to a file. Use this type of call to start the program /path/to/script >> /path/to/log/file 2>&1 & This will start the program in the background, and send all output (both stdout and stderr) to a file of your choice. Keep in mind that if the script is long ...


1

Spawn a new thread to read keypad while RFID is being scanned, then read its data and kill it the moment RFID is done being scanned. In the code below, I'll demonstrate the use of processes. At the top of your script (new_main.py) add from multiprocessing import Process, Pipe, Value then, before line 79 (which shall be line 80 once you insert the above), ...


1

If the relay pins are a simple contact closure (which seems likely, but no one can confirm - although it is easy to verify with a multimeter) then you can use any button code. See https://www.raspberrypi.org/blog/gpio-zero-a-friendly-python-api-for-physical-computing/ Specifically https://gpiozero.readthedocs.io/en/stable/recipes.html#button Connecting to ...


1

Question I removed the plastic stopper from the gears so they are moving freely. Now the motor won't rotate or do anything. I can rotate the DC motor by applying 5v to the motor pins itself. Answer Well, newbies of course carelessly kill their servos. So I have killed a couple, or have their little and big gears scattered all around and ...


Only top voted, non community-wiki answers of a minimum length are eligible