send 2Dimensional Listarray From Raspberry pi to the Arduino with I2c protocol
<p>im working on Computer vision (opencv )python and i had a result from the image , so this results is 2D List-arrays that should go to the Arduino by i2c buffer , so i realized that there is a library called smbus that interfacing the Raspberry pi with i2c ports so send and receive data , So i searched on References pages that give me some explanation about this Library but i didn't found eny thing useful...and all what i found is this sites which is not enough information  </p>

<p><a href="http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/plain/Documentation/i2c/smbus-protocol" rel="nofollow">http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/plain/Documentation/i2c/smbus-protocol</a></p>

<p><a href="http://wiki.erazor-zone.de/wiki:linux:python:smbus:doc" rel="nofollow">http://wiki.erazor-zone.de/wiki:linux:python:smbus:doc</a></p>

<p>so im indeed need eny  explanation how to send 2D Arrays Like (x,y) Coordinates 
 from Pi to Arduino with i2c buffer </p>

<p>thanks in advance</p>

<p>Check <a href="https://github.com/carlos-jenkins/smart-lights/tree/master/semaphore/chip/drivers/python/grid_io" rel="nofollow">this repository</a>. We connected a NTC CHIP to a Adafruit Trinket using I2C, but connecting the PI with the an Arduino should be very much the same.</p>

<p>The key file is the <a href="https://github.com/carlos-jenkins/smart-lights/blob/master/semaphore/chip/drivers/python/grid_io/i2c.py" rel="nofollow">I2C.py</a> file, which uses SMBus.</p>

<p>To talk to the Trinket Pro (ATMega328) we used the <a href="https://github.com/carlos-jenkins/smart-lights/blob/master/semaphore/chip/drivers/python/grid_io/trinket.py" rel="nofollow">trinket.py</a> file.</p>

<p>And the corresponding client code in the ATMega328, using the Arduino library, specially the Wire.h is located in the <a href="https://github.com/carlos-jenkins/smart-lights/blob/master/semaphore/trinket/firmware/hwthontrinket/hwthontrinket.ino" rel="nofollow">hwthontrinket.ino</a> file.</p>

<p>Finally, you can check how to use the classes in the <a href="https://github.com/carlos-jenkins/smart-lights/blob/master/semaphore/chip/drivers/python/test/test_trinket_slave.py#L24" rel="nofollow">test files</a>. You basically need to pass the bus number and the address of the device.</p>

python opencv raspbian i2c smbus