SPIKE Prime 3.x 2023 Python Tutorial: Part 1 Moving Around

Поділитися
Вставка
  • Опубліковано 11 лис 2024

КОМЕНТАРІ • 45

  • @BeattyRobotics
    @BeattyRobotics Рік тому +5

    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!

  • @thcarstensen
    @thcarstensen 3 місяці тому +2

    great video for a teacher looking to move on from coding blocks

  • @bruhanti3929
    @bruhanti3929 2 місяці тому +2

    Works very well

  • @thomaskessler5924
    @thomaskessler5924 7 місяців тому

    Great explanations, pace of content and examples. Well done!

  • @Moin162
    @Moin162 10 місяців тому +2

    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?

    • @Randomperson0467
      @Randomperson0467 6 місяців тому

      I used a comma instead of a period that made it pop up

  • @Tomboly
    @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).

  • @tangojunky
    @tangojunky 4 місяці тому

    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?

    • @irenewithwonder
      @irenewithwonder 4 місяці тому

      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//)

  • @patriciarector7964
    @patriciarector7964 Місяць тому

    Thanks!

  • @lian9276
    @lian9276 6 місяців тому +1

    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?

    • @tangojunky
      @tangojunky 4 місяці тому +1

      me too! Did you find any solutions on that?

    • @lian9276
      @lian9276 4 місяці тому

      @@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.

    • @tangojunky
      @tangojunky 4 місяці тому

      @@lian9276 try stop=motor.COAST
      It works

  • @nobiasplease
    @nobiasplease 11 місяців тому

    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
      @CreatorAcademyAustralia  11 місяців тому

      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
    @bernardpage4639 Рік тому +1

    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
      @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
      @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 UA-cam 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
      @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
      @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.

    • @irenewithwonder
      @irenewithwonder 4 місяці тому

      after the update these attributes seem to work only for MOTOR, not motor_pair

  • @legoeducationtoptips935
    @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!

  • @rockymountainfacet5958
    @rockymountainfacet5958 Рік тому +2

    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
      @CreatorAcademyAustralia  Рік тому +2

      Yes! It is completely different to before, it is more complex but also has more control. Thanks for watching! Garry

    • @rockymountainfacet5958
      @rockymountainfacet5958 Рік тому

      @@CreatorAcademyAustralia Thank you! I think you sold me on updating from legacy.

    • @haidonghuang8552
      @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?

  • @sethyanmol
    @sethyanmol 10 місяців тому

    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?

    • @CreatorAcademyAustralia
      @CreatorAcademyAustralia  10 місяців тому

      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

  • @wilsonliao1423
    @wilsonliao1423 Рік тому

    How do I sign into SPIKE

  • @kimfortin6948
    @kimfortin6948 Рік тому

    Any ideas how to replicate the "stop other stacks" block that exists in scratch in this new version of python?

    • @CreatorAcademyAustralia
      @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
    @letsstudy3579 Рік тому +1

    Is it for kids?? And mindstorm for older students. Lol i am a college engineering student. But seems fun lego and robotics💀

    • @CreatorAcademyAustralia
      @CreatorAcademyAustralia  Рік тому

      Students of all ages can use SPIKE to learn programming! Garry

    • @ferassnadde6485
      @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

  • @raulcarpio6693
    @raulcarpio6693 Рік тому

    Where can I download the official documentation for this version of Python?

    • @CreatorAcademyAustralia
      @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

  • @litzozoid3156
    @litzozoid3156 Рік тому

    can i use this for mindstorms 51515 too?

    • @CreatorAcademyAustralia
      @CreatorAcademyAustralia  Рік тому

      Hi! Mindstorms Robot Inventor continues to use the previous python version, see: ua-cam.com/video/Xj3mUHbb4Z0/v-deo.html

  • @robotkudos6773
    @robotkudos6773 Рік тому +1

    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!