Electronics Class – Day 5

This is a support page for day 5 of an 8-session class is a basic introduction to both electronics and programming the Arduino microprocessor.  The intent is to prepare the student for what is currently popular in the maker world, rather than an electronics or engineering degree, and includes some things of interest to amateur radio enthusiasts.

Day 1, Day 2, Day 3, Day 4, Day 5, Day 6, Day 7, Day 8


Day 5: Transistors, potentiometers, phototransistor, rotary encoder
Goals:
      • Draw the circuit symbol for a transistor
      • Explain what these do:
        • transistor
        • potentiometer
        • phototransistor
    • Explain how a rotary encoder works
Vocabulary:
    • Transistor
    • Potentiometer
    • Rotary encoder

Blink LED schematic diagram, wiring and code

Schematic:

Build:

Code:

Blink.ino

Copied!
void setup() {
  pinMode(12, OUTPUT);
  for (int i=1; i<5; i+1) {
    digitalWrite(12, HIGH);  // turn the LED on (HIGH is the voltage level) 
    delay(1000);             // wait for a second 
    digitalWrite(12, LOW);   // turn the LED off by making the voltage LOW 
    delay(1000);             // wait for a second 
  }
}

void loop() {
}

 


Homework:

 

Loading