LEGO SPIKE Prime Parcel Scanning Robot

Creator Academy Australia · Beginner ·🛠️ AI Tools & Apps ·6y ago

Key Takeaways

Builds a parcel scanning robot using LEGO SPIKE Prime

Full Transcript

we have a challenge today okay this is the last lesson for our intermediate robots on right so we have a robot which is going to be pretty cool okay when the motor is moving the cores will close and it will also lift up the sample towards the sensor okay so if you have a look at this we got to put my sample over here so it can turn around and then we can lower the motor and then after you lower the motor in automatically it mechanically opens the arms as well okay then when we close the motor when we rotated the other way it's going to lift up the sample towards the color sensor I just dropped my sample all right so that was just me moving it with my hands but here is my challenge for you okay good designed the code so that it lifts up its arms so that it doesn't knock over the sample when it turns around this up its arm turns around to the left and then lifts up the the sample it's neither going to be yellow or purple if it's yellow I wanted to show a smiley face and then put it into the blue box it's purple I want you to show a sad face and then put it into the blue box okay so that is our challenge today alright so this is now dropping the sample so the opposite is lifting the sample so what I want to do is I create a my block one is called lifts and one is called drop okay so drop will be the first one you and then the second one is going to be whole lift we always want to create my Bluffs because it's more readable for us it's much easier to read what drop does and what lift does then to care about you know is it rotating anti-clockwise or clockwise and yeah yeah all right so here we go drop is this butt lift is going to be the opposite okay so we're going to lift going this way so now please who remembers what what initialization is for a robot who has heard of the word initialization well what we do at the start of the robots program to make sure that it always starts in the same position and for the our initialization for this robot what we want to do is two things first of all we want to lift its arms okay we want to lift its arms up so that we're not going to accidentally knock over these two samples okay so that's step one is to lift our arms step two is to make it so that we spin our arm around so that we are facing the middle here whether with the blue gap okay so the two steps for initialization is lift the arms and then to move so that we are facing the gap okay so let's try that so I'm going to create a new my block bolt in it which is short for initialization you okay I say that what is initialization going to do initialization was two things right you it was firstly we lift the up second thing is we move the large motor so large motor is motor ain't to the middle so we go to movement and then we go I know we're going to motors up the top so we go a shortest path to position zero what that will do is it will force the motor to start with it positions urine and when we use the shortest path command inmates us so that it doesn't matter which way it was turned it will always turn there at the shortest angle possible and then when we run the code we have to run the init code yeah then we go in it okay and then when you run the code it should start with your robot arm looking up facing the middle okay even if I if I change it if I change the way that the arm arm is positioned for example and then I change the way that the arm is facing as well if I run the Enigma code it's all going to return back to normal see so we got to make sure that the robot is always starting in the same position that's called robot initialization another thing I've just noticed is that when it spins its arm around it's still very very quick so I'm going to step motor a speed to be slower as well central a speed 20 you now I can test my initialization code again starting with my robot arm spacing all all strange directions but then as soon as I run my initialization code it should return back to normal thing is we can turn it all the way to the side and not care about the angle because we just want to turn it all the way to the limit because our robot is already designed so that it mechanically stops ourselves from turning so let's experiment with motor a so we can go run motor a for two seconds and then see what direction clockwise is it's going to initialize then run clockwise so that's going to turn to the right hand side I'm going to do the left hand side first so let's try this one again so anti-clockwise goes to the left so first it's going to initialize and then it goes to the left now what we do is we drop it and lift it so we go into my blocks and then we add a drop to drop our arms and then lift to lift the sample all right so let's have a go and see if our robot is going to do what we asked it to do this is going to initialize and then turns around and blocks yeah and then lifts the arm cool and the next really cool thing is that you notice here on our on our code is that is that the over here on our point view for our color sensor it's already sensing the color it's sensing that it's purple which is fantastic which is exactly what we wanted because after we see that it is purple we want to show that in smiling so here we go control and actually I'll create a another my block called scan we went to skim to see what did what it is and then do something with it okay my blocks credible and cold scan you and then we run a scan after we lift up the block we'll do an if/else block if our sensor is sensing the color pebble you then we're going to show a frown you for two seconds you you like this you but shone round for two seconds but otherwise well a smile for two seconds so there we go after we lived then we skinned so after we scan and we do the same thing we return to the middle and we drop so we can go motor motor a shortest path to zero and then we drop all right so let's try this code so first let's go to initialize go to the left pick up my purple sample show the frowny face and then drop it it works is good now we got to do the full thing so we grab the sample on the left skin and then drop it and then grab the sample on the right and also scan and drop it and then for lift I feel like it's it's a bit too hard so I'm gonna switch it to fifteen percent so that it doesn't get knocked out of my hand then I'll try again you you you [Music] I'd say initialize whoops because it's neat to lift it below that's why so that's the problem with the lift if I finally turn it slower I also have to turn more as a more time so I'll have to adjust that I go back into here and then let's see how it's handy now with our with our my blocks because if I didn't have my blocks then changing it like this would take a lot more time alright let's try it now you you initialize go to the left click up the first bit smiley face and it swapped it and goes to the second one loose it up sad face so now this is a successful run of our automated code

