Wow loops

i’m using wow loops to program precise turning and driving straight
it seems when it turns it is fighting against it self

Absolutely no idea what you are talking about - “Wow loops” was never taught in my epoch - please elaborate.

5 Likes

Would you like to elaborate on what a wow loop is?

4 Likes

Do you mean mean while loops? I do know what you mean by wow loops, maybe send a pic of the code?

i cant explain it but i will leave videos [here]

Maybe it would help to send your code, and not someone else’s?

3 Likes

I ran into the same problem when I first programmed an inertial and I fixed the problem by changing any while parts, that was already under one while statement, into if or else if statements. I use c++ so I’m not sure if that’ll fix your problem (assuming that you’re using blocks.) Also, it would help if you show what you have, so others can try to help too.

Sounds really advance and cutting edge… think we need to be in the god-level of James Pearman to know what it is…

Looking at the video - looks like it is some form of PID?

1 Like

Seems like you might have misheard ‘while loop’ as ‘wow loop’. Nevertheless, without any pictures of your code, there isn’t much that can be done to figure out the issue.

2 Likes

swipe left on the photo

Try watching the caution tape tutorials a bit more carefully. This code doesn’t look like it will do what you want, because you have “spin for x degrees” blocks within a “wow” loop.

1 Like

it still did the same thing when i copied the girls code. should i leave a video to show what the robot is doing? i feel like i’m being misunderstood sorry this is my first time on the app

Caution Tape has put out a very good P-loop (the first leg of PID) code for driving straight.

You will notice at 8:23 in the video, they superimpose corrections to the + and - of the left and right motor velocity. This may be reversed for your robot wiring/direction.

To test, you should put in a very long distance to travel on a zero degree heading with 50% speed. Push the go button and then physically pick up your robot. The wheels should be spinning. If you twist away from 0 degree heading, the wheels will spin at different rates of speed trying to get back on line. The ‘outside’ wheels relative to your heading should be spinning fast and the “inside” wheels should be spinning slow. If the wheels are spinning opposite of what is needed to correct the robot heading, then you need to make adjustments to the +/- values.

Also, it is important if you are going to use this code you should have a deep understanding of it as if it is your own. It is OK to learn from someone and truly learn it. Just blindly copying it and hoping it works would violate the concept of the robot (and programming) being at the level of the team competing. It should be your work!