0

I want to interface raspberrp pi and Mbed microcontroller through I2c bus. Both operate at 3.3v, I have connected Rpi SCL ----> mbed SCL, RPI SDA------> mbed SDA, RPI gnd -----> mbed gnd. After connecting all these things I run sudo i2cdetect -y 1 command its does not shows any more address connected to Rpi . Both the modules have internal pull up resistor ...

1 Answer 1

0

I²C is a master-slave protocol. That means one devices takes over the role of the master, and one (or multiple) devices connected to the I²C bus act as an I²C device.

In your case it seems like the raspberry pi is working as the master. To put the mbed device into I²C slave mode you have to instantiate one I2CSlave class.

Documentation and a tiny example is on the official site:

https://developer.mbed.org/users/mbed_official/code/mbed/docs/tip/classmbed_1_1I2CSlave.html

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.