I want to send data from my master stm board(master) to Arduino (slave) using I2C.
I want to know the address for Arduino I2C.
Is there any code to find I2C address for Arduino
connect another arduino and run the i2c scanner code on one of them
I want to know the address for Arduino I2C.
It's the argument to Wire.begin() in your Arduino sketch.
What code will you be running on the slave, to deal with I2C commands from the master?
@OP
Every slave device on the I2C Bus must have a 7-bit address. For sensors (known as passive I2C slave device as they have no processor) like BME280, the manufacturer usually assigns (hard cored) an address. For Arduino UNO (known as active I2C slave), the address is assigned by the user (the programmer) by including the following codes in the sketch:
Slave Codes:
#include<Wire.h>
void setup()
{
Wire.begin(slaveAddress); //put any value from 0x08 (0b0001000) to 0x7E (0b1111110) in place of slaveAddress.
}