MAKECourse
  • Home
  • About
  • Course Materials
    • Software
    • Course Kits
    • TA hours
  • Videos
    • Intro to Programming Videos
    • Advanced Topics >
      • DAC and ADC Tutorial
      • SD Card Data Logging
      • DC Motor Control
  • Schedule
    • Syllabus
  • Student Projects
    • Awesome Prizes
    • Fall 2020 Projects
    • Fall 2016 Awesome Prize Winners
    • Fall 2016 Projects
    • Spring 2016 Awesome Prize Winners
    • Spring 2016 Projects
    • Fall 2015 Awesome Prize Winners
    • Fall 2015 Projects
    • Spring 2015 Awesome Prize Winners
    • Spring 2015 Projects
    • Fall 2014 Projects
    • Spring 2014 Projects

Week 5. Segment 2: Use of Functions

This segment focuses on the introduction of functions to organize and streamline the Arduino code and to add structure to the code.

Goals:

  • Learn the use of C++ functions.
  • Learn the use of Tabs in the Arduino IDE.
  • Learn to use buttons as input devices on the Arduino.

In-Class Project:
  • Program the 8 bit binary counter using functions. Use a pushbutton to control the counter. This is discussed in the In Class Project video.
  • Added activities: Add two buttons, one to activate a 'reset' function, the other for counting backwards. Do it using functions.

Materials for this segment:

  • Read the Arduino.cc document about functions and the de-bouncing of buttons.
  • Watch the videos on the right.
  • Use the Fritzing and iCircuit files posted below the videos.

This is the Fritzing schematic featured in the tutorial:
switchonarduinopin.fzz
File Size: 15 kb
File Type: fzz
Download File

This is the iCircuit schematic that was used in the tutorial to explore how to hook up a switch to an Arduino digital pin:
switchonarduinopin.cir
File Size: 0 kb
File Type: cir
Download File

[Home] [Course Materials] [Syllabus] [Student Projects] [Contact]
Powered by Create your own unique website with customizable templates.