Introduction to Arduino: Creating Interactive Projects

Mark Frauenfelder, Author | Maker | Founder, MAKE & Boing Boing

Play Speed
  • 0.5x
  • 1x (Normal)
  • 1.25x
  • 1.5x
  • 2x
11 Lessons (51m)
    • 1. Trailer

      1:01
    • 2. What Is the Arduino?

      3:38
    • 3. What Do You Need?

      8:52
    • 4. Installing and Connecting Your Arduino

      3:04
    • 5. Blink Rates

      3:54
    • 6. Blink Rates with Components

      4:47
    • 7. Knobs and Potentiometers

      5:20
    • 8. Servos

      7:36
    • 9. Speaker Tones

      6:32
    • 10. What's Next?

      6:09
    • 11. More Creative Classes on Skillshare

      0:33
46 students are watching this class

Project Description

Set up 5 simple Arduino experiments using light, motion, and sound outputs.

Introduction

  1. Explore the possibilities of Arduino.

    Search "Arduino projects" online for articles and videos of interesting projects, then share your favorites in the Skillshare Community forum!

    A few links to get started:

    • MAKE magazine calls Arduino "the little microcontroller that launched a maker revolution." Explore its Arduino archive for videos, articles, and projects.
    • Many sites feature clever Arduino applications. This list from ReadWrite.com features a Twitter-enabled coffeepot and a talking clock.

    To see the secret-knock gumball vending machine in action (powered, of course, by an Arduino), click here.

    1ec22256

  2. Gather your materials.

    In addition to your laptop or computer, you'll need a number of materials.

    All of these parts are relatively inexpensive and readily available online.

    Check out the links below, and explore sites like SparkFun, which often bundles these and similar parts into easy and affordable kits!

    1. Arduino Uno (Available at www.arduino.cc)
    2. USB cable (Amazon)
    3. Solderless breadboard (Amazon)
    4. Three different resistors: 4.7kΩ, 220Ω, 100Ω (Amazon)
    5. Photo resistor (Amazon)
    6. Potentiometer (Sparkfun)
    7. LED (Amazon)
    8. Simple speaker (8 Ohm/1W) (Amazon)
    9. Servo motor (Amazon)
    10. Header Pins (Amazon)
    11. Jumper Wires (Amazon)

    If you're interested in acquiring materials for future projects and classes, you might also check out SparkFun's Inventor Kit for Arduino, which comes with nearly all of the materials for doing the experiments in this class as well as many more.

    2f6b1416

Installation

  1. Download and install the Arduino software.

    Go to www.arduino.cc and download the Arduino IDE for your computer (Windows, Mac, or Linux).

    5af955fe

  2. Connect and configure your Arduino.

    Use your USB cable to connect your Arduino to your computer.

    Once it's connected, configure it with two onscreen commands:

    1. "Tools" > "Board" > "Arduino Uno"
    2. "Tools" > "Serial Port" > "/dev/tty/usbmodem..."

    Your Arduino is now ready to use!

    40e84566

Experiments I

  1. Experiment with a simple blinking light output.

    In this experiment, the input is the sketch, processing is done by the Arduino, and the output is the blinking light on the circuit board.

    1. On your computer, navigate to the Blink sketch ("File" > "Examples" > "01 Basics" > "Blink") and upload the program to the Arduino.

    2. The LED on the Arduino board should blink!

    3. Find the "delay" commands in the code and experiment with different numbers, each time re-uploading the sketch. Can you make the LED blink slower? How about faster?

    79719822

  2. Experiment with the next-level light: a blinking LED.

    In this experiment, the input is the sketch, processing is done by the Arduino, and the output is the blinking LED.

    1. Connect a ground wire between the Arduino and the breadboard. To do that, insert one end of a jumper wire into a ground pin on the Arduino (marked "GND"). Insert the other end of the wire into the breadboard's blue rail.

    2. Use a resistor to restrict the flow of electricity to the LED light so that it doesn't burn out. Add the 220Ω resistor to pin #13 on the Arduino and J18 on the breadboard.

    3. Insert the LED's short lead anywhere along the breadboard's negative rail, and insert its long lead in the same row as the resistor (H18).

    4. Checkpoint! The LED should now blink at the same rate as the little light on the Arduino.

    5. As before, experiment with different blink-rate times in the Arduino sketch. Can you see your effect on the LED?

    bdb1ea84

  3. Experiment with using a potentiometer to control the LED.

    In this experiment, the input is the potentiometer, processing is done by the Arduino, and the output is the blinking LED.

    1. Start with the blinking LED setup from the previous lesson.

    2. Insert the potentiometer into breadboard pins 1, 3, and 5 in column J. It fits perfectly!

    3. Now attach 3 jumper wires:

    • Attach a wire from the breadboard's row 5 to the ground rail (the blue column). This gives a ground connection to the potentiometer.
    • Attach a second wire from that first row on the breadboard to a 5-volt Arduino pin. This creates a power connection through the potentiometer.
    • Attach a final jumper wire into the breadboard's row #3 and connect it to the Arduino's analog pin 0 (also known as A0).

    4. On your computer, navigate to the analog input sketch ("File" > "Examples" > "03 Analog" > "Analog Input") and upload the program to the Arduino.

    5. Experiment with the potentiometer to affect the blink rate and, as in the video lesson, explore the sketch and try different numbers. How do your changes affect your circuit?

    a7cd9181

Experiments II

  1. Experiment with motion output.

    In this experiment, the input is the potentiometer, processing is done by the Arduino, and the output is the servo motor (motion).

    1. Insert the potentiometer into the breadboard in J1, J3, and J5.

    2. Connect your jumper wires:

    • Attach a blue jumper wire from row 1 to blue (ground) rail.
    • Attach a red jumper wire from row 5 to the red rail.
    • Attach a red jumper wire from the red rail to a 5-volt Arduino pin.
    • Attach a black jumper wire from the blue rail to an Arduino ground pin ("GND").
    • Attach a yellow jumper from row 3 to the Arduino analog input pin "0" ("A0").

    3. Insert the servo motor into row H so that the black wire is in 10, the red wire is in 11, and the yellow wire is in 12.

    4. Connect your jumper wires:

    • Attach a red jumper wire from row 11 to the red rail.
    • Attach a black jumper wire from row 10 to the blue rail.
    • Attach a yellow jumper wire from row 12 to the Arduino digital pin #9.

    5. On your computer, navigate to this experiment's sketch ("File" > "Examples" > "Servo" > "Knob") and upload the program to the Arduino.

    6. Experiment! Turn the potentiomter knob to control the servo motor. Can you change the speed? How about the direction? What items, pictures, or trinkets could you attach to the arm of the servo motor, just for fun? How could you use this remote control to send a message? Brainstorm new directions for this project, and share your thoughts in the Skillshare Community forums!

    913c67e0

  2. Experiment with sound output.

    In this experiment, the input is the photo resistor, processing is done by the Arduino, and the output is the speaker (sound).

    1. Attach the 100Ω resistor (brown-black-brown) from the Arduino's digital pin #9 to the breadboard's row 14. (The video lesson uses J14.)

    2. Connect the speaker to the breadboard: insert its black wire into the blue ground rail, and insert its red wire into I14.

    3. Connect the photo resistor to the breadboard: insert one of its leads into J20, and insert its other lead into the red rail.

    4. Connect the photo resistor to the Arduino: attach a jumper cable from the breadboard's row 20 to the Arduino's analog pin "0" ("A0").

    5. Attach the 4.7kΩ resistor (yellow-purple-red) from H20 to the blue ground rail.

    6. Connect a jumper wire from the breadboard's blue ground rail to an Arduino ground pin ("GND").

    7. Connect a jumper wire from the breadboard's red ground rail to the 5-volt Arduino pin.

    8. On your computer, navigate to this experiment's sketch ("File" > "Examples" > "Digital" > "Tone Pitch Follower") and upload the program to the Arduino.

    9. Experiment! Play with different amounts of light hitting the photo resistor. How does light affect the speaker sound? Can you cancel the sound completely? Create a very high pitch? A very low pitch? The rhythm of your favorite song?

    872b5fb9

Conclusion

  1. Dream big and learn by doing.

    Keep learning! For a great beginning primer, pick up a copy of Arduino co-creator Massimo Banzi's Getting Started with Arduino.

    Explore www.arduino.cc for examples of code that you can copy, paste, and edit in sketches. The best way to learn Arduino programming is to use it in real projects.

    To explore more about the peanut-butter jar mixer project, check out Mark's Skillshare class on making, Introduction to DIY: Becoming a Maker.

    Most importantly, even if you're in the early stages of Arduino mastery, don't hesitate to think big. Brainstorm uses for Arduino that make your day a little bit easier, interesting, or fun. Share your ideas, pictures, and questions in the Skillshare Community and Project forums, and keep learning!

    fcac7642

Student Projects

Jody Linn
5 comments
Ruth Ortiz
Nadine Allan