Monday, September 19, 2011

PNP Transistor Simple Project W/ Arduino

In this effect I only program one led to blink, I used a PNP transistor to turn on another LED once the first LED is off. The transistor makes the other led turn on while the other is off, so it would make 2 LED blink
Things needed is 2 LED, 2 Resistors(I used 100ohms), Arduino Board, PNP Transistor and wires.
I will post a video later when I get a camera.



This is my attempt at a schematic. If you don't know what the symbols are click this link

Source(it is just the blink example on the Arduino)-


void setup() {                


  pinMode(13, OUTPUT);    
}
void loop() {
  digitalWrite(13, HIGH);  
  delay(1000);              
  digitalWrite(13, LOW);   
  delay(1000);              
}



1 comment:

  1. this project needs a third resistor to go on the base. I tried it and it didn't work until a third resistor was inserted

    ReplyDelete