Monday, November 13, 2017

10 October '17- Day 13- I2C Bus

Class began with Mason introducing the I2C bus and it features. This communication protocol was invented in the 80s and became a standard in the industry by the 90s.  The I2C bus is controlled by a master device (such as the Arduino) and talk to one or more slave devices utilizing only two input and output pins.  Each slave device has a unique address that can be called on by the master in order to communicate with that specific slave device.  This allows for many slave devices to be called upon via the same master device.

After the brief introduction into the I2C we began lecture with two dimensional arrays.  in the C language we can include data that is in a grid or table setup.  Rows begin with 0 as the first horizontal grouping and columns are the vertical groupings of data.  A good implementation of two dimensional arrays is for terrain navigation.  a value is representing an elevation on a terrain and an indication of a peak or valley can be identified by a large differentiation of values surrounding any given point.  Peaks are represented by a large value and valleys are depicted with lower values.  For homework we were to write a program that will read the data file for elevation and then print out the number of peaks and their locations.  
(White board exercises on two dimensional arrays)

(more exercises going over two dimensional arrays)

No comments:

Post a Comment