I2C How to send the adress and a srings data

Hello team, I need your support to solve one doubt related to I2C, please. I'm trying to write a protocol but only get to receive the adress and I'm using an oscilloscope, but not an Data that goes after the adress i.e adress "0x09" Data "01 2A 5B 01 3C 1A 00 FF"
Please let me know if you know how to programm this code and could send this kind of data in Arduino, please.

https://www.gammon.com.au/i2c

1 Like

I have no idea based on the information provided.

I suggest that you show your code (please use code tags as described in How to get the best out of this forum, the <CODE> button), tell us what the I2C device is that you're talking to and provide a schematic diagram / wiring diagram.

I'm not familiar with the Giga R1 but the information will help others to help you.

Do you have attached a slave that responds to that address? If no slave responds then the entire transmission is terminated.

1. Which Arduino (UNO, NANO, MEGA, ESP32, NodeMCU, DUE) you are using as an I2C Master?
2. Is 0x09 (000 1001) the slave Address for the I2C Slave?
3. Is your Slave another Arduino?
4. Dou want to transmit the content of the following string from Master to Slave?

char myData[] =  "01 2A 5B 01 3C 1A 00 FF"; //space between bytes

or

char myData[] =  "012A5B013C1A00FF";  //no space between bytes

Hello guys,
I'm using Arduino Giga as Master.
The 0x09 adress is an example I'm using to see if Master is sending it, for now I want to make sure that master is really sending my data. I attached an image as example that I'm just catching adress but not the rest of dataProcessing: 20230328_084646.jpg...

My slave will be Arduino One

So do I need mandatory a slave in order to catch my data?

Master_CODE.zip (1.2 KB)

I attached the code I'm using,

Processing: 20230328_085611.jpg...

Who else is going to send the data to the master (or receive the data form the master) and do the acknowledgement?

Can you be a little less impatient when posting images :wink: If you click the reply button too early, the image is not there yet and we will see e.g. this "Processing: ...".

Please insert your code in a reply instead of attaching it; please use code tags (the <CODE> button).

1 Like

// Include the required Wire library for I2C<br>
#include<Wire.h>
int   x = 0;
void setup() {
  // Start the I2C Bus as Master
  Wire.begin();   
}
void loop() {
  Wire.beginTransmission(9); // transmit to device #9
  // Wire.write(x);              // sends x 
    Wire.write(byte(9));

  Wire.write(byte(0));
  Wire.endTransmission();    // stop   transmitting
  Wire.beginTransmission(9); 
    Wire.write(byte(8));
  Wire.write(byte(0));
  Wire.endTransmission(); 
    Wire.beginTransmission(9); 
    Wire.write(byte(7));
  Wire.write(byte(25));
  Wire.endTransmission(); 

  x++; // Increment x
  if (x > 6) x = 0; // `reset x once it   gets 6
  
}

Halleluja, you got it! :slight_smile:

1 Like

Hello, after I do some reviews yeah I could connect and send data.

Thank you so much. :smiley: