I need to Establish I2C Communication between BeagleBone Black and Arduino Uno.
I use BeagleBone Black with BeagleBoard.org Debian Buster IoT Image 2020-04-06 .
BeagleBone Black i2c pin output 3.2 Volt
Arduino Uno i2c pin output 3.4 Volt
i2c.ino (Arduino Code)
#include <Wire.h>
int X0;
void setup()
{
Wire.begin(0x14); // Initiate the Wire library
Serial.begin(9600);
}
void loop()
{
Wire.beginTransmission(0x14); // Begin transmission
Wire.write("abc");
Wire.write(3);
delay(10);
Wire.endTransmission(); // Ends the transmission and transmits the data from the two registers
if (Wire.available() <= 2 )
{
X0 = Wire.read(); // Reads the data from the register
Serial.print("X0= ");
Serial.println(X0);
}
}
For BeagleBone Black :
i2cdetect -l
op ;- all 3 i2c
i2cdetect -r 1 (Connect with P9_17, P918)
op :- --- --- --- ...
i2cdetect -r 2 (Connect with P919_, P920)
op :- --- --- --- ...
Connections
1) BeagleBone Black P9_17 -> Arduino uno (ATMega328p) i2c SCL
BeagleBone Black P9_18 -> Arduino uno (ATMega328p) i2c SDA
GND ->GND
2) BeagleBone Black P9_19 -> Arduino uno (ATMega328p) i2c SCL
BeagleBone Black P9_20 -> Arduino uno (ATMega328p) i2c SDA
GND->GND
means in i2c1 and i2c2 no device address detected ?
I also tried pullup connection with
-
3.3v to 10kOhm Resistor then I2c_scl
3.3v to 10kOhm Resistor then I2c_sda -
3.3v to 2.2kOhm Resistor then I2c_scl
3.3v to 2.2kOhm Resistor then I2c_sda
where i wrong
Please Guide me with Pin Connections and C Code