Bluno General Arduino

Romeo BLE quad

userHead o.gooberman 2016-12-28 12:47:11 3102 Views5 Replies
Does anyone know what code would be needed to set a motor to a specific speed with the romeo BLE quad. This would need to go into the minuses too. Thanks
2017-01-24 00:09:03 Hi,

Romeo BLE Quad is different to the Romeo BLE. The quad board uses HR8833 motor control chip. it has a different logic with L298. Especially the backward and forward. You can check its wiki:
make_clickable_callback(MAGIC_URL_FULL, '
', 'https://www.dfrobot.com/wiki/index.php/Dual_1.5A_Motor_Driver_-_HR8833_SKU:_DRI0040', '', ' class="postlink"')
userHeadPic Grey.CC
2016-12-30 01:04:10 Thanks userHeadPic o.gooberman
2016-12-29 23:20:22 Hi

Ok, I understand. Maybe I have to say sorry to you, we dont have a similar code for the Romeo BLE, which only support PWM speed control. The code as you mentioned, if you want to use with the Romeo BLE, maybe you need to do a lot of calculations to get the speed value. :(
userHeadPic Wendy.Hu
2016-12-29 00:23:12 Sorry I didn't specify earlier, will this work with the Romeo BLE quad. also I just need to be able to set it to a certain speed like the pololu dual vnh5019 motor driver which had a handy code for setting speed "md.setM1Speed( )". Is there a similar code for the Romeo BLE quad. userHeadPic o.gooberman
2016-12-28 21:58:47 Hi Sir,

Maybe you can refer to the following link:make_clickable_callback(MAGIC_URL_FULL, '
', 'https://www.dfrobot.com/wiki/index.php/RoMeo_BLE_(SKU:DFR0305', '', ' class="postlink"'))#Speed_regulation_of_the_two-armature_DC_motor

The motor speed is between 0-255, you can try to set the speed as follows:

void loop(void)
{
if(Serial.available()){
char val = Serial.read();
if(val != -1)
{
switch(val)
{
case 'w'://Move Forward
advance (255,255); //move forward in max speed
break;
case 's'://Move Backward
back_off (255,255); //move back in max speed
break;
case 'a'://Turn Left
turn_L (100,100);
break;
case 'd'://Turn Right
turn_R (100,100);
break;
case 'z':
Serial.println("Hello");
break;
case 'x':
stop();
break;
}
}
else stop();
}
}

Let me know if you have any problem. :)
userHeadPic Wendy.Hu