Arduino Due as I2C Slave AND Master

Hi there,
I'm working on a project and I would like to connect some sensors to a microcontroller (Due = Master). There I want to process the data and send it afterwards to a nRF52840. Therefore I want to use the other I2C Interface. (Due = slave)

Is this possible? And ist there I library which I can use?

Thanks

As far as I know, there can only be one Wire library for one I2C bus.

If you need Wifi and Bluetooth, then you can try ESP32, and use the same ESP32 to request data from the sensors. The ESP32 runs FreeRTOS. A sketch can be uploaded, ignoring the FreeRTOS, but a sketch can also use the FreeRTOS.

It is better if you have serial/UART communication between the Due and the nRF52840.
Why such a complicated board as the Due ? A MKR board with a SAMD21G processor is easier.
Is the nRF52840 not capable to read a few simple sensors ? Why do you need an extra board ?

Which sensors are they ?

*Is this possible? *

Yes, SDA/SCL (with 1K pull-ups) is for TWI1 and SDA1/SCL1 (without pull-ups) for TWI0. The 2 I2C busses can be used together.

And ist there I library which I can use?

No, there is no public library, you have to program your own code.

Please have in mind that
" Bluetooth and Wi-Fi don't co-exist very well on the ESP32 because they share the same radio system. The Bluetooth connection needs to be closed as soon as the Wi-Fi connection starts to be used for data"

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.