Coder Shah Posted October 29, 2020 Posted October 29, 2020 (edited) Playlist: https://www.youtube.com/playlist?list=PLEtUplstSD6LBUDmrVRkfnH_kOBNbNsk0 Lesson 0: First program https://www.youtube.com/watch?v=YZapOCc3gI0 Lesson 1: Straight move https://www.youtube.com/watch?v=rloifkSs5g4 Lesson 2: Making turns https://www.youtube.com/watch?v=DH93AuYIz3U Lesson 3: Moving objects https://www.youtube.com/watch?v=mSs55CmwNeg Lesson 4: Stop at object https://www.youtube.com/watch?v=dG9XswdQ2UA Lesson 5: Stop at color https://www.youtube.com/watch?v=k2gg6YM4VaU Lesson 6: Stop when tapped https://www.youtube.com/watch?v=PPPROV9zZdY Lesson 7: Loops https://www.youtube.com/watch?v=XHTElkzA3uY Lesson 8: If-else https://www.youtube.com/watch?v=pIo3B96K-yk Edited November 7, 2020 by Coder Shah Added additional videos Quote
Jim Posted October 29, 2020 Posted October 29, 2020 I really like these tutorials! Keep 'm coming! Quote
Coder Shah Posted October 29, 2020 Author Posted October 29, 2020 Thanks @Jim and @JintaiZ, glad you liked them! I've made a YouTube playlist and a second video showing how to create a Micropython program using the current version of the Robot Inventor app. Have edited the first post to include both. The code for each program will be in the video description. As I do more videos, I'll just add them as replies in this thread. Quote
m3eu Posted October 30, 2020 Posted October 30, 2020 21 hours ago, JintaiZ said: Very useful, keep them coming! +1 Quote
Coder Shah Posted November 7, 2020 Author Posted November 7, 2020 Just added some new videos to the playlist and updated the original post. Quote
howitzer Posted November 8, 2020 Posted November 8, 2020 Ooh, I will have to watch these, as I bought 51515 just today. Quote
Sam123 Posted December 14, 2020 Posted December 14, 2020 Hey Shah I am programming a 51515, M.V.P for the past few days I have been attempting to code a program for the 51515 that detects when the wheels are starting to drift off course and correct them. Do you have any tips on this? I am stumped. Quote
Coder Shah Posted December 15, 2020 Author Posted December 15, 2020 3 hours ago, Sam123 said: Hey Shah I am programming a 51515, M.V.P for the past few days I have been attempting to code a program for the 51515 that detects when the wheels are starting to drift off course and correct them. Do you have any tips on this? I am stumped. Sorry, don't have any ideas off the top of my head. Perhaps you can try going through the tutorials at https://primelessons.org/en/Lessons.html Quote
Gelo Posted December 25, 2020 Posted December 25, 2020 Thank you for the tutorial! Do you know how to start 4 motors at the same time? Unfortunately I just found the "motor_pair" to control 2 motors.. motor_pair = MotorPair('A', 'B') Quote
Coder Shah Posted December 25, 2020 Author Posted December 25, 2020 2 hours ago, Gelo said: Do you know how to start 4 motors at the same time? Not at the moment, sorry! Quote
bobcubsfan Posted December 26, 2020 Posted December 26, 2020 I wonder what would happen if you made a "super" variable. motor_pair = MotorPair('A', 'B') motor_pair2 = MotorPair('C, 'D') my_motors = motor_pair + motor_pair2 Quote
Gelo Posted December 26, 2020 Posted December 26, 2020 Thank you! I tried with the "super" variable but unfortunately it does not work. (TypeError) Actually I just want to code in Python that Gelo walks.. Quote
Mr Jos Posted December 26, 2020 Posted December 26, 2020 Can't you just add , wait=False like with the EV3 to start all motors in row? In python for EV3 it's like; motor_a.run(600, wait=False) motor_b.run(600, wait=False) motor_c.run(600, wait=False) motor_d.run(600, wait=False) If running for some angle; MotorA.run_angle(600, 90, wait=False) and then last motor , wait=True for the program to wait untill it's finished. Quote
bobcubsfan Posted December 26, 2020 Posted December 26, 2020 maybe the syntax is wrong. my_motors = (motor_pair,motor_pair2) Just vamping. It would be very cool to get Gelo to walk. I saw a youtube where a builder made his own robot and got it to walk. Quote
Coder Shah Posted December 30, 2020 Author Posted December 30, 2020 On 12/26/2020 at 6:38 PM, Gelo said: Thank you! I tried with the "super" variable but unfortunately it does not work. (TypeError) Actually I just want to code in Python that Gelo walks.. You can check out @David Lechner's post in this topic: Quote
sunspot Posted December 30, 2020 Posted December 30, 2020 (edited) On 12/14/2020 at 5:23 PM, Sam123 said: Hey Shah I am programming a 51515, M.V.P for the past few days I have been attempting to code a program for the 51515 that detects when the wheels are starting to drift off course and correct them. Do you have any tips on this? I am stumped. How about using yaw? I've only used word blocks, but I know you can access and test the yaw of the 6-axis accelerometer in the P-brick. You could set yaw to zero when it starts going, and then continually test for yaw going out of range -5 to 5 (or whatever). Figuring out how to adjust the motor speed to compensate is left as an exercise to the reader :) ... Edited later: I was intrigued and tried it out. Using word blocks it's even easier than I thought, by adapting Tricky's line-following code, like this: first Set yaw to zero, then inside a repeat loop or other loop Start moving 2x(0-yaw) ; then outside the loop again Stop moving. Edited January 1, 2021 by sunspot added code example Quote
Pellewalle Posted January 16, 2021 Posted January 16, 2021 I’m looking for angle sensors for mindstorms that I can read from python. Do you have some proposals of angle sensors (rotational) and some belonging python scipt? i know that I can use the angle information from motors but the motor it self requires some force to rotate and I don´t want to use that in project. Thank you very much Quote
bobcubsfan Posted January 16, 2021 Posted January 16, 2021 So, you don't want to rotate the motors? Quote
Pellewalle Posted January 16, 2021 Posted January 16, 2021 I want a rotational sensor with very low friction and therefor I don’t want to use a motor as sensor. Quote
sunspot Posted January 19, 2021 Posted January 19, 2021 On 1/16/2021 at 12:56 PM, Pellewalle said: I want a rotational sensor with very low friction and therefor I don’t want to use a motor as sensor. @PellewalleBrainstorming a few ideas, maybe one of them might give you the seed of the solution to your problem. These have various tradeoffs between bulk and precision, so I don't know if any works for you. (1) The hub detects its own yaw. If the thing you're rotating can include the hub itself, rotating on a low-friction turntable, you could read the yaw to use in your program. (2) you could convert the rotation of what you want to rotate to linear motion using a pinion gear on the axle of rotation and a rack or set of tread links, or using a pulley or whatever rotational-to-translational mechanism you like, and then use the distance sensor. (3) the thing you rotate could include a multi-colored disk or platform and you could use the color sensor to determine which zone is close to it, if you only need a few discreet rotational zones, like a game spinner. (4) or the thing you rotate could be a colored beam and after you set it (without using the motor), you then use a motor to spin a separate beam with the color sensor on it, in a parallel plane with a colinear axle, use the color sensor to find the colored beam, and the motor's positional sensor to tell you the angle required to find the beam. Quote
Pellewalle Posted January 19, 2021 Posted January 19, 2021 Hi, thank you for bringing in ideas. I have built a test bench for a vehicle chassis. In this model I cannot use the hub itself since I need to measure rotation angle with high (0.5-1 degree) precision to be able to examine some technical things, like how much play/rattle/delay it is in the drive line. I have found a angle sensor from mindsensors.com but I haven’t got any information from them conserning support for python. Maybe you have some proposal with this type of sensor? Quote
malvinas2 Posted January 24, 2021 Posted January 24, 2021 eThank you @Coder Shah for the YouTube-Videos. But is there anything available like an old-school documentation (pdf?) regarding Python and Mindstorms 51515 ? The online-help is a piece of crap.... I hoped I could find pdf or windows-help-documents within the app-directory, but the only thing inside of it is a 500 MB big .exe-file.... hahaha. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.