Boe-bot for arduino roaming with ping on servo turret
S_Flex
Posts: 3
I have been trying to find out why the boe-bot jacks the turret to the left and starts turning in circles to the left. When the boe-bot encounters a corner. If I put an object in front of the sensor while its in its retard turn it snaps out of it and starts to move around like normal. Knowing C++ fairly well I can see in the sketch the author may have had a major lack of concentration because I see a lot of first grader mistakes and "WTF's?".
The bot has all fresh batteries, connections to the circuit are fine and everything works.
I know its programing.
Here is a link to the sketch:
http://learn.parallax.com/project/let-it-roam
I could point out a mass of issues with the sketch but I wanted to see what you all think.
The bot has all fresh batteries, connections to the circuit are fine and everything works.
I know its programing.
Here is a link to the sketch:
http://learn.parallax.com/project/let-it-roam
I could point out a mass of issues with the sketch but I wanted to see what you all think.
Comments
const int elements = sizeof(sequence);
It should be
const int elements sizeof(sequence) / sizeof(int);
But that shouldn't cause the problem you describe which is likely in the findOpening function. I imagine it does what you've seen because the greatest free space is always to the left. When you put an object in the path it snaps out of that mode and starts going straight.
1) The code does not use any C++ Best Practices!
2) The documentation does not explain what the code actually does.
3) The code is overly complex for the simple tasks it has to do.
4) There is no proper support or CVS for this code
I don't want to rip into parallax to much even though its to easy for this issue. It is extremely disappointing to see a product named "Board of Education" and find a code like this associated with it.
In the arduino tutorial for the maneuver() function please explain what a negative one to delay() will do! No that isn't part of this issue, but a big part of not understanding what was programed.
I'm not sorry if I was to blatantly honest, but if this company wants to make money please rethink what your doing and remember the customer can make or brake you!
Did you send an email?
I just wanted to point out a few things that people will look for if you ever think about using C++.
After dealing with this issue I personally have no confidence in parallax and its community. I don't care if you fix the code or clean it up, it doesn't matter anymore. I'm over it!
I think you are judging Andy Lindsay a bit harshly by forming your opinion over one piece of code. Andy and Stephanie have created a mountainous body of sound educational materials for the Propeller over the years, all of which is solid material. Instead of posting public criticism which doesn't really solve the issues, avail yourself of the provided email address and report the issues which you feel are problematic. You'll find Andy to be inviting of the exchange and you'll help others who may come behind you with improvements and perhaps better code. All of the employees are approachable and happy to solve issues.
Jeff
1) The code does not use any C++ Best Practices!
See the libraries page for interfacing with particular types of hardware. Try the list of community-contributed code. The Arduino language is based on C/C++. It links against AVR Libc and allows the use of any of its functions; see its user manual for details.
2) The documentation does not explain what the code actually does.
Examples:
3) The code is overly complex for the simple tasks it has to do.
4) There is no proper support or CVS for this code.
And, although not a direct answer to "please explain what a negative one to delay() will do", the following expresses what "-1" signifies to the maneuver(int,int,int) method. BTW: delay(int milliseconds) is an Ardiuino library method which is described at: http://arduino.cc/en/Reference/Delay. You may want to wander-over to the Arduino forums to ask what a negative parameter would mean for delay(). The delay() parameter is documented as an "unsigned int" so a "-1" could represent a very long delay...
You've made some valid points and it would be great to have them addressed! But I think you've been a bit harsh on Parallax support. Perhaps you just needed to vent a bit...
dgately
That's really a bit of marketing talk. Arduino sketches really are C++ and the tool chain works fine with C++ code, as well as third party robotics class libraries.
However, I agree the original poster was being a bit hard on Andy and Parallax. I would always prefer to have code I can improve now versus the promise of perfect code in the future. Besides, the BOE Shield is a hardware solution to allow the Arduino to be used with a BOE-bot. It doesn't require the use of Andy's code, and there's tons of Arduino, Ping))), and servo samples out there.