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

Lesson Plan: Week 7

In Week 7 we will do the following (please, click on the Segment links below to access the course materials):
Segment 1:
  • Learn to write C++ libraries for hardware devices.
  • Write libraries for Arduino kit components.
  • Learn to use a proximity sensor and how it works.
Segment 2:
  • Understand how to control devices via the I2C bus.
  • Learn to use the I2C LCD display from the Arduino Kit.
  • Combine the display with the proximity sensor to give a readout.



Deliverable 3 (2%): Submit an updated video presenting your finalized design.
Homework 6: Use the proximity sensor to determine the distance to an object and then show the measured distance on the LCD display

Goal: Understand how to use the proximity sensor and the LCD display with the Arduino. Learn to use C++ libraries to control complex electronic components such as the LCD display.

Set-up: Connect the proximity sensor and the LCD display to the Arduino.

Programming: Program the Arduino that it continuously reads out the proximity sensor. The read out sensor value needs to be converted to cm and inches and then displayed on the LCD display. The first line of the display needs to show the distance in cm and the second line needs to show the corresponding value in inches. The display needs to be updated frequently to show an up to date value.

Helpful info:

Proximity sensor: Watch our proximity sensor video posted here. It explains how it works, how to use it and an example sketch is also provided.
LCD display: Watch our video about the LCD display. It discusses how to use the display via the "I2C bus", which is an industry standard for communication between integrated circuits. The above page also has a link for down loading the appropriate C++ library for the LCD display.
Using C++ libraries: Libraries are based on C++ functions. Start out by watching our video about functions. Then watch the video about object oriented programming, and then go on to our making C++ libraries video. It is important to understand where to save the libraries within the Arduino folder, and also that you need to restart the Arduino IDE before you can use an added library.

To get credit: Come to class on the due date and present your working set-up to one of the TAs or Instructors.
[Home] [Course Materials] [Syllabus] [Student Projects] [Contact]
Powered by Create your own unique website with customizable templates.