This is my second code of beagle_bone_black i2c master mode. The first code base one js, it did not work, so I rewrite in c.