Original Description

Enjoy this preview of the Robotics course from Creator Academy. In this video: Learn how to use My Blocks for easy program readability. Learn about robot initialisation. Taken from the LEGO SPIKE Prime unit "Kickstart a business" - this robot is designed to pick up and scan parcels to determine behaviour. Build your own robot from the instructions here: https://education.lego.com/en-au/support/spike-prime/building-instructions For more in-depth science, building and coding on this subject, visit www.creatoracademy.com.au LEGO® is a trademark of the LEGO Group of companies which does not sponsor, authorise, or endorse this video.
Watch on YouTube ↗ (saves to browser)
Sign in to unlock AI tutor explanation · ⚡30

Playlist

Uploads from Creator Academy Australia · Creator Academy Australia · 48 of 60

1 LEGO Wedo 2.0 Kangaroo and Joey Demonstration
LEGO Wedo 2.0 Kangaroo and Joey Demonstration
Creator Academy Australia
2 LEGO Wedo 2.0 Koala Demonstration
LEGO Wedo 2.0 Koala Demonstration
Creator Academy Australia
3 LEGO WeDo 2.0 Eagle vs Rabbit Demonstration
LEGO WeDo 2.0 Eagle vs Rabbit Demonstration
Creator Academy Australia
4 Animatronic Australia: The Kangaroo
Animatronic Australia: The Kangaroo
Creator Academy Australia
5 How Semiconductors Work: 3D Animation
How Semiconductors Work: 3D Animation
Creator Academy Australia
6 LEGO Wedo 2.0 Koala
LEGO Wedo 2.0 Koala
Creator Academy Australia
7 First impressions and unboxing First Lego League: Into Orbit 2018
First impressions and unboxing First Lego League: Into Orbit 2018
Creator Academy Australia
8 FLL Into Orbit Team Ranking Gears talks about Artificial Gravity
FLL Into Orbit Team Ranking Gears talks about Artificial Gravity
Creator Academy Australia
9 FLL Into Orbit team Ev3lution discusses isolation in space
FLL Into Orbit team Ev3lution discusses isolation in space
Creator Academy Australia
10 PI3-BOT (Pie Bot) Prototype
PI3-BOT (Pie Bot) Prototype
Creator Academy Australia
11 Dynamic display stand for LEGO Bugatti Chiron (preview)
Dynamic display stand for LEGO Bugatti Chiron (preview)
Creator Academy Australia
12 Creative Kids TV announcement featuring Creator Academy
Creative Kids TV announcement featuring Creator Academy
Creator Academy Australia
13 LEGO WeDo 2.0 Guided Lesson: Milo
LEGO WeDo 2.0 Guided Lesson: Milo
Creator Academy Australia
14 LEGO SPIKE PRIME: Turtle Prime Demonstration
LEGO SPIKE PRIME: Turtle Prime Demonstration
Creator Academy Australia
15 LEGO SPIKE PRIME "Wheelchair Prime"
LEGO SPIKE PRIME "Wheelchair Prime"
Creator Academy Australia
16 10 Reasons why EV3 is SUPERIOR to SPIKE Prime
10 Reasons why EV3 is SUPERIOR to SPIKE Prime
Creator Academy Australia
17 Your first launch after installing Python: Python for Kids Webinar Highlight
Your first launch after installing Python: Python for Kids Webinar Highlight
Creator Academy Australia
18 What is "Sharpening the Saw": Python for Kids Webinar Highlight
What is "Sharpening the Saw": Python for Kids Webinar Highlight
Creator Academy Australia
19 Why We Use Comments: Python for Kids Webinar Highlight
Why We Use Comments: Python for Kids Webinar Highlight
Creator Academy Australia
20 Build a Scratch Dinosaur Park (Full Lesson)
Build a Scratch Dinosaur Park (Full Lesson)
Creator Academy Australia
21 Scratch 3.0: Cat and Mouse Game Stream (Krunal)
Scratch 3.0: Cat and Mouse Game Stream (Krunal)
Creator Academy Australia
22 Python Tutorial: Make a Toilet Paper Calculator (Full Lesson)
Python Tutorial: Make a Toilet Paper Calculator (Full Lesson)
Creator Academy Australia
23 Scratch 3.0 Tutorial: Making a chatbot that plays 'heads or tails' (Full Lesson)
Scratch 3.0 Tutorial: Making a chatbot that plays 'heads or tails' (Full Lesson)
Creator Academy Australia
24 Getting Started with MicroPython on SPIKE PRIME (old)
Getting Started with MicroPython on SPIKE PRIME (old)
Creator Academy Australia
25 Easter Egg Game Tutorial in Scratch (Full Lesson)
Easter Egg Game Tutorial in Scratch (Full Lesson)
Creator Academy Australia
26 Accessing Weather API with Python (Highlights)
Accessing Weather API with Python (Highlights)
Creator Academy Australia
27 Accessing Translate API with Python (Highlights)
Accessing Translate API with Python (Highlights)
Creator Academy Australia
28 Scissors, Paper, Rock with Scratch 3.0 (Highlights)
Scissors, Paper, Rock with Scratch 3.0 (Highlights)
Creator Academy Australia
29 Making a really scary game with Scratch 3.0 (Highlights)
Making a really scary game with Scratch 3.0 (Highlights)
Creator Academy Australia
30 Making a Lemmings game with Scratch 3.0 (Highlights)
Making a Lemmings game with Scratch 3.0 (Highlights)
Creator Academy Australia
31 Space Navigation Game in Scratch (Highlights)
Space Navigation Game in Scratch (Highlights)
Creator Academy Australia
32 Scratch Supercat Game (Full Lesson)
Scratch Supercat Game (Full Lesson)
Creator Academy Australia
33 Introduction to Robots with LEGO Wedo 2.0 (Full Lesson)
Introduction to Robots with LEGO Wedo 2.0 (Full Lesson)
Creator Academy Australia
34 Getting Started With LEGO Spike Prime (Full Lesson)
Getting Started With LEGO Spike Prime (Full Lesson)
Creator Academy Australia
35 Scratch Walk Cycle Animation Tutorial (Full Lesson)
Scratch Walk Cycle Animation Tutorial (Full Lesson)
Creator Academy Australia
36 Building a Scissor Lift with LEGO Simple Machines (Highlights)
Building a Scissor Lift with LEGO Simple Machines (Highlights)
Creator Academy Australia
37 EV3 datalogging RPM challenge (highlights)
EV3 datalogging RPM challenge (highlights)
Creator Academy Australia
38 Learning about buses with LEGO (Full Lesson)
Learning about buses with LEGO (Full Lesson)
Creator Academy Australia
39 Make "Flappy Bird" in Scratch 3.0 (Highlights)
Make "Flappy Bird" in Scratch 3.0 (Highlights)
Creator Academy Australia
40 "Memory Arrows" game with Scratch 3.0 Lists (Highlights)
"Memory Arrows" game with Scratch 3.0 Lists (Highlights)
Creator Academy Australia
41 Learning about Gear Ratios with LEGO Simple Machines (Highlights)
Learning about Gear Ratios with LEGO Simple Machines (Highlights)
Creator Academy Australia
42 Scratch 3.0 Bouncing Ball with Stretch, Speed and Acceleration (Full Lesson)
Scratch 3.0 Bouncing Ball with Stretch, Speed and Acceleration (Full Lesson)
Creator Academy Australia
43 LEGO SPIKE Prime Order Tracking Robot (Highlights)
LEGO SPIKE Prime Order Tracking Robot (Highlights)
Creator Academy Australia
44 Scratch 3.0 Race Guesser (Full Lesson)
Scratch 3.0 Race Guesser (Full Lesson)
Creator Academy Australia
45 How Banks Work - a quick explanation for kids
How Banks Work - a quick explanation for kids
Creator Academy Australia
46 SPIKE Prime Safe + importance of passwords (Highlights)
SPIKE Prime Safe + importance of passwords (Highlights)
Creator Academy Australia
47 Combination Safe Coding Guide with LEGO SPIKE Prime
Combination Safe Coding Guide with LEGO SPIKE Prime
Creator Academy Australia
LEGO SPIKE Prime Parcel Scanning Robot
LEGO SPIKE Prime Parcel Scanning Robot
Creator Academy Australia
49 Building "Addy" the Addition Chatbot
Building "Addy" the Addition Chatbot
Creator Academy Australia
50 SPIKE 2.x PID Balancer with Scratch for SPIKE Prime / 51515: Gyro Girl
SPIKE 2.x PID Balancer with Scratch for SPIKE Prime / 51515: Gyro Girl
Creator Academy Australia
51 What is Procedural Programming
What is Procedural Programming
Creator Academy Australia
52 Zombie game in SCRATCH (plus horrifying zombie facts!)
Zombie game in SCRATCH (plus horrifying zombie facts!)
Creator Academy Australia
53 Swarming Bugs Scratch Game
Swarming Bugs Scratch Game
Creator Academy Australia
54 LEGO Mindstorms/SPIKE Prime Scanner and Printer
LEGO Mindstorms/SPIKE Prime Scanner and Printer
Creator Academy Australia
55 Fishing Game with SCRATCH (For Fathers Day!)
Fishing Game with SCRATCH (For Fathers Day!)
Creator Academy Australia
56 Measuring Paper Plane Speed with SPIKE Prime Line Graphs
Measuring Paper Plane Speed with SPIKE Prime Line Graphs
Creator Academy Australia
57 Comparing Mindstorms Robot Inventor and SPIKE Prime
Comparing Mindstorms Robot Inventor and SPIKE Prime
Creator Academy Australia
58 Code a 'Knock Knock Joke' game in Scratch 3.0
Code a 'Knock Knock Joke' game in Scratch 3.0
Creator Academy Australia
59 Creator Academy Australia Live Stream
Creator Academy Australia Live Stream
Creator Academy Australia
60 Discovering LEGO Mindstorms/SPIKE Gyro Pitch Deadzone
Discovering LEGO Mindstorms/SPIKE Gyro Pitch Deadzone
Creator Academy Australia

Related Reads

Up next
6-Month Modern Python Roadmap 2026 | Web & AI Development | #shorts
SCALER
Watch →