MIND+ generated code initializes SEN0364 before I2C multiplexer (DFR0576)

userHead Patrick.Gelinaud 2026-01-05 00:05:48 39 Views0 Replies

Hello,

 

We are working on an educational project to build a line-following robot with children, and we would like to program it using MIND+.

 

Hardware setup

-Platform: UNIHIKER K10
-Color sensors: SEN0364
-I2C expansion board: DFR0548
-I2C multiplexer: DFR0576

 

Current status

Using MIND+, we successfully tested the SEN0364 color sensor on the I2C bus when it is connected through the DFR0548 extension board.
In this configuration, the sensor works correctly.

 

Requirement

For line following, we need to use multiple SEN0364 color sensors.
To achieve this, we use the DFR0576 I2C multiplexer.

 

Our understanding

As we understand the I2C multiplexer operation, the correct sequence should be:

-Open / select the I2C multiplexer

-Select the desired multiplexer channel (port)

-Then send commands to the SEN0364 color sensor on that channel

 

Observed issue in MIND+

We implemented the blocks in MIND+ according to this logic.
However, when we examine the generated C code, we observe that:
-The initialization of the SEN0364 color sensor is always placed before any I2C multiplexer selection
-This initialization code is located after void setup(), but before the I2C multiplexer is opened and a channel is selected

 

Please see the attached document for the generated code.

 

Hypothesis

Because the SEN0364 sensor is initialized before the I2C multiplexer channel is selected, we suspect that:
-The sensor cannot be properly initialized
-This is the reason why the SEN0364 sensors do not work when connected through the I2C multiplexer

 

When manually editing the code generated by MIND+ and reversing the instruction order (initializing the I2C multiplexer and selecting the channel before initializing the SEN0364 sensor), we observe that the color sensor works correctly through the I2C multiplexer.

 

 

Questions

-Can you please confirm whether our analysis is correct?
-Is this a known limitation or bug in MIND+?

 

Is there a recommended workaround or solution, such as:
-A different way to use I2C multiplexers in MIND+
-Planned support for this use case?

 

This feature is very important for educational robotics projects, especially for line-following robots, where multiple color sensors are required.

 

Thank you very much for your support.

 

Best regards,
Patrick