Transistors are at the heart of the digital revolution. In this Building Block a single transistor is introduced along with its basic circuit configuration.
Simple introduction to transistors. This is a huge area with many other resources online — so this is pretty barebones.
Video
I am aware that I am a special kind of green in this video.
Get the Slides
Get The Code
The code used in this video is exactly the same as that used in our introduction to Digital Outputs.
int ledPin = 8 ; // built in
void setup() {
pinMode ( ledPin , OUTPUT) ; // set direction
}
void loop() {
digitalWrite ( ledPin , 1 ) ; // turn LED on
delay ( 1000 ) ; // wait a bit == 1 second
digitalWrite ( ledPin, 0 ) ; // turn LED off
delay ( 1000 ) ; // wait a bit
}
Get the code from tangible on github.
Going Further
Add motors to this circuit in Transistors: Part 2