Home arrow Forums
914 PC Bots Forum  


koo
User

Fresh Boarder
Posts: 2
graphgraph
Karma: 0  
How to make PC-Bot move backward? - 2010/01/13 18:47 How to make PC-Bot move backward?
I control PC-Bot on .NET framework and use PC-BOT Components.
I used Drive(long Distance, int LeftVel, int RightVel, int Power) function to move it backward, but It didn't move backward.

Simply, I used "Distance" sample code, and I put negative numbers into both of velocity. Also, I tested it with both of positive distance and negative distance, but it didn't move backward in both of cases. However, It looked like trying moving backward. I mean... It moved backward for about less than 1cm (It's not the distance I set) and stoped. Is there any options which I have to change in order to make PC-BOT move backward?
(It moves backward well when I use the drive control - a UI component - by mouse click and drag.)

---- a part code of "Distance" sample code ----
if (textBoxVelocityLeft.Text != null)
{
int LeftVel = Convert.ToInt32(textBoxVelocityLeft.Text);
int RightVel = Convert.ToInt32(textBoxVelocityRight.Text);
int pos = Convert.ToInt32(textBoxDistance.Text);
m31.Drive((long)pos, LeftVel, RightVel, Power);
}

Post edited by: koo, at: 2010/01/14 19:46
  | | The administrator has disabled public write access.
koo
User

Fresh Boarder
Posts: 2
graphgraph
Karma: 0  
Re:How to make PC-Bot move backward? - 2010/01/14 19:46
There is an answer of it.
http://www.914pcbots.com/community/index.php?option=com_joomlaboard&Itemid=71&func=view&id=3852&catid=25
  | | The administrator has disabled public write access.
c6jones720
User

Platinum Boarder
Posts: 350
graphgraph
Karma: 3  
Re:How to make PC-Bot move backward? - 2010/01/15 19:23 So it worked then? This one surprised me because Im positive the DLL the .Net is based on does allow for reverse travel. I dont really know what happens in the .Net code layer.
  | | The administrator has disabled public write access.
lilytherobot
User

Platinum Boarder
Posts: 189
graphgraph
Karma: 4  
Re:How to make PC-Bot move backward? - 2010/02/21 01:04 koo wrote:
How to make PC-Bot move backward?
I control PC-Bot on .NET framework and use PC-BOT Components.
I used Drive(long Distance, int LeftVel, int RightVel, int Power) function to move it backward, but It didn't move backward.

Simply, I used "Distance" sample code, and I put negative numbers into both of velocity. Also, I tested it with both of positive distance and negative distance, but it didn't move backward in both of cases. However, It looked like trying moving backward. I mean... It moved backward for about less than 1cm (It's not the distance I set) and stoped. Is there any options which I have to change in order to make PC-BOT move backward?
(It moves backward well when I use the drive control - a UI component - by mouse click and drag.)

---- a part code of "Distance" sample code ----
if (textBoxVelocityLeft.Text != null)
{
int LeftVel = Convert.ToInt32(textBoxVelocityLeft.Text);
int RightVel = Convert.ToInt32(textBoxVelocityRight.Text);
int pos = Convert.ToInt32(textBoxDistance.Text);
m31.Drive((long)pos, LeftVel, RightVel, Power);
}<br><br>Post edited by: koo, at: 2010/01/14 19:46



The WBR .net controls have been updated to allow reverse travel with automatic stop (so you don't have to calculate when to stop). The latest version of BRAIN supports this. You can also download the updated WBR DLL from robotgraymatter.com

Dave...
  | | The administrator has disabled public write access.