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 7. Segment 2: I2C Serial Bus and the LCD display

This segment discusses the communication between the Arduino and connected devices via the I2C bus. I2C uses the Analog Pins 4 and 5 to communicate with I2C enabled devices.  At this point you should be familiar with object oriented programming and the use of libraries. If not, watch the videos posted in Week 6 and the first segment of Week 7.

Goals:

  • Understand the concept of serial communication.
  • Understand the I2C bus hardware setup.
  • Learn to use a 3rd party library on the example of the Arduino Kit I2C LCD display.

In-Class Project:
  • Use the I2C LCD display to show the distance measured by the proximity sensor. Use your own library for the sensor in combination with the provided I2C LCD library.

Materials for this segment:

  • Watch the videos on the right.
  • Use the Arduino sketch and the I2C LCD display library posted below the video for the In-Class Project.
  • More info about I2C LCD displays can be found here.
  • Official I2C website. Probably too much information at this point, but a good reference once you get deeper into it.
  • NPX I2C application note. Lots of practical information about serial communication

This is the Arduino sketch for the tutorial. Unzip and put the folder into the 'sketches' location on your computer.
i2c_lcd_tutorial.zip
File Size: 1 kb
File Type: zip
Download File

NOTE: Some LCD displays come with the PCF8574A chip (instead of PCF8574). The A-version has a different I2C address 0x3f (instead of 0x27). If the A-chip is on the small board behind the display, just change the address in the instantiation of the display to 0x3f.
This is the Arduino library needed to run the above sketch. Unzip and put the folder into your 'libraries' location in the Arduino set-up.
liquidcrystal_i2c.zip
File Size: 28 kb
File Type: zip
Download File

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