LEGO SPIKE PRIME Out OF Order Delivery Cart Debugging Program
FULL TRANSCRIPT
hi guys welcome to save our honey so we
build a delivery card which is out of
order
[Music]
happy Father's Day guys so my dad is
gonna show you how she all right so what
do we got here so we got up out of otter
Kart and you want to fix it so let's
look at the program all right so let's
start from the first block so the first
block says when you press the left
button on the hub which is this button
something should happen and let's see
what is that something the first thing
the see there is a sensor here either a
motor or probably a motor which is on
sensors see the speed for that murder is
will be set to 100% and the C will go at
the the motors motor directions or more
motor movement will change to the zero
position and then we'll set the movement
on motors a and E a and E are connectors
where two motors will be connected and
then it will basically set the movement
speed to 50% and then it will start
moving until it finds a a sensor which
is which we have connected to the V
connector on the hub and if a distance
is closer than zero centimeter which
technically means that it will it won't
stop it will keep on moving it will
never detect the zero centimeter and
will keep on moving and we won't be able
to stop it so first thing let's get
let's hit the initialize the program and
now we'll hit the left button and see
what happens alright nothing is
happening so we're gonna start debugging
it right now if you see the the section
here the group of blocks here are
highlighted in yellow which means that
the command the left command is picked
up by the first block here so now let's
see why the C speed is not set to 100%
so I'll click on the C here and I see
that there's nothing connected here on
the C however I have motors connected on
B D and F so I should be using one of
these motors so now we will see which
one
is actually the motor that you're gonna
replace at position C so I want this
this motor which is going to be our
directional motor with and that's the
one I want to first set the position for
the rotation for so I'll try to track
this cable and see what connector this
cable is connected to and in this case
it's the D so we'll change it from C to
D which is this guy alright I will
change the connector from C to D here as
well we will set the position to zero
which make sure that the cart will go
straight the next I'm gonna set the
positions
sorry movement on motor a and E which I
believe is also not accurate so we need
to select motor F and B so there's two
motor than F and B DB already selected
so F and B I'll quickly show this one is
the left side motor and it's connected
to the F and this is a right side motor
and the wire is connected to B so we'll
select F and B next we'll set the speed
to 50% I will start moving straight so
we'll know it straight there you go
alright and wait until B let's see what
is B B should be our distance sensor
which is this guy here and it's
connected to all the way towards a so
it's not connected to B it's connect to
a so we do change it so change it to a
and then we also need to give them
distance if you don't give any distance
it will basically keep on moving so I'll
say distance of 9 centimeters as soon as
oops sorry not 99 9 centimeters as soon
as it sees an object at night sent in 9
centimeters it should stop moving
so we'll start see if we debug the
program and fix the issue so this is my
stopper as soon as the modern age is 19
it should stop so let's press the left
button the left button is the one that's
going to trigger the the motors so here
we go one two three all right
oh all right let's do it one more time
as soon as this reaches ninths
centimetres distance it should
automatically stop all right next we
gonna fix the block which is responsible
for movement when we click the right
button this is this guy all right so
let's read it it's got a pretty
straightforward so we already know that
the motor for the directional motor
which is the back motor the bigger one
is on D so I'll move it to D and keep on
changing these two D as well the set
movement motors so if I wanna set these
models I know that en a and E does not
have any Morris I know F and B have the
motors from our left button program
we'll change it start moving straight a
wait for the sensor that B will check it
sensor is not at the B at B we got a
motor sensors on a so select a here
closer then we'll change it from 0 to 9
centimeters because we do want the car
to stop and after that I want it to stop
moving
now we set C shortest path C is same as
D this is our directional motor will set
it to D and then we are going to look at
the moment the moment it says this will
go forward 50 centimeters I will stop
then we also need to go back to D here
and it will set the position to zero and
then I want to make sure that it goes
back and then goes forward so I want to
change the direction from backward to
forward 50 centimeters 50 centimeters is
a lot of space on our you know
workstation or what desk here so I want
to make sure that doesn't fall off or
works what this so will make it go at
least 30 centimeters
so we make sure it won't fall off our
work table all right
I'm hoping this is gonna work let's hit
the start button all right it's
initialized we'll put our block here so
that it can detect the stop block I hit
the right button goes straight stops at
nine centimeters wait for one second
goes back and then stops again wait for
one second and goes forward and stops
again thank you guys
[Music]
UNLOCK MORE
Sign up free to access premium features
INTERACTIVE VIEWER
Watch the video with synced subtitles, adjustable overlay, and full playback control.
AI SUMMARY
Get an instant AI-generated summary of the video content, key points, and takeaways.
TRANSLATE
Translate the transcript to 100+ languages with one click. Download in any format.
MIND MAP
Visualize the transcript as an interactive mind map. Understand structure at a glance.
CHAT WITH TRANSCRIPT
Ask questions about the video content. Get answers powered by AI directly from the transcript.
GET MORE FROM YOUR TRANSCRIPTS
Sign up for free and unlock interactive viewer, AI summaries, translations, mind maps, and more. No credit card required.