Arduino Blink circuit

Arduino Blink Activity

Arduino Blink Activity

Blink and the Arduino Programming Environment

The following diagram uses a breadboard to connect the circuit illustrated in the Arduino blink tutorial

Learning Goals:

In this skills activity you will learn to:

  • connect the Arduino to the computer or Chromebook and upload a sketch

  • make changes to the sketch to control the timing of the led blink.

  • make changes to the sketch to connect the led to a different pin on the Arduino.

  • Create and use a variable to make your programming easier to read and edit.

  • wire a simple LED circuit on a breadboard.

Procedure:

Building the circuit:

  • The Yellow wire connects the GND ground pin of the Arduino to the negative - header row across the bottom of the breadboard. yours does not need to be yellow.

  • The Black wire connects the Arduino 13 pin to one of the numbered columns on the top half of the breadboard.

  • The 220-ohm resistor (red, red, brown, gold) connects the same numbered column as the black wire to a column in the lower half of the breadboard.

  • The + Anode (longer) lead of the LED is connected to the same column as the resistor.

  • The - Cathode (shorter) lead of the LED is connected to the - Negative header row across the bottom.

  • Connecting the Arduino to a school windows PC

    • obtain a USB cable from the drawers in the back left corner class or there should be one in your drawer.

    • Watch the lower right corner of the screen the first time you plug the Arduino in to ensure the driver load.

    • set the board type from the tools menu to Uno it may select automatically

    • Set the serial port from the Tools menu usually the highest number in the list. ( the Arduino must be connected to the computer or the port will not show in the list)

Chromebook / Arduino Create instructions:

  • Go to the Chrome Web Store and install the Arduino Create for Education app.

  • Connect the Arduino to the Chromebook the following line should show in the window at the top of the page.

  • Arduino Uno /dev/ttyACM0

Loading your first sketch

  • For your first program click on examples on the left (the create app) or in the File menu (windows) hen basics then blink.

    • This will open the blink program sketch on your computer.

    • When you are ready click the upload button follow ( right-pointing arrow) the messages at the bottom of the Arduino Window to ensure your program uploads.

    • Red text will appear in the bottom window if it does not load properly. AVR Dude indicates an upload issue check the boards and ports are set properly.

  • The Circuit should blink the LED at about a 1-second interval.

  • In this program the lines delay(1000); control the speed the LED blinks at

  • Experiment with the values in the delay command to speed up or slow down the blink.

  • Each time you change the value you will need to upload the program again.

  • At what point does the LED appear to be on continuously?

Step Two

  • At the top of the program add the line int ledPin=13;

  • Change the word LED_BUILTIN that appears in the sketch to the word ledPin.

  • The line you just added creates a variable called ledPin and makes that variable equal to the number 13, by changing what ledPin is equal to we change the value everywhere that variable is used.

  • The program is set up to control the led when it is connected to pin 13, change the value to any number between 2 and 12

  • Move the wire connected to pin 13 to the numbered pin in your modified program.

  • upload the program again and see if the led blinking is connected to the new pin.

  • Go and complete the Arduino Activity sheet attached to the Google Classroom Assignment

Blink wiring to +5v Activity ( bonus activity)

Traffic Signals Activity

Blink Without Delay Activity