bluatigro Posted November 30, 2020 Posted November 30, 2020 (edited) hub = MSHub() mp = MotorPair( 'A' , 'B' ) mp.set_default_spped( 50 ) mp.move( 2 , "rotations' , steering = 0 ) #roations can also be degrees or seconds Edited November 30, 2020 by bluatigro Quote
bluatigro Posted November 30, 2020 Author Posted November 30, 2020 #create objects dist = DistanceSensor( 'E' ) color = ColorSensor( 'F' ) #read examples darkness = color.get_reflected_light() color.wait_for_color( 'red')  dist.wait_for_distance_closer_then( 10 , 'cm' ) hub.moition_sensor.wait_for_new_gesture( 'tapped' ) Quote
Lok24 Posted November 30, 2020 Posted November 30, 2020 Hi I 'm not sure what youe are looking for But yout find lots of descriptions and examples (also transscription from Scratch into python) within the mindstorms software? You click on the "book"-symbol on the most right of the screen.  Quote
bluatigro Posted December 2, 2020 Author Posted December 2, 2020 @lok24 : thanks for the 'book' sugestion i wil look into that Quote
bluatigro Posted December 5, 2020 Author Posted December 5, 2020 i can not find the to python button and the book button Quote
Lok24 Posted December 5, 2020 Posted December 5, 2020 But you showed some python code here? Anyway: In the menu bar you have the home-symbol, an open scratch project and a "+" sign Click on "+", choose python, then you have a python project and the book symbol. Quote
arturomoncadatorres Posted January 5, 2021 Posted January 5, 2021 (edited) I'm currently working on implementing all the 51515 base projects in Python. You can find the code in my GitHub repository. It is work in progress and not all of them are done (far from it - just started with Charlie). However, I plan to keep working on them on my free time. Feel free to take a look around. Feedback is always welcome! Edited January 5, 2021 by arturomoncadatorres Quote
Tcm0 Posted January 5, 2021 Posted January 5, 2021 2 hours ago, arturomoncadatorres said: I'm currently working on implementing all the 51515 base projects in Python. You can find the code in my GitHub repository. It is work in progress and not all of them are done (far from it - just started with Charlie). However, I plan to keep working on them on my free time. Feel free to take a look around. Feedback is always welcome! Why don't you just download the example projects to the hub and then upload them back to the computer with a tool like rshell? With the current mindstorms app version, all scratch programs are stored on the hub in plain python text. Quote
arturomoncadatorres Posted January 5, 2021 Posted January 5, 2021 17 minutes ago, Tcm0 said: Why don't you just download the example projects to the hub and then upload them back to the computer with a tool like rshell? With the current mindstorms app version, all scratch programs are stored on the hub in plain python text. That's interesting, I didn't know that. Originally, I was doing this as a learning exercise (and hopefully to make it useful to other people starting with (Micro)Python). Nevertheless, I might look into this in the future. Thanks! 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.