Tumbleweed:
mpick
Followed your link to RS, typically they have no link to a datasheet or Hfe values or anything to figure out what resistor you need.
Yes, I can go to another online supplier and look it up, but after reading the bad reviews on RS about their packaging of the wrong parts, just order them from DigiKey, or one of the others listed here http://www.findchips.com/.
The explanation that works best for me to figure the value can be found herehttp://www.rason.org/Projects/transwit/transwit.htm.
Didn't check your code, lots of others here are way more adept at spotting mistakes.
TomJ
Thank you for taking the time to reply! I really appreciate it! I followed your link and read the entire article but I'm still a little lost. I did find the data sheet to the P2N2222AG transistor. (http://www.onsemi.com/pub_link/Collateral/P2N2222A-D.PDF)
And I found this calculator for calculating the transistor's base resistor: Transistor base resistor calculator
I tried using the calculator but I have no idea what I'm doing.
If you could help me out and calculate this base resistor I would really appreciate it! This is the last piece to my project, and I would really like to see it work. ![]()