Hello guys I am currently working on a project. and I would like to turn on a GPIO pin when my LED on the circuit below turns on. I’m lost to where I should tie my input GPIO pin. please help. Thanks!
How to use a NPN transistor to “turn on” a Rpi GPIO pin?
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” pin can output/switch a LED, eg, High to switch on, Low to switch off, (or vice versa, depending on circuit).
I have drawn a circuit showing how to convert a loud (5V) signal to a soft (3V3) signal. The fair lady prefers a soft voice – loud voice can kill her! 🙂
Now I am making another step wise refinement to the circuit, to make it easier to do the following Agile oriented TDD (Test Driven Development), CIT (Continuous Integration and Testing):
- Continuous/Incremental Integration/Testing
- Structured/Functional/Loosely Coupled/Pair/Swapping oriented programming and development
- DevOp oriented Rapid Prototyping Documentation
The time has come to do a selfie walktrough, followed by a test plan with expected results, BEFOREtesting really begins.
/ to continue, …
Reading suggestion – You don’t need to understand too much before you design something. I often design circuits without understanding what it does! 🙂 And as the mad engineer Heaviside says:
“Am I to refuse to eat because I do not fully understand the mechanism of digestion? – Oliver Heaviside