beaglebone black read i2c.

1,487 views
Skip to first unread message

ruben campos

unread,
Jul 13, 2014, 6:33:36 PM7/13/14
to beagl...@googlegroups.com
Hello good day community. 

I'm logged in beaglebone black and hope you can help me. 

would like to read the address 0x70 arduino and processing the data in beagblebone black. 
I hope you can help me. 

regards 

Ruben.

serge...@gmail.com

unread,
Jul 14, 2014, 7:00:01 AM7/14/14
to beagl...@googlegroups.com
Which connection?
Why 0x70 arduino?

Troy Dack

unread,
Jul 14, 2014, 8:30:41 AM7/14/14
to beagl...@googlegroups.com
You should have the Adafruit BBIO python library already installed.  You can follow this tutorial: https://learn.adafruit.com/setting-up-io-python-library-on-beaglebone-black/using-the-bbio-library
One of the sections there shows you how to access I2C.
 

Chriskner

unread,
Jul 14, 2014, 9:09:20 AM7/14/14
to beagl...@googlegroups.com
..and there's no real need for the Adafruit library if you're just using I2C.

Install the python smbus module (which the adafriut library uses anyway - i think), and start writing python code.

like:
import smbus as smbus   #I2C support

 #-------------------------
 # Init the I2C (SMBus) Bus
bus = smbus.SMBus(1)  #notice the "1" for the available I2C bus on the BBB

Then you can use all of the i2c IO calls in the smbus module (see the attached PDF).

I wish that I could mention the author of the attached summary, but I have lost that information (man page?).  I modified what I found by applying some spiffy formatting.

Good luck.

-Chris
Python_SMBus-I2C_Example.pdf

ruben campos

unread,
Jul 14, 2014, 3:58:53 PM7/14/14
to beagl...@googlegroups.com, serge...@gmail.com
Hello good day 

what I'm doing with arduino is to simulate a sensor that is in x direction in my case I put 0x04 or 0x70. 

what I want is to read BEAGLEBONE is 0x04 or 0x70 that direction. 

and process this data with any mathematical function. 


I hope they can give me an example of how to take these values ​​using i2c addresses. 

Thanks for your time. 
Ruben C.
==============================================================================================================



hola buen dia

lo que estoy haciendo con arduino es simular un sensor que se encuentra en   x direccion en mi caso puse 0x04 o 0x70 .

lo quiero es leer con beaglebone es esa direccion 0x04 or 0x70.

y procesar ese dato con cualquier funcion matematica.


espero me puedan dar un ejemplo de como tomar valores de esas direcciones mediante  i2c.

gracias por su tiempo.
Ruben C.

=================================================================================>>>>
Reply all
Reply to author
Forward
0 new messages