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

แชร์
ฝัง
  • เผยแพร่เมื่อ 16 ก.ย. 2024

ความคิดเห็น • 43

  • @bruhanti3929
    @bruhanti3929 หลายเดือนก่อน +2

    Works very well

  • @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 หลายเดือนก่อน +1

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

  • @thomaskessler5924
    @thomaskessler5924 5 หลายเดือนก่อน

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

  • @Tomboly
    @Tomboly 10 หลายเดือนก่อน

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

  • @Moin162
    @Moin162 8 หลายเดือนก่อน +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 4 หลายเดือนก่อน

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

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

  • @tangojunky
    @tangojunky 2 หลายเดือนก่อน

    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 2 หลายเดือนก่อน

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

  • @lian9276
    @lian9276 5 หลายเดือนก่อน +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 2 หลายเดือนก่อน +1

      me too! Did you find any solutions on that?

    • @lian9276
      @lian9276 2 หลายเดือนก่อน

      @@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 2 หลายเดือนก่อน

      @@lian9276 try stop=motor.COAST
      It works

  • @sethyanmol
    @sethyanmol 8 หลายเดือนก่อน

    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  8 หลายเดือนก่อน

      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

  • @letsstudy3579
    @letsstudy3579 11 หลายเดือนก่อน +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  11 หลายเดือนก่อน

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

    • @ferassnadde6485
      @ferassnadde6485 10 หลายเดือนก่อน

      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

  • @nobiasplease
    @nobiasplease 9 หลายเดือนก่อน

    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  9 หลายเดือนก่อน

      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 TH-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 2 หลายเดือนก่อน

      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!

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

    • @CreatorAcademyAustralia
      @CreatorAcademyAustralia  ปีที่แล้ว

      Thanks for pointing this out! I have updated the video description. Garry

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

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

  • @wilsonliao1423
    @wilsonliao1423 11 หลายเดือนก่อน

    How do I sign into SPIKE

  • @litzozoid3156
    @litzozoid3156 ปีที่แล้ว

    can i use this for mindstorms 51515 too?

    • @CreatorAcademyAustralia
      @CreatorAcademyAustralia  ปีที่แล้ว

      Hi! Mindstorms Robot Inventor continues to use the previous python version, see: th-cam.com/video/Xj3mUHbb4Z0/w-d-xo.html