Section outline

    • Assignment #2 -

      Parts: 1 Breadboard, 1 Red LED, 1 Yellow LED, 1 Green LED, 3 resistors (220 ohm red, red, brn, gold),  at least 8 jumper wires

      In Class We'll Discuss:
        - CQCQ - Link
        -Morse Code to 800 hz - Link

      CdS
       
        -LEDs and Resistor Codes
        -Calculating Current Limiting resistor values in ohms
      (Ω) - 

      Ohm's Law  V=I R
               10mA at 5 Volt, 20mA at 5 Volt, Current at 5 Volts and 220
       ohms
      ** Note: Arduino Digital Pins can safely output a maximum of 40
      mA 


               
      Can't Resist

      -Comic Strip Pages 10 - 11 - Wiring LEDs on a breadboard
       
      - Don't let the Smoke Out !!! - Use only prescribed wiring !

      - Wire with the Power OFF (USB unplugged)


      With no Power to your Arduino:

      Wire 3 LEDs (with 3 Current Limiting Resistors) to Pins 4,5,6
      Pin4 to Resistor1.1 (resistor 1 - wire 1)
      Resistor1.2 to LED+ (resistor 1 - wire 2)
      LED- to Gnd

      Pin5 to Resistor2.1 (resistor 2 - wire 1)
      Resistor2.2 to LED+ (resistor 2 - wire 2)
      LED- to Gnd

      Pin6 to Resistor3.1 (resistor 3 - wire 1)
      Resistor3.2 to LED+ (resistor 3 - wire 2)
      LED- to Gnd

      Schematic

      1) Modify Blink to test each LED

      2) Write a program to simulate a traffic light.
      Green for 10 Seconds
      Yellow for 2 Seconds
      Red for 5 Seconds

      Add comment lines to the top of your program to explain what is wired to the Arduino






      Stoplight

       

    • ...

      Assignment 4 - Sound

       

      New parts: Speaker, CdS photoresistor, 10k Resistor (Br, Bl, Or, Gold)

      In Class:

      coil

      How a speaker works.

      Review Resistor Circuits:

      Current Limiting, Pull Down, Voltage Divider (Potentiometer), Pull Up

      See How a light sensitive resistor can create "Music":

       Examples - Basic - AnalogReadSerial -Determine range of A0 

        TonePitchFollower Code Link

      - Adjust to Pin 8 - Adjust to range of A0

       * 8-ohm speaker on digital pin 8 and Gnd

       * photoresistor on analog 0 to Gnd
       * 10K resistor (brown, black, red)  on analog 0 to 5v

      circuit

      Assignment:

      Write a program (sketch) that plays a song.

      Use the following as a guide:

      C Scale

      Note Values

      Table of Musical Frequencies          
                     
      Note Frequency   Note Frequency   Note Frequency
      C 130.82   C 261.63   C 523.25
      C# 138.59   C# 277.18   C# 554.37
      D 146.83   D 293.66   D 587.33
      D# 155.56   D# 311.13   D# 622.25
      E 164.81   E 329.63   E 659.26
      F 174.61   F 349.23   F 698.46
      F# 185   F# 369.99   F# 739.99
      G 196   G 392   G 783.99
      G# 207.65   G# 415.3   G# 830.61
      A 220   A 440   A 880
      A# 233.08   A# 466.16   A# 932.33
      B 246.94   B 493.88   B 987.77


      Treble and Bass Clefs

      Chromatic Scale - Link

    • Arduino Code to play the Chromatic Scale

Accessibility

Background Colour Background Colour

Font Face Font Face

Font Kerning Font Kerning

Font Size Font Size

1

Image Visibility Image Visibility

Letter Spacing Letter Spacing

0

Line Height Line Height

1.2

Link Highlight Link Highlight

Text Colour Text Colour