Issue with the DFR1216_1 Expansion Board with a micro under Mind+
Patrick.Gelinaud 2026-09-15 17:54:08 199 Views4 Replies Problem Description
When a DFR1216_1 expansion board is used with a micro and programmed with Mind+, we have observed a motor control issue when a servo motor control instruction is placed before a motor control instruction.
Example
The following program does not work correctly:
Servo motor command → M1 motor command
In this case, motor M1 receives the command correctly, but it operates without sufficient power.
However, when the order of the instructions is reversed:
M1 motor command → Servo motor command
the motor operates normally.
Observation Regarding the Generated Code
An analysis of the Arduino code automatically generated by Mind+ suggests that the problem may be related to the initialization of the motor control.
When the motor instruction is used alone, Mind+ generates the following motor period initialization instructions:
eunihiker.setMotorPeriod(eMotor1_2, 255); eunihiker.setMotorPeriod(eMotor3_4, 255);
However, when the servo motor block is placed before the motor block, these initialization instructions may no longer appear in the setup() function of the generated program.
The behavior therefore appears to depend on the order in which the blocks are placed in the Mind+ program.
Proposed Workaround
To avoid this issue, we currently recommend placing a motor initialization instruction with a speed of zero at the beginning of the program.
This instruction forces the motor control to be initialized before any servo motor is used.
Request to DFRobot
We would like to know whether this behavior is a known issue with the DFR1216_1, and whether it would be possible to fix the library or the Mind+ extension so that the motor initialization is always performed, regardless of the order of the servo motor and motor blocks.
Sorry.
I am using version 1.8.1 RC03.
I am not using version 2.0.7 because I cannot load an extension from a file.
I need this capability to load an extension that I translated from Chinese into English.
Patrick.Gelinaud I noticed this too, and it seems like placing a servo block first overwrites or skips the PWM frequency setup for the motor driver pins in the generated setup() code. Have you checked whether manually adding a custom C++/Arduino code block or re ordering the extension libraries in Mind+ restores the setMotorPeriod initialization call?
https://www.dfrobot.com/forum/topic/403576
Tanner.Glover Hello, friend. I attempted to reproduce your phenomenon. I found that I didn't have the same bug. Could it be that your Mind+ version is too low or for some other reason?

Jason.Miao Sorry.
I am using version 1.8.1 RC03.
I am not using version 2.0.7 because I cannot load an extension from a file.
I need this capability to load an extension that I translated from Chinese into English.

