Maqueen V3 and Unihiker K10

userHead NDY 2025-09-09 07:58:02 1321 Views6 Replies

I am trying to wirite some block code in Mind+ for the Maqueen V3 with a Unihiker K10 for Obstacle Avoidance. There is an example in the Community area but it doesn't seem to work.

 

Has anyone suceeded in making Obstacle Avoidance with this hardware.

 

Thanks

Chris

2025-11-15 18:23:43

Plug the UNIHIKER K10 into the Maqueen V3 edge connector the same way you'd plug a micro:bit. If you used a separate ultrasonic module, make sure its VCC is 3.3V (Maqueen/K10 are 3.3V logic) and GND is common. Maqueen docs specifically show ultrasonic on P8/P12 depending on model examples — check your board layout. https://dfimg.dfrobot.com/nobody/wiki/9452afa67059f576c85b345bd385a060.pdf

userHeadPic ahsrab.rifat
2025-11-15 06:52:32

I'm not sure if this is acceptable to ask here.

I have both the Unihiker K10 and the Maqueen Plus V3.

I'm looking for board support code for use with arduino C++ or platformio style for the shield board.

 

I have not located anything on the DFR github repo for this board and can only locate Mind+ specific code.

 

Can someone please direct me to a location for code resources for C++ projects?

 

Thank you.

userHeadPic RedBeard
RedBeard wrote:

I want to follow up with another question. Is this the appropriate git repo -→ DFRobot/DFRobot_Maqueenplus

2025-11-15 07:05:12
1 Replies
2025-10-06 11:19:01

/*!
* MindPlus
* esp32s3bit
*
*/
#include "asr.h"
#include "unihiker_k10.h"
#include "arduino_image_cache.h"
#include <DFRobot_MaqueenPlusV2.h>
#include <DFRobot_matrixLidarDistanceSensor.h>
// Create an object
uint8_t                               screen_dir=2;
UNIHIKER_K10                          k10;
ASR                                   asr;
DFRobot_MaqueenPlusV2                 maqueenPlus;
uint8_t                               tofAddress = 0x33;
DFRobot_matrixLidarDistanceSensor_I2C tof(tofAddress);
Music                                 music;


// Main program start
void setup() {
k10.begin();
k10.initScreen(screen_dir);
k10.creatCanvas();
asr.asrInit(CONTINUOUS, EN_MODE, 6000);
while(asr._asrState == 0){delay(100);}
maqueenPlus.sys_int();
tof.begin();
tof.getAllDataConfig(eObstacle);
k10.setScreenBackground(0x000000);
asr.addASRCommand(0+1, "stop");
tof.configAvoidance(160);
maqueenPlus.set_rgbLed(2, 0x00FF00);
k10.canvas->canvasDrawBitmap(0,0,240,320,image_data1);
k10.canvas->updateCanvas();
}
void loop() {
tof.requestObstacleSensorData();
if (((tof.getDir())==3)) {
 maqueenPlus.set_rgbLed(2, 0x00FF00);
 k10.canvas->canvasDrawBitmap(0,0,240,320,image_data2);
 k10.canvas->updateCanvas();
 maqueenPlus.motorRun(maqueenPlus.ALL, maqueenPlus.CW, 130);
}
if (((tof.getDir())==2)) {
 maqueenPlus.set_rgbLed(0, 0xFFFF00);
 maqueenPlus.set_rgbLed(1, 0x000000);
 maqueenPlus.motorRun(maqueenPlus.LEFT, maqueenPlus.CW, 130);
 maqueenPlus.motorRun(maqueenPlus.RIGHT, maqueenPlus.CCW, 130);
 k10.canvas->canvasDrawBitmap(0,0,240,320,image_data3);
 k10.canvas->updateCanvas();
 music.playTone(262,  8000);
}
if (((tof.getDir())==1)) {
 maqueenPlus.set_rgbLed(1, 0xFFFF00);
 maqueenPlus.set_rgbLed(0, 0x000000);
 maqueenPlus.motorRun(maqueenPlus.LEFT, maqueenPlus.CCW, 130);
 maqueenPlus.motorRun(maqueenPlus.RIGHT, maqueenPlus.CW, 130);
 k10.canvas->canvasDrawBitmap(0,0,240,320,image_data4);
 k10.canvas->updateCanvas();
 music.playTone(262,  8000);
}
if ((asr.isWakeUp() && asr.isDetectCmdID(0+1))) {
 maqueenPlus.motorStop(maqueenPlus.ALL);
 k10.canvas->canvasDrawBitmap(0,0,240,320,image_data5);
 k10.canvas->updateCanvas();
 music.playMusic(POWER_DOWN);
 maqueenPlus.set_rgbLed(2, 0xFF0000);
 delay(10000);
}
}
 

userHeadPic NDY
2025-09-11 01:51:27  

The “Maqueen V3” extension in Mind+ is officially built around micro:bit firmware, not Unihiker.

When you drag “avoid obstacle” blocks, Mind+ assumes a micro:bit is driving the motors directly. On Unihiker, you must map the motor control to the K10’s GPIO/I²C bus instead.

 

Even if the ultrasonic works, the robot might not move if the K10 isn’t actually commanding the motors correctly.

userHeadPic ahsrab.rifat
2025-09-10 09:00:54

After many tries, I think I did it:

 

/*!
* MindPlus
* esp32s3bit
*
*/
#include <DFRobot_MaqueenPlusV2.h>
#include <DFRobot_matrixLidarDistanceSensor.h>
// Create an object
DFRobot_MaqueenPlusV2                 maqueenPlus;
uint8_t                               tofAddress = 0x33;
DFRobot_matrixLidarDistanceSensor_I2C tof(tofAddress);


// Main program start
void setup() {
maqueenPlus.sys_int();
tof.begin();
tof.getAllDataConfig(eObstacle);
tof.configAvoidance(160);
maqueenPlus.set_rgbLed(2, 0x00FF00);
}
void loop() {
tof.requestObstacleSensorData();
if (((tof.getDir())==3)) {
 maqueenPlus.set_rgbLed(2, 0x00FF00);
 maqueenPlus.motorRun(maqueenPlus.ALL, maqueenPlus.CW, 130);
}
if (((tof.getDir())==2)) {
 maqueenPlus.set_rgbLed(0, 0xFF0000);
 maqueenPlus.motorRun(maqueenPlus.LEFT, maqueenPlus.CW, 130);
 maqueenPlus.motorRun(maqueenPlus.RIGHT, maqueenPlus.CCW, 130);
}
if (((tof.getDir())==1)) {
 maqueenPlus.set_rgbLed(1, 0xFF0000);
 maqueenPlus.motorRun(maqueenPlus.LEFT, maqueenPlus.CCW, 130);
 maqueenPlus.motorRun(maqueenPlus.RIGHT, maqueenPlus.CW, 130);
}
}
 

userHeadPic NDY