great video for a teacher looking to move on from coding blocks
@BeattyRobotics Жыл бұрын
Hey there. The new version of spike 3.3.0 got released a few days ago! Python is fully implemented again. Also love how they added the code completion prompts!
@CreatorAcademyAustralia Жыл бұрын
I took too long to edit! Thanks for letting me know! Garry
@patriciarector79642 ай бұрын
Thanks!
@CreatorAcademyAustralia2 ай бұрын
You’re welcome! Garry
@Tomboly Жыл бұрын
9:38 I prefer to import the Time library: import time. and for the time library I import sleep: from time import sleep. And with this library I prefer to use it to wait with this library like this : time.sleep(seconds I want to wait).
@bruhanti39293 ай бұрын
Works very well
@thomaskessler59248 ай бұрын
Great explanations, pace of content and examples. Well done!
@CreatorAcademyAustralia8 ай бұрын
Glad you liked it! Thanks for watching. Garry
@Moin16211 ай бұрын
Hi! I have some problems with the HOLD, COAST, and BRAKE command. When i try to implement it in my program it says this: AttributeError: 'module' object has no attribute 'HOLD' Do you know what causes this and how I can avoid it?
@Randomperson04677 ай бұрын
I used a comma instead of a period that made it pop up
@lian92767 ай бұрын
Great video, thanks! I'm having issues with the stop commands, at "stop=motor_pair.COAST," it gives me the error "COAST: Unknown. 'COAST' is not a known member of module." Same goes for .BRAKE and . HOLD. Any ideas?
@tangojunky5 ай бұрын
me too! Did you find any solutions on that?
@lian92765 ай бұрын
@@tangojunky Sadly, no. The competition was coming up quick, so my robotics partner forced me to switch to word blocks so we would have functional code. If I had more time, I would've loved to try and fix it.
@tangojunky5 ай бұрын
@@lian9276 try stop=motor.COAST It works
@rockymountainfacet5958 Жыл бұрын
Did they change the way python works in Spike prime 3. I am still using the legacy software. Some of the way you write the code in this tutorial is different than past videos. I always love your videos. Thanks so much for the work you do.
@CreatorAcademyAustralia Жыл бұрын
Yes! It is completely different to before, it is more complex but also has more control. Thanks for watching! Garry
@rockymountainfacet5958 Жыл бұрын
@@CreatorAcademyAustralia Thank you! I think you sold me on updating from legacy.
@haidonghuang8552 Жыл бұрын
How does the robot know the velocity and acceleration? Does it use gyro to compute that? If the robot is not moving as fast as the acceleration and speed specify in the function, does it increase the power output and check the speed in a feedback loop?
@tangojunky5 ай бұрын
Hi there! Great Job in this video. I am having trouble using the stop=motor_pair.HOLD or COAST / brake , command. Can you help me with that? Is there an alternative way through, to use the HOLD / COAST options?
@irenewithwonder5 ай бұрын
Hi! I`m also working on this now. After the update it seems that these attributes work only with MOTOR, not motor_pair as before. (stop=motor. COAST //not sure if its the same thing as in video,tho//)
@nobiasplease Жыл бұрын
Is there a reference document (just the libraries, classes, methods etc) somewhere for 3.x? I looked around and only found reference for 1.x or 2.x
@CreatorAcademyAustralia Жыл бұрын
Not that I know of for 3.x, the best resource is the in-app help tab but it's not really extensive. I recommend reaching out to LEGO Education, maybe if more people ask then they will make it more accessible. Garry
@bernardpage4639 Жыл бұрын
Hi Gary, when entering the code I don't get the prompts for HOLD, BRAKE, COAST or CONTINUE infact I get red lines under HOLD and COAST stating they are unknown member of module, any ideas.
@CreatorAcademyAustralia Жыл бұрын
Hi! Have you imported motor_pair? Also, make sure you use the motor pair versions of the stopping modes, not single motor. Email me if you have any issues. Garry
@bernardpage4639 Жыл бұрын
@@CreatorAcademyAustralia Hi Gary, I was having trouble getting the HOLD to work so deleted Spike from my mac and reinstalled from the App Store. It appears to have been updated because Python was already there to program so I input the program as on KZbin but the prompts are different to yours, please see the screen grabs attached. From the info it appears you can have motor.BRAKE but not motor_pair.Brake. I imported motor and Brake was an option. Any ideas? Best Regards Bernie Page Screenshot 2023-07-11 at 11.35.55.tiffScreenshot 2023-07-11 at 11.36.18.tiffScreenshot 2023-07-11 at 11.45.56.tiff
@bernardpage4639 Жыл бұрын
I have sorted it, I put motor_pair.stop instead of stop.motor.HOLD, should have paid more attention. Thanks for your help.
@chrisair1575 Жыл бұрын
Hy Gary thanks for all you video’s I’m receiving the “AttributeError: ‘module’ object has no attribute ‘COAST’ I’m running the script from your Github and have the same error on my MAC and iPAD both of which are running the 3.3.1 version.
@irenewithwonder5 ай бұрын
after the update these attributes seem to work only for MOTOR, not motor_pair
@legoeducationtoptips935 Жыл бұрын
Hi. Struggling to use the motion / gyro sensor to turn a robot, say, 90 degrees. Could do it fine in the old version! any help gratefully received!
@CreatorAcademyAustralia Жыл бұрын
Hi! Check out part 2, it is made for you :D Garry
@sethyanmol11 ай бұрын
Hi - a dumb question here - other than some serious compute are there particular advantages to code Spike using Python instead of Scratch? Does python enable finer controlling?
@CreatorAcademyAustralia11 ай бұрын
Hi! Writing code using text gives kids a more challenging experience that is more similar to real-world coding. Python code is easier to manage in version control, and allows more precise motor control. Garry
@kimfortin6948 Жыл бұрын
Any ideas how to replicate the "stop other stacks" block that exists in scratch in this new version of python?
@CreatorAcademyAustralia Жыл бұрын
Hi there! Python doesn't have an equivalent to 'stop other stacks', but you can 'break' out of loops that are running. I might do a tutorial on it soon! Garry
@letsstudy3579 Жыл бұрын
Is it for kids?? And mindstorm for older students. Lol i am a college engineering student. But seems fun lego and robotics💀
@CreatorAcademyAustralia Жыл бұрын
Students of all ages can use SPIKE to learn programming! Garry
@ferassnadde6485 Жыл бұрын
Thank you for great job, Im getting red underline when I inert the word COAST, HOLD await motor_pair.move_for_time(motor_pair.PAIR_1,2500,-30,velocity=1000,stop=motor_pair.COAST,acceleration=1000)@@CreatorAcademyAustralia
@robotkudos6773 Жыл бұрын
Velocity 1000 should be 1000 degrees per second. Spike motors can run at 135-175 RPM, see the tech sheet: education.lego.com/v3/assets/blt293eea581807678a/bltb9abb42596a7f1b3/5f8801b5f4c5ce0e93db1587/le_spike-prime_tech-fact-sheet_45602_1hy19.pdf. Helpful video, thanks!
@CreatorAcademyAustralia Жыл бұрын
Thanks for pointing this out! I have updated the video description. Garry
@wilsonliao1423 Жыл бұрын
How do I sign into SPIKE
@litzozoid3156 Жыл бұрын
can i use this for mindstorms 51515 too?
@CreatorAcademyAustralia Жыл бұрын
Hi! Mindstorms Robot Inventor continues to use the previous python version, see: kzbin.info/www/bejne/jpuWnoh-l8dnkJI
@raulcarpio6693 Жыл бұрын
Where can I download the official documentation for this version of Python?
@CreatorAcademyAustralia Жыл бұрын
Hi! At the moment, the only place to view the documentation is through the Knowledge Base panel on the right hand side of the Python project within the SPIKE Prime app. Garry