[phpBB Debug] PHP Warning: in file [ROOT]/phpbb/session.php on line 574: sizeof(): Parameter must be an array or an object that implements Countable
[phpBB Debug] PHP Warning: in file [ROOT]/phpbb/session.php on line 630: sizeof(): Parameter must be an array or an object that implements Countable
Plum Geek Forum • "MoveWithOptions" test
Page 1 of 1

"MoveWithOptions" test

Posted: Sun Sep 06, 2015 3:28 am
by cbw060
1) testing simple movement with Motors(x,y) shows that I need to have left motor running at about 1.06 of right motor speed to maintain relative straight line.
2) I modified line 751 [in RingoHardware tab] to read " Motors(1.06*Speed,Speed);"
3) when I try the simple example in the guide (page 51), Ringo will move in complete circle in reverse and a large arc in forward.
4) I reduced "wiggle" to 0, with little impact.

any thoughts?

Re: "MoveWithOptions" test

Posted: Fri Sep 11, 2015 7:31 pm
by Kevin
There may be something happening with a data type conversion. Arduino is kind of strange about that. I wonder if your 1.06 is causing something unexpected to happen together with the value you pass for "left motor"?

You shouldn't need to edit anything inside MoveWithOptions - this function reads the gyro during the movement and automatically adjusts motor speed to maintain the desired heading. When you call Motors(x,y) directly there is no gyro involved.

If you go back to the original MoveWithOptions, then in your loop() on the main tab, try this:

MoveWithOptions(0, 200, 200, 3000, 1000, 0,0); // this should produce pretty straight movement

Make sure you're calling NavigationBegin(); at the start, and you can also call CalibrateNavigationSensors() to zero any drift the sensor is seeing. (make sure you're dead still when calling this - any vibration at all will give strange results - even a fan running or music playing on your desk can cause this).

If you're still having problems, zip up the entire folder of the sketch you're using and post it back.

-Kevin

Re: "MoveWithOptions" test

Posted: Fri Sep 18, 2015 3:55 am
by cbw060
I tried your suggestion and i do not get straight motion, Ringo goes in an arc.

2) in guide, I tried the code on page 51, to go forward, then backup. This does not work either.
3) I then tried to modify it as suggested to use GetHeading() in place of "0" in the function call for the heading, this will not compile giving a not declared error for GetHeading. [I cannot locate the function GetHeading in any of the tabs.]

I've zipped the folder as you suggested.

My goal was to do some simple, controlled motions i.e. forward, reverse left and right turns so that I can let my grandson do some "turtle" lilke commands to move Ringo through a maze....but I'm not there yet!
Appreciate any insight as to what I may be doing wrong.

Bruce

Re: "MoveWithOptions" test

Posted: Fri Sep 25, 2015 9:12 pm
by Kevin
Doh!! :o

It's "PresentHeading()" not "GetHeading()". Very sorry and embarrassed. When I put the guide together it was a marathon run putting that much material together quickly and I didn't actually test what I was writing. Note that PresentHeading() and GetDegrees() does exactly the same thing.

Sorry for the frustration. :oops:

-Kevin

Re: "MoveWithOptions" test

Posted: Sat Sep 26, 2015 5:29 am
by cbw060
No worries! I am sure you will be inundated with questions like this at initial roll out.