Page 117 - CodePilot V5.0 C5
P. 117
USING THE AI FEATURES OF SCRATCH
There are many powerful
extensions you can use to make
your projects more dynamic
and interactive. To use them,
you must first add them to the
blocks palette.
To add these extensions to the
blocks palette, follow the given
steps:
Step 1 Click on the Add
Extension button.
Step 2 Choose the desired extension.
The chosen extension will be added to the blocks palette. Let’s learn about some of
these exciting extensions.
VIDEO SENSING
The Video Sensing extension lets you use your webcam
to control your project. It can detect movement in front
of the camera and use it to make things happen in the
game, like moving a sprite or triggering an action.
The Video Sensing extension includes the following
blocks:
It starts a script when the camera detects
when video motion > 10 motion greater than a set value (like waving
your hand).
This block detects the motion or direction of
video motion on sprite movement captured by the webcam. You can
apply it to a specific sprite or the entire stage.
This block turns the webcam on, off or flips the
turn video on
video feed.
Scratch Meets AI 115

