Transistor controls other power source
Posted on by ellen
Reply
PNP transistor
Posted on by ellen
Turn the LED on with this code:
-
void setup() {
-
pinMode(13, OUTPUT);
-
}
-
-
void loop() {
-
digitalWrite(13, HIGH); // Turn on LED
-
delay(5000);
-
digitalWrite(13, LOW); // Turn off LED
-
delay(5000);
-
}
DC motor
Posted on by ellen
You will need:
- DC Motor
- Power diode
- TIP 120
Turn the motor on with this code:
-
void setup() {
-
pinMode(8, OUTPUT);
-
}
-
-
void loop() {
-
digitalWrite(8, HIGH); // Turn on motor
-
delay(5000);
-
digitalWrite(8, LOW); // Turn off motor
-
delay(5000);
-
}