Control robot via bluetooth of my notebook


#1

I have an ultimate robot kit with Bluetooth. I can control it using the android app makeblock provided and it works.
However, I want to be able to control the robot from my notebook by writing my own program code (using the notebook Bluetooth to send the commands to the robot).
Can anybody tell me if I can do it?
It there API for using BT interface that I can use? (like the android app does it)

Thanks,
Guy


#2

Hello guyliora,
I was just trying to figure that out myself. I spent few hours playing with mBlock and i was able to make it work. I have Ultimate Kit and i built Tank with Arm and i am able to control everything from up/down/left/right/ arrows for motion and W/S/D/A for opening the gripper and moving arm up and down. Just install mBlock and i can send you the project file which you can easily open in mBlock. Just make sure that first connect the your lap top to Bluetooth of the robot and than discover it within mBlock. My robot is based on Orion board if this match what you have just let me know and i will send you the file.
Slav


#3

Hi Slav,
I would appreciate it if you can send me the file/project. It will help me a lot.

Thanks,
Guy


#4

Yes definetly. What is your email? Or do i post the file somewhere?


#5

guy.gorodish@gmail.com


#6

Thanks,
I just sent you an email.
SLav


#7

is there anyway i could get that project file?


#8

Im trying to do exactly the same, could you please send me the project?


#9

Hi Slav, I was wondering if you still had the code to control the Robot Tank (with Arm) through Bluetooth? Could you share that with me? I would appreciate it if you can share the file/project.

Thanks!

  • Raj

#10

Yes, send me the email.I am sorry i just saw your post here. Send me the email at slavisha.petkovic@live.com.


#11

Sorry guys i was really not active on this forum in past few months but if you all would send me the email and just give me hint what exactly you are looking for and i will send you the codes i have. Again, my email is, slavisha.petkovic@live.com


#12

Hi Slav,
I’m interested in how you got the Bluetooth to receive TX. I’ve paired it and can get RX back to my computer but the module doesn’t take the TX. Over USB all the commands work in the code to control it but not over the bluetooth medium. Any suggestions would be great. I’ve added my current test code for ref and I’m using a terminal emulator to connect and send commands. It seems the “if(bluetooth.available())” never picks up over the bluetooth but it works over the usb fine.

#include <Makeblock.h>
#include <Arduino.h>
#include <SoftwareSerial.h>
#include <Wire.h>

MeBluetooth bluetooth(PORT_5);
char inDat;
char outDat;

void setup()
{
Serial.begin(115200);
Serial.println( “Start!”);
delay(200);
bluetooth.begin(115200);
bluetooth.println(“BT Start”);

}
void loop()
{
if(bluetooth.available())
{
inDat = bluetooth.read();
bluetooth.println(“available”);
Serial.print(inDat);
bluetooth.println(“BT worked”);
if(inDat==105){
Serial.println(“motor forward”);
bluetooth.println(“BT Fwd”);
}
if(inDat==107){
Serial.println(“motor backward”);
}else{
Serial.write(“broken”);
}
}
if(Serial.available())
{
outDat = Serial.read();
bluetooth.write(outDat);
Serial.write(outDat);
Serial.println(“good”);
Serial.flush();
}
}


#13