Devices & Components
Arduino Uno Rev3
General Purpose Transistor NPN
LED (generic)
Breadboard (generic)
Resistor 1k ohm
Jumper wires (generic)
Software & Tools
Arduino IDE
Project description
Code
Switching using Transistor
arduino
1const int transistor = 2; 2 3void setup() 4{ 5 pinMode (transistor, OUTPUT); 6} 7 8void loop() 9{ 10 digitalWrite (transistor, HIGH); 11 delay(1000); 12 digitalWrite (transistor, LOW); 13 delay(1000); 14} 15
Downloadable files
Schematic Diagram
Schematic Diagram
Breadboard Diagram
Make connections as shown in the figure
Breadboard Diagram
Comments
Only logged in users can leave comments