Balanduino Forum

Software => Applications => Topic started by: reallink on November 12, 2015, 02:26:13 AM

Title: VB aplication
Post by: reallink on November 12, 2015, 02:26:13 AM
Hello, im from Mexico, i apologize for my english.

i want to make an aplication to control the balanduino and make paths with a camera, but i don't know how i can control each wheel, i have found an example for VB, but i don´t understand how i can calculate the range of values that the program send to the board.

the main problem is that I have never used VB, I'm a little more used to C ++, besides that I never used bluetooth protocols

I´m making everything by steps and i think the best is to make my own application to define the velocity of each wheel first
I would appreciate any ideas or help, Greetings.
Title: Re: VB aplication
Post by: Lauszus on November 14, 2015, 03:55:00 PM
Hi,

You can simply send an 'm' via the serial monitor in order to see all the available commands. You can also see the code that is printed here: https://github.com/TKJElectronics/Balanduino/blob/master/Firmware/Balanduino/Tools.ino#L63-L107.

You properly want to use the following command:
Code: [Select]
CJ,x,y;
Where x and y, are values between [-1:1].

Regards
Kristian Sloth Lauszus
Title: Re: VB aplication
Post by: reallink on November 24, 2015, 03:44:48 PM
Thank you for you answer lauszus, I've been working in the balanduino for a while, but i don't know exactly what is "X" and "Y",  I assume that  relates with the angular and linear velocity.
I've been sending values like "CJ,0.0,0.5; "  waiting for a forward movement, but i always get some deviation, some theory tell me how to control de movement of the robot, but i need precisely this velocity's (for what i undestood).
One of the documents that i've been reading is this.

http://chess.eecs.berkeley.edu/eecs149/documentation/differentialDrive.pdf (http://chess.eecs.berkeley.edu/eecs149/documentation/differentialDrive.pdf)


I was thinking to make some PID compensation, by sending the wheel position to the computer and then calculating the velocity's of the wheels.

I apologise for my english, and thank you again for your answers.
Title: Re: VB aplication
Post by: Lauszus on November 24, 2015, 04:01:30 PM
No, X and Y simply refers to x-, and y-coordinates, so it in order to make it turn fulll right you could send:
Code: [Select]
CJ,1,0;

If you want to control the wheel velocity you will need to expand the API, as the current API does not support this.

Yes you can properly do this with a PID controller.

Regards
Kristian Sloth Lauszus
Title: Re: VB aplication
Post by: reallink on November 24, 2015, 05:45:12 PM
In the tools there is another way to control the robot

Code: [Select]
CM,pitch,roll;
And I have a little doubt with this part of the code, because for what I know this terms are for angles, but when I send values with the "CM" instead "CJ"  the balanduino have almost the same behavior, but with a larger range of values.

Greetings.
Title: Re: VB aplication
Post by: Lauszus on November 24, 2015, 06:55:06 PM
Yes it just another way of doing the same thing. Please see the following section of the code: https://github.com/TKJElectronics/Balanduino/blob/master/Firmware/Balanduino/Tools.ino.

As I wrote in my last response, you will have to implement your desired functionality yourself.

Regards
Kristian Sloth Lauszus