Это видео недоступно.
Сожалеем об этом.
Learn Python for Mindstorms (LEGO 51515) Part 1: Getting Started Tutorial
HTML-код
- Опубликовано: 17 авг 2024
- Learn how to code in Python for the LEGO Mindstorms Robot Inventor set (51515).
In this introductory lesson, we will give an overview of Python, then code the robot "Tricky" to move and react to obstacles.
In this lesson:
- Python principles
- imports
- creating objects
- move steer method
- distance sensor basics
Be sure to subscribe for more on this series!
To do the same lesson using LEGO SPIKE Prime, check out: • Python for SPIKE Prime...
Looking forward to the next parts. I'd love to see some more complex Python in use. You have a great tutoring style with detailed explanations while keeping focused. Instant subscribe! Keep going, absolutely love it, thanks.
Thanks for your feedback! Glad you enjoyed it :) - Garry
Get ready for another subscriber because are a wonderful teacher and is very clear when you explain things
thank you for making this video I got lego mindstorms for christmas and this video makes it really easy to understand python
No problems! Glad the video helped you out. Happy programming! Garry
I am a 70 year old retired engineer. I bought the 51515 set to give to my 10 year old granddaughter for Christmas. She lives 700 miles from my home. I want to get her interested in coding so I am trying to first make sure I have a grasp of it myself before I give it to her. My problem is that when I execute the part of your code that uses the distance sensor I get a red flashing light on the hub button and then nothing happens . I have double checked the code several time and it seems to be identical to yours. Any suggestions? I really like your teaching style and I'd like continue on with your tutorials.
Hi there! Are you talking about the separate distance sensor video? There is a code update in the description that should fix the error. Let me know if it helps! Garry
Thanks very good and impresive.
Nice Python Tutorial. I'm looking forward for the more advanced and up-to-date methods that allow you to navigate precisely on an FLL Map but I'll start from scratch. It would be nice if you could zoom in on the code next time.
Noted, thanks! I will keep an eye out to make the code more readable. Garry
Nice video!
I just got Mindstorms RI for Christmas.
Looking forward to try your lessons on Python with MS.
I have some experience with Python, but more experience with other languages.
I am curious about better ways to wait for interupt, because I know from experience that wait is usually a command you want to avoid.
Probably you will touch on that in the other lessons 😀
this is a super easy to understand class, thank you very much for it, just bought my mindstorms set and decided to try to learn python to make super cool RCs and... also because python looks really usefull elsewhere, anyway, thank you =)
Great to hear that the video helps! Hope you continue to enjoy Python 😊 Garry
Thanks a lot for this video! It ist very helpfull to switch from SCRATCH to Python, wich is not documentated by LEGO itsself.
Great to hear that the video helps! Thanks for watching. Garry
Nice. Thanks
Thanks for the most awesome tutorials! This is my son's and my first dive into programming. If you see this, do you know any other good resources for beginners starting with the Lego 51515 set? Again, thank you very much!!
Great to hear you and your son enjoying the tutorials! I highly recommend fellow RUclipsr Builderdude35 or Anton’s Mindstorms for inspiring content. Looking forward to making more cool programming videos soon! Thanks for watching 😊 Garry
Great tutorial, thanks.
glad you enjoyed it! Garry
Hi! Great explanations! Looking forward to getting this set for learning python
Thanks! Glad you enjoyed it. Garry
Request: Would appreciate if you can cover micropython programming of the "51515" hub to use TIMER and CLOCK functions so as to start 2 hubs at the same time for synchronised/choreographed movement.
Thanks for your suggestion! Will see what I can do 😊 Garry
Thanks!
Thank you! Glad that you found the video helpful. Garry
Thank you🤗🏆 Greate job 👍🦄👍
Thanks for watching! Garry
Cool series, Wonder if there’s any documentation on how to use the new machine learning feature with python
Unfortunately there isn’t a way to do ML on Mindstorms with Python, but you can use a Raspberry Pi with Build HAT. Check it out here: ruclips.net/video/gnUkqGrTxug/видео.html Garry
@@CreatorAcademyAustralia
Alright, thank you so much !
Thank you for the great tutorial. Is there a dictionary of commands/items somewhere? (i.e. where do you reference terms like "speaker", "beep", "start", "stop", and "wait_for_distance_sensor_closer_than")
Hi! In the app on the right of the python coding area there is a ‘knowledge base’ that includes all the official references and documentation. Garry
Hello, how to do my own library for ev3 Python in vs code? I can't do it at all
make a video where you show were to make the motor
Hi! Check out the next episode :) Garry
Why did you put a slash between movement motors
I like your clear style tutorial, one comment I would like to make is the code text is very small and hard to read, it might be an idea to mention the zoom buttons at the beginning and actually use them yourself.
Thanks for the feedback Dennis! I realised the text was too small after recording the first episode, so later episodes have larger text 😊 Garry
Thank you for this tutorial, very clear and simple. I have one issue when writing in python - I'm not getting the code hints, is it some restriction with the latest app version or is it something wrong with my configuration? Thank you!
Hi! LEGO removed the code hinting features in the latest updates - I highly recommend writing to LEGO if you want the feature to return. Garry
I am having the same issue. Does anyone know how to resolve?
I see the response. I will write to LEGO
Thanks. Keep up the good work.
Thanks for watching! Looking forward to making more of this series :)
Thank you very much
You’re welcome! Garry
I dont seem to be able to find the LEGO windows app for 51515. Is it same as previous mindstorm version ?
You can find it for windows here: www.microsoft.com/en-au/p/lego-mindstorms-robot-inventor/9mtq0n7w1d6x#activetab=pivot:overviewtab Garry
hello I want to send data from ev3 to matlab, in this case the linear and angular velocities of two wheels and receive the data in matlab to use them. any advice or support?
I am working with formation AND tracking problema of Mobile robots.
Hello Garry, Really nice and helpful tutorial. The movements you show in part1, i tried to do them in Blast rodot and it doesn't work. I defined the motors correct, but it doesn't work.
Hi Lam, can you describe what isn’t working? Garry
@@CreatorAcademyAustralia I almost did cope paste your code. I only change the motors, because they were in other gates. I test the Blaster robot now, not the tricky that you did. But I think they should work. Thank you. Lambros.
hello, how can i create a csv data with Python? If i use import csv, i get a error. So i have the question how can i create a csv data with the Lego Mindstorms (515151)?
Hello, I like your video very much, thank you! I work in IT and work with Python on daily basis. Please, is there a list of all the commands and objects/methods/properties I can use for 51515? Do you know any good link? Please.
Hi! There is some good documentation within the mindstorms software in the helper pullout menu on the right of the python coding area, hope that helps 😊 Thanks for watching! Garry
Thanks for the tutorials :) Could you tell me where I can find documentation about how programming in python for Lego Mindstorms Robot Inventor?
Thanks for watching! You can check out the Knowledge Base in the app on the right hand side of the python coding area. Garry
Before I watched this video, I already created Charlie. In every tutorial I've seen, people are only using tricky. Can I use python to code Charlie, or can I only use python for tricky?
Hi! You can definitely use Charlie, but just make sure you change the port letters to match where your motors and sensors are connected. Garry
Is there a way to code it to be controlled by the controller
Hi! At the moment there isn’t a way to program the game controller with Python on the app, but hopefully it will be added soon! Thanks for watching 😁 Garry
Hello can you start building some robots from this lego set
We have some ideas! Can't wait to show you :)
I see you asked the robot to travel 20cm. Though in the Python script there was no code to indicate the diameter/circumference of the wheels. How did the robot know it had traveled 20 cm? Lets assume I build a my own robot using another type of wheels, can I define this so that it still works?
Absolutely, the method is called set_motor_rotation(amount, unit'cm')
This value is set at 17.6 cm by default, which is the circumference of the default wheels in Mindstorms Robot Inventor.
If you have another wheel with 30cm circumference, you'll run:
wheels.set_motor_rotation(30,'cm') after defining your wheels.
You can replace the unit with 'in' if you prefer as well.
To find the documentation in the Robot Inventor program, search for Motor Pairs. Garry
Can you use python for the Mindstorms EV3?
Yes you can! G
Can i conect More than one lego ev3 to phyton?
Hi! You can only connect one hub to ghe computer at a time. Garry
Nice video! Could you help me where can I found the documentation of mindstorm package? I am intersting for the methods and attributes of the classes like motor or distance sensor.
Hi! The only official documentation is the knowledge base on the right hand side of the coding environment. It looks incomplete though. Garry
@@CreatorAcademyAustralia Thanks!
Hi Gary, thanks for uploading this great vid. May I seek your advice on how to enable python in my inventor app - it only takes me to block based interface straight without the prompt you showed that had a selection for the user to select either block based or python based coding. Is there a seperate beta version of this app?
Hi Suhas, did you scroll all the way to the bottom of projects? try to check for an update on the software, if you still don’t see it, I suggest reinstalling or reaching out to LEGO support. Good luck! Garry
@@CreatorAcademyAustralia Actually it prompted for python option when i used File -> New Project from the top menu instead of within the app :-) some bug i suppose. Managed to run your codes, thanks a ton Gary!
Great to hear you got it to work! All the best. G
Thanks for the video! I get no code hinting. Any suggestions why?
Hi! There is a bug that causes some computers to not have code hinting. I suggest sending a message to LEGO to let them know that you also encounter the issue. Garry
@@CreatorAcademyAustralia Thanks a lot for that, information, Garry. It's funny that Lego doesn't seem to know about this bug. I've contacted their support, but didn't get any useful answer.
@@CreatorAcademyAustralia I have no code hinting as well. Tried on two different computers. I've read that with newer app updates the code hinting got broken. Can you verify that code hinting is still working for you on 10.3.0? Thanks
I've built the car but the hub centre button flashes red when I press play on the program , I don't know what the problem is.
Hi! That means there is an error in the code, be sure to check for typos. Garry
thanks
I have a fair bit of experience with Python. Which is the easier of to program with Python, EV3 or Inventor?
Hi Barry! If you have experience with Python, you’ll have no problems with either platform. Garry
@@CreatorAcademyAustralia Thanks
@@CreatorAcademyAustralia How difficult is the set to run either the ev3 or inventor with python?
@@barrytoppings5545 Inventor is easier to set up, but both are similar to run. Garry
which software do I have to download for PC? thanks! :)
Hi! Search for Mindstorms on Windows app store 😊
How do you go backwards in python
Hi! You can see how I do it in the second video. Garry
is there any documentation for the python code ? thanks !
Hi! For the Mindstorms Python code, you can use the knowledge base in the software. For Python in general, you can visit w3schools. Garry
@@CreatorAcademyAustralia ah I need to try and find the knowledge base ! Thanks for the quick reply
Python? Really? I always thinking you can programming Lego with C, C++ or C#.
C, C++ and C# are all completely different languages and you put them in a sentence like that’s no big deal 🤣 All the latest LEGO robotics systems use Python or Scratch. Garry
@@CreatorAcademyAustralia I think Lego use one of them. But, I found more and more micro controllers which use Python.