Learn Python for Mindstorms (LEGO 51515) Part 5: Proportional Line Following

  Рет қаралды 7,883

Creator Academy Australia

Creator Academy Australia

Күн бұрын

Пікірлер: 32
@mrprobotics8283
@mrprobotics8283 3 жыл бұрын
Great work Gary!
@CreatorAcademyAustralia
@CreatorAcademyAustralia 3 жыл бұрын
Thank you! G
@birdofprey108
@birdofprey108 3 жыл бұрын
Amazing lessons, thank you!
@CreatorAcademyAustralia
@CreatorAcademyAustralia 3 жыл бұрын
Glad you enjoyed the video, thanks for watching 😊 Garry
@birdofprey108
@birdofprey108 3 жыл бұрын
@@CreatorAcademyAustralia watched and wrote first python code with your help, thanks a mil!
@jimlewis1
@jimlewis1 2 жыл бұрын
I am not following how the 'start movement motor' command is giving different instructions to the two motors, with only one instruction. (IE the colour sensor value -50). In order to turn I would expect the two motors to receive different speed values as you did earlier in the lesson. Why does python interpret the single value from the sensor as a different speed for each motor?
@CreatorAcademyAustralia
@CreatorAcademyAustralia 2 жыл бұрын
Great question! The parameter in MotorPair.start() accepts a ‘steering’ value between -100 to 100. Zero is no turning, negative is left, positive is right.
@anttibuller1540
@anttibuller1540 Жыл бұрын
@@CreatorAcademyAustralia Should this work with build hat too? I tried motor.start(color.get_reflected_value-()45) and the bot just spins around itself like it doesn't give instructions to other motor. I also tried same command with steering value but nothing changed. I'm using rpi 4 with build hat and robot inventor set. Thank you for your videos :)
@jomero5347
@jomero5347 2 жыл бұрын
I have a question: why dont I have the code-hints in my latest version of the desktop software? btw nice video!
@CreatorAcademyAustralia
@CreatorAcademyAustralia 2 жыл бұрын
Glad you enjoyed it! We are told by LEGO that the feature is removed from the latest version of software because it wasn’t working as expected. I suggest sending LEGO a message to request it return in a future update. Garry
@21bCreations
@21bCreations 3 жыл бұрын
What do I do if I want to be able to find a line of a specified colour and then follow that until I reach a junction where I would then select another line of another colour?
@CreatorAcademyAustralia
@CreatorAcademyAustralia 3 жыл бұрын
Hi! That sounds like it would require a color method called get_rgb_intensity() that will return 3 values as a tuple. Instead of using reflected light intensity, you could adjust the movement based on the 'redness, greenness and blueness' of a line, so that you can follow a particular color. It would be a very specific challenge that would require a specific solution! Garry
@21bCreations
@21bCreations 3 жыл бұрын
@@CreatorAcademyAustralia Thanks very much for the feedback. I will try that out. My idea is to have several different routes and allow the robot to “turn” onto the correct route based on routing information which would be provided in advance. Example being to deliver a drink from the kitchen to different rooms. The routes would cross at junction points. Route would be say black, red, blue and another route would be black, red, brown etc...
@wawjohn
@wawjohn 3 жыл бұрын
I've tried this using green electrician's tape. The darkest value is around 32, the brightest value of the floor tiles is around 55. I use a value of -43. The curious thing is that when the robot follows in a clockwise movement, it follows the path correctly. If I try to run it on counter-clockwise turns, it just moves off the track to the right into la-la land. Since I'm in Belgium, and he's in Australia, it it the Coriolis effect? (just joking)
@CreatorAcademyAustralia
@CreatorAcademyAustralia 3 жыл бұрын
Hi there! That’s strange! I think the Spike model would have this issue because the sensor is off to the side but the 51515 model shouldn’t have this problem, feel free to email me video of this issue so I can investigate further. Garry
@stephenwandzura9940
@stephenwandzura9940 3 жыл бұрын
@@CreatorAcademyAustralia Not strange. The algorithm always follows the left edge. Going around the oval in opposite directions results in a different radius of curvature for the left and right edges. You happened to have chosen the marginal curvature.
@CN-LEGENDARY
@CN-LEGENDARY 3 жыл бұрын
你做的很棒,互相加油!
@CreatorAcademyAustralia
@CreatorAcademyAustralia 3 жыл бұрын
謝謝😊Garry
@rockymountainfacet5958
@rockymountainfacet5958 3 жыл бұрын
At the end of the video. How would you stop a While True: loop with a distance sensor?
@CreatorAcademyAustralia
@CreatorAcademyAustralia 3 жыл бұрын
Hi! If you want to stop a loop, you will need to substitute True with an alternative condition. While True is a forever loop 😊 Garry
@CreatorAcademyAustralia
@CreatorAcademyAustralia 3 жыл бұрын
This vid is for you! Advanced Line Follow: kzbin.info/www/bejne/rpCtoJWFebaKgaM
@rockymountainfacet5958
@rockymountainfacet5958 3 жыл бұрын
@@CreatorAcademyAustralia wow! you are so awesome Garry. Thank you!!
@liudaisy7931
@liudaisy7931 2 жыл бұрын
Im tryin to folow a blu line
@aurel7817
@aurel7817 2 жыл бұрын
hello. thank you for your lessons that I really appreciate! I have a probleme when I use python: I don't understand why when I start typing a na me for example Motor, python doesn't suugest me anything? each time I have to type all the import. Thankyou
@CreatorAcademyAustralia
@CreatorAcademyAustralia 2 жыл бұрын
Hi! A lot of users seem to have this problem, I have tried contacting LEGO but received no responses. I suggest that you try to contact LEGO as well. Garry
@andrewfielden284
@andrewfielden284 2 жыл бұрын
This is fine, but what I'd like to know is how you do things in parallel. For example if I want to control the robot using keyboard input, which is possible using the Scratch interface, how is this done in Python? I tried importing the threading library, and creating a Thread function to do this, but the threading library could not be found.
@CreatorAcademyAustralia
@CreatorAcademyAustralia 2 жыл бұрын
You'll need to code in a way so that the robot always knows what needs to be done in relation to a timer. That way, you can make multiple actions. Garry
@legohouse3422
@legohouse3422 6 ай бұрын
❤😊❤
@liudaisy7931
@liudaisy7931 2 жыл бұрын
uh... how do I follow a blue line then?
@CreatorAcademyAustralia
@CreatorAcademyAustralia 2 жыл бұрын
Hi! the code is the same, just change the reflected light intensity values. Good luck! Garry
@patgamer4567
@patgamer4567 3 жыл бұрын
Noooo i missed it :(
@CreatorAcademyAustralia
@CreatorAcademyAustralia 3 жыл бұрын
It’s ok! Let me know if you have any questions with the lesson, I can still answer here 😁 Garry
Learn Python for Mindstorms (LEGO 51515) Part 6: Accurate Turns with Functions
12:25
Creator Academy Australia
Рет қаралды 4,5 М.
LEGO 51515 Motor Secrets - Accuracy, Speed, Torque, Form Factor
11:10
Accompanying my daughter to practice dance is so annoying #funny #cute#comedy
00:17
Funny daughter's daily life
Рет қаралды 24 МЛН
А я думаю что за звук такой знакомый? 😂😂😂
00:15
Денис Кукояка
Рет қаралды 5 МЛН
3 Generations of Lego Mindstorms Mindcuber Rubiks Cube solving robots
1:53
Proportional Line Follower for EV3 - Follow the Line Smoothly!
7:59
Builderdude35
Рет қаралды 209 М.
LEGO 51515 Distance Sensor - Everything You Must Know
10:14
Builderdude35
Рет қаралды 13 М.
Jason vs The Ultimate LEGO Machine (LuuMa EV3)
2:23
JK Brickworks
Рет қаралды 32 МЛН
FLL Masterclass Part 3: 10 Essential MyBlocks For The Robot Game
15:32
Creator Academy Australia
Рет қаралды 4,2 М.
Accompanying my daughter to practice dance is so annoying #funny #cute#comedy
00:17
Funny daughter's daily life
Рет қаралды 24 МЛН