"Perfect" Turns: Turning by the Gyro - FIRST LEGO League (FLL) SPIKE Prime + EV3 RePlay Programming

  Рет қаралды 69,533

Zachary Trautwein

Zachary Trautwein

Күн бұрын

Пікірлер: 100
@finimcglinchey5813
@finimcglinchey5813 Жыл бұрын
Great video! I appreciate your adding a way to dial in a turn. For those whose counter rotate turn (the turn here) still does not work, try adding a "wait" quarter-second, after the "set yaw to 0" before the "start moving for" block. It seems to slow the program down and give the Gyro a chance to take a measurement. We are experimenting with how short a time the gyro needs, but .25 works.
@singlegoaltv3720
@singlegoaltv3720 2 жыл бұрын
I have the same results, though I omitted the second block in your function. I simply used movements on both wheels with respective speeds. I didn’t use the math block you suggested but it works fine. Thanks you soo much😊
@coachkc2565
@coachkc2565 4 жыл бұрын
Sweet!!!! This is SO much easier than what I was doing using greater than or less than! Can’t wait to play with it and teach the kids! Thanks!!!!
@ZacharyTrautwein
@ZacharyTrautwein 4 жыл бұрын
No problem, KC!!!
@priyanka2309
@priyanka2309 3 жыл бұрын
This my first time FLL with spike prime, you are wealth of resource, do you take online classes?
@rays_robotics374
@rays_robotics374 3 жыл бұрын
Interesting. I believe you need to add that this will not work for turns greater than 180 as the gyro normalizes the yaw angle (angle is between -179 and 180).
@willisbeaumont6149
@willisbeaumont6149 2 ай бұрын
For turns greater then 180 degrees you can use the negative turn to go in the other direction still giving you a full 360 degree area like you stated the gyro knows 180 to -179
@HexhamFoodCo
@HexhamFoodCo 4 жыл бұрын
Nice introduction, we do not have prime sets yet. The sensors on prime seem far better. My teams had to develop elaborate software to accelerate and decelerate to a turn then have an extra feedback loop to add a correction in reverse in case it accidentally overshot. It all worked well but when compiling the software in a program scheduler often scrambled the ev3 brain
@ZacharyTrautwein
@ZacharyTrautwein 4 жыл бұрын
Ah, yeah the gyro improved quite a bit in the SPIKE. Clever solution, though, with the EV3’s!
@davidpaulsen1510
@davidpaulsen1510 3 жыл бұрын
Paul we had the same problem 1 make sure you are running educational software or "public software" on the brick and program ,the two are not compatible. 2)check to see if your block programs are on your program,we had this problem pop up when exporting programs between computers.3) don't mess with an EV3 while it's still in boot mode( red light)wait for chime we've locked bricks doing this .
@steelyray
@steelyray 2 жыл бұрын
So I've discovered that the yaw sensors for these hubs are just not that great sometimes. If you rotate the hub 360 degrees and align it back to where you start, the yaw can be off by as much as 10 degrees for some units.
@robertcameronjones
@robertcameronjones Жыл бұрын
This was a huge problem on EV3. I have seen Spike primes performing quite well, without much drift.
@gilkalbfeld1384
@gilkalbfeld1384 3 жыл бұрын
Can you please make a build video of the bench attachments
@ciaranmcdonagh1630
@ciaranmcdonagh1630 2 жыл бұрын
In the case of the mindstorms ev3, is there an equivalent command in scratch to set the yaw angle of the gyroscope to zero degrees. In the case of the mindstorms ev3, how do you get the scratch commands in green that you used to set the robot to turn by 90 degrees or whatever angle that you set.
@davidjambrina9757
@davidjambrina9757 3 жыл бұрын
Thanks a million for al your videos and advices. All of them have been really useful for me and my team. We have learnt a lot from you. Thanks again for sharing your knowledge.
@ZacharyTrautwein
@ZacharyTrautwein 3 жыл бұрын
You’re so welcome!
@markhartman3786
@markhartman3786 2 жыл бұрын
Saw an interesting change in performance of the turn by gyro code based on running code in streaming mode Vs download mode. We are using advanced base and saw the offset needed to be 13 degrees when streaming and 4 degrees when downloaded. Speculating the rate at which yaw is sampled or the rate of executing the stop movement is the source of difference. Have you seen this change in behavior?
@theonidimopoulou7514
@theonidimopoulou7514 3 жыл бұрын
Hello from Greece. I copied your program and actually did everything you did but the robot ignored it and didn't make a turn at all! Any ideas what the problem could be?
@pequodexpress
@pequodexpress Жыл бұрын
Has a third party made an improved gyro sensor for the EV3?
@dskddmdlim1316
@dskddmdlim1316 3 жыл бұрын
Thanks for the code, it has been very helpful! I have 2 questions though; don't we have to do a set movement motors to port x+y in the beginning so that we can identify which motors will be used to execute the code? Also, will the equation be more accurate if we use "wait until abs of yaw angle = abs of degrees", so that we can achieve the exact degreed of rotation?
@steelyray
@steelyray 2 жыл бұрын
With as slow as the processor is sampling, it may miss the exact equal number and then never stop. Using > is better.
@gilkalbfeld1384
@gilkalbfeld1384 3 жыл бұрын
this is a great video
@ZacharyTrautwein
@ZacharyTrautwein 3 жыл бұрын
Thanks!
@pcshopny
@pcshopny 9 ай бұрын
Tried this but did not work for me. Turn 45 goes to 90. Any reason why??
@danc1512
@danc1512 4 жыл бұрын
Thank you, thank you from this coach. My son enjoys your teaching style. Our Spike needed a set movement motors due to multiple motors. Could you suggest a means to tighten the myblock? Looking forward to tackling acceleration next. Thanks Zachary.
@ZacharyTrautwein
@ZacharyTrautwein 4 жыл бұрын
Sorry, not sure if I understand....Do you mean tighten the turn?
@danc1512
@danc1512 4 жыл бұрын
@@ZacharyTrautwein We used TurnByDegress of 90%. Out bot seems to be constantly off by 12% requiring an input of 78% to complete a 90 degree turn. Is there a means to reduce or fine tune % difference? We confirmed the yaw was 0% at the start. Our code is identical to your example with the exception of adding a set motor movement block. Thanks you for the great lessons.
@ZacharyTrautwein
@ZacharyTrautwein 4 жыл бұрын
Dan C interesting! My first question would be is the hub firmware updated. If so, maybe a factory reset of the hub would fix it?
@pequodexpress
@pequodexpress Жыл бұрын
Is this software Scratch, or is it another language made to look like Scratch? I've seen others refer to this platform as MicroPython, which I thought was more conventional line coding.
@nicecool123
@nicecool123 8 ай бұрын
no is it spike lego education
@markbowen4728
@markbowen4728 2 жыл бұрын
Awesome Gyro turn code - - Thanks!! I've got a continuing problem with my Spike Prime App. It is refusing to open most of my projects now.. When I click on one of my prewritten projects I get the following popup: "Heads Up - Could not open project" At this point it appears that project can never be opened again. All my existing Projects are involved. The projects are written in Spike Prime Word Blocks code. My OS is Windows 10. My version of the Spike App was downloaded only about a month ago. Any idea what is causing this and how to avoid this problem?
@TeamPhoenix-v4t
@TeamPhoenix-v4t 10 ай бұрын
Amazing video! I appreciate you spending time on this video, but I find something unclear. What is in that box at the very end in the "wait until"? We are trying gyro now and it's kind of unclear.
@TeamPhoenix-v4t
@TeamPhoenix-v4t 10 ай бұрын
like what symbol is that and how do you get it?
@TeamPhoenix-v4t
@TeamPhoenix-v4t 10 ай бұрын
everything is just very blurry.
@robinlthornton2077
@robinlthornton2077 3 жыл бұрын
Hi what video editing software do you use for managing the camera angles and overlaying for the video?
@ZacharyTrautwein
@ZacharyTrautwein 3 жыл бұрын
Hi! I use Final Cut Pro, and QuickTime to record me computer screen.
@BehindtheCache
@BehindtheCache 3 жыл бұрын
How did you make the block that has the oval degrees ? Example (start movement at 10* degrees/abs of degrees) how did you get the degrees. I made the rest of the code but that part isn’t working. Please help
@ZacharyTrautwein
@ZacharyTrautwein 3 жыл бұрын
Hi! When you make the “my block” you need to add an input to it 👍🏻
@BehindtheCache
@BehindtheCache 3 жыл бұрын
@@ZacharyTrautwein thank you I did do it correctly. I was not doing this on the FLL mat and I had to increase the move from 10 and -10 to 20 or higher to get it to turn. I noticed it was trying to turn but wasn’t. I heard a high pitched noice. Thanks for the videos it is helping us get up to speed for this years FLL that my kids are in This is our first year.
@ZacharyTrautwein
@ZacharyTrautwein 3 жыл бұрын
@@BehindtheCache my pleasure!!
@ZacharyTrautwein
@ZacharyTrautwein 3 жыл бұрын
I think I may have miss understood your question... when you create the function with the input “degrees” you can drag that degrees down out of the large level red function block.
@BehindtheCache
@BehindtheCache 3 жыл бұрын
@@ZacharyTrautwein thanks yeah I figured that out by accident. It was more of not giving the motors the power to get them to move. Can’t wait to see more of your videos. Wish my kids had a STEM teacher like you.
@8520amos
@8520amos Жыл бұрын
the line that states at start moving at...
@КатеринаГунчак-с1р
@КатеринаГунчак-с1р 2 жыл бұрын
thank you very much
@NikkiandAndyBell
@NikkiandAndyBell 3 жыл бұрын
This is so helpful!
@ZacharyTrautwein
@ZacharyTrautwein 3 жыл бұрын
Great to hear!!
@rammaddirala6857
@rammaddirala6857 3 жыл бұрын
Hello Mr.Zach We were able get to the state level tournament because of the tips you gave us. Where do you get that adapter to put the wait until
@rammaddirala6857
@rammaddirala6857 3 жыл бұрын
Or what I actually meant was how do you put the circular block that says abs of yaw * abs of degrees in the wait until block
@rammaddirala6857
@rammaddirala6857 3 жыл бұрын
No need sir I found out how I need to do it
@ZacharyTrautwein
@ZacharyTrautwein 3 жыл бұрын
Hey! That’s AWESOME!!! Good luck at the state championship!! What state?
@rammaddirala6857
@rammaddirala6857 3 жыл бұрын
@@ZacharyTrautwein Minnesota : )
@ZacharyTrautwein
@ZacharyTrautwein 3 жыл бұрын
Fantastic!!
@8520amos
@8520amos Жыл бұрын
Hi can you explain more about the cod
@ginarauscher7874
@ginarauscher7874 11 ай бұрын
Great video, it was very helpful. We are trying to build the code but we don't seem to have the same starting movement code as you have on your screen. My daughter and I were able to build the operating code but we can't find movement code to drop in to operating codes. Our closest movement block reads" Set Movement Speed (Blank) %. Where as the one you show is Start Moving at (blank) % of Speed. Any suggestions where to find the same code as you have or create it? Thank you!
@willisbeaumont6149
@willisbeaumont6149 2 ай бұрын
When in the spike prime coding interface, in the bottom left there should be a icon with two blocks and a plus sign. If you click that it will show some extension blocks and in that screen there should be one called more movement. Then just click the little white circle in the top right of that icon to add it and it should then be added to your block list. I'm not sure how helpful this will be as it is 8 months later but hope it helps (:
@steelyray
@steelyray 2 жыл бұрын
Is there a way to do this without resetting the yaw to 0 for every turn and keep the code fairly clean?
@ZacharyTrautwein
@ZacharyTrautwein 2 жыл бұрын
Hi! So, using the “My Block” function allows you to only reset the Yaw on time the entire code. Each time you turn you just drag out the red block you created and then insert the degrees you want to turn and you’re good! No need for the code to be messy!
@steelyray
@steelyray 2 жыл бұрын
@@ZacharyTrautwein No, I get that. I just don't want to keep accumulating small errors by having it reset each turn and instead would want it to reset only once at the beginning. I hope that makes sense?
@satyamappadwedula5007
@satyamappadwedula5007 10 ай бұрын
Thanks for your videos. Really cool. It seems like my kids are having issues with missing turns. First TurnByGyro works. Then if we have a drive straight or something and another TurnByGyro, then straight again, it seems like its doing a turn, straight and straight again instead of turning between straight moves. Any idea why this might be happening? Hope we get a response asap. Also how do we turn at faster speed?
@willisbeaumont6149
@willisbeaumont6149 2 ай бұрын
Hey I am very unqualified to try to help with this as I am a competitor who has never attempted this code before but maybe adding a pause between set yaw to 0 and start moving at could give the gyro time to calibrate and make the second turn and as for speed I honestly have no clue since i've never tried it before but maybe trial and error with the start move percentage with 10 and -10 you could try different ratios like 15 and -15 P.S. I hope this helps but again I am unsure and just trying my best while not having access to my spike prime
@Fungames91Official
@Fungames91Official Жыл бұрын
anyone find this a reference to scratch?
@meestermichiel4614
@meestermichiel4614 2 жыл бұрын
Thanks for this very informative video! I made the code like you showed in this video. Also made the block turnbygyro en added an input called Degrees. But nothing really happens? Do i have to specify somewhere what degrees means in relation to the gyro/yawn? I feel like I'm missing something... Hoping for an anwer :-) Greeting!
@meestermichiel4614
@meestermichiel4614 2 жыл бұрын
Ow it worked, no need for an anwser! hehe
@ZacharyTrautwein
@ZacharyTrautwein 2 жыл бұрын
Good!!! Glad to hear it!
@usamealtntas7983
@usamealtntas7983 2 жыл бұрын
How did you solve the problem?
@razerclaww7210
@razerclaww7210 3 жыл бұрын
Hey I have a question. Will the Yaw be different from time to time, if you choose to have your robot start different places each time you do a mission. Lets say one time I do the bench mission, and then the next step counter, will they yaw be different, because of the start placement? Hope it makes sense.
@razerclaww7210
@razerclaww7210 3 жыл бұрын
What I am meaning, do I need to have two different myblocks for the start placement.
@ZacharyTrautwein
@ZacharyTrautwein 3 жыл бұрын
Great question. Nope you don’t. In the actual “my block” code the yaw resets before the robot ever starts to turn.
@razerclaww7210
@razerclaww7210 3 жыл бұрын
@@ZacharyTrautwein ohh okay i didn't notice that, thanks.
@homer5570
@homer5570 2 жыл бұрын
adamsın reis seviliyorsun
@IvanRamirez-fx5zi
@IvanRamirez-fx5zi 2 жыл бұрын
New to FLL. How do you add the red degrees inside green operator?Thanks.
@ZacharyTrautwein
@ZacharyTrautwein 2 жыл бұрын
Hi! You just drag it from where it says “degrees” in the large red block at the top. Just click and drag it down!
@carrinebuitrago7037
@carrinebuitrago7037 2 жыл бұрын
Did you ever figure this out, I read his response and still don't see it.
@georgekatsanis1042
@georgekatsanis1042 Жыл бұрын
My hub gyro has inconsistent transitions from positive to negative yaw angle output. It sometimes flips yaw polarity at 180, as it should. But sometimes it switches at random angles, for example 0 to 220 then -140 to 0. Next it might be 0 to 30 then -330 to 0. The erratic gyro yaw output makes yaw turn control unreliable. Any tips for correcting this?
@ZacharyTrautwein
@ZacharyTrautwein Жыл бұрын
My first question would be is your hub up to date?
@timdunnink9089
@timdunnink9089 3 жыл бұрын
What program did you use for this?
@ZacharyTrautwein
@ZacharyTrautwein 3 жыл бұрын
Hi! I used LEGO EDUCATION’s SPIKE Prime programming environment.
@raghadal_khateeb4732
@raghadal_khateeb4732 4 жыл бұрын
Why can't I work on the old software? !! I do not like this software, just as the previous software is more practical for the EV3 .. Please answer me because I am in trouble!!
@ZacharyTrautwein
@ZacharyTrautwein 4 жыл бұрын
Unfortunately, the old EV3 software is no longer supported.
@raghadal_khateeb4732
@raghadal_khateeb4732 4 жыл бұрын
@@ZacharyTrautwein What bad luck !! I got ready during the summer vacation and managed it a lot ... I did not like the new program and it is not practical like the old .. I do not know what to do, but it remains for you to provide us with information about it !! ..
@razerclaww7210
@razerclaww7210 3 жыл бұрын
Again quick question, where do I find the red "Degrees" that is the in green area, I can't seem to find it.
@ZacharyTrautwein
@ZacharyTrautwein 3 жыл бұрын
You have to click and drag the "degrees" from the large My Block at the top of that specific script.
@carrinebuitrago7037
@carrinebuitrago7037 2 жыл бұрын
Did you ever figure this out? I can't find it either.
@carrinebuitrago7037
@carrinebuitrago7037 2 жыл бұрын
I finally figured it out. You have to create the degrees button when you click on make a block, then you click on add an input and type in degrees. This allows you to drag it down into your code.
@angiemelville2823
@angiemelville2823 4 жыл бұрын
How do you make the my block appear in every project? Do you have to copy the program for every project?
@ZacharyTrautwein
@ZacharyTrautwein 4 жыл бұрын
Ah, great question!!! So I should make a video about this! However, what I’ve been doing is I made one project with the MyBlock and line following code in it and saved it as “Skeleton Code”. Every time I or my students start a new project, Instead of clicking the plus sign we: -go to file > open - find the skeleton code in the document folder (or wherever it is saved) - right click and duplicated - then open the copy, - rename it and code on it! Does that make sense?
@angiemelville2823
@angiemelville2823 4 жыл бұрын
Thank you! - from FLL Team Apollo, NSW Australia
@kenolsson4273
@kenolsson4273 3 жыл бұрын
Hi can you explain how it moves without a set movement? speed
@ZacharyTrautwein
@ZacharyTrautwein 3 жыл бұрын
Not sure what you mean...?
@kwilesvolleyball2028
@kwilesvolleyball2028 3 жыл бұрын
i think the set movement is one rotation at the beginning
@vesrola
@vesrola 2 жыл бұрын
mivi pat your head
@sondrejakobsen7640
@sondrejakobsen7640 4 жыл бұрын
Can u make it downloadable
@ZacharyTrautwein
@ZacharyTrautwein 4 жыл бұрын
I do not think that I will....BUT.... watch out for a FLL Hacks video on Friday. In that video I'll show you how you only have to make in once!!! (along with some other cool stuff)
@Kevin-vk4fz
@Kevin-vk4fz 3 жыл бұрын
hi
@ruanroy5586
@ruanroy5586 4 жыл бұрын
FIRST!!!
@mail2jaincharu
@mail2jaincharu 2 жыл бұрын
you are scamming
Turn any angle with My Blocks and Variables: Gyro controlled turns part 2
8:06
Minecraft Creeper Family is back! #minecraft #funny #memes
00:26
iPhone or Chocolate??
00:16
Hungry FAM
Рет қаралды 33 МЛН
Program Accurate 90 Degree Gyro Turns With LEGO MINDSTORMS 51515
9:06
FLL SUBMERGED 620 Point MAX RUN | FIRST LEGO League
3:15
NxtGen Robotics
Рет қаралды 35 М.
Precise Gyro Turn Programming with Spike Prime Word Blocks
9:25
6006 Tech Warriors
Рет қаралды 1,7 М.
Line Following: FIRST LEGO League SPIKE Prime and EV3 Replay Coding
6:51
Zachary Trautwein
Рет қаралды 75 М.
Spike Prime Gyro Controlled Turns Part 1
8:43
Gibford's Robot Lab
Рет қаралды 29 М.
FLL Masterclass Part 1: Robot Design By A Championship Coach
9:32
Creator Academy Australia
Рет қаралды 7 М.