The words you are searching are inside this book. To get more targeted content, please make full-text search by clicking here.
Discover the best professional documents and content resources in AnyFlip Document Base.
Search
Published by mzaki5771, 2021-09-03 11:42:26

CUBOT

CUBOT

CUBOT

let's get started!

CUBOT

Like our YouTube video to show support!

you are now going to build
your very own CUBOT. So,
go ahead and check out
the table of content on the
next page!

1. What is CUBOT? 02
2. Let's build our CUBOT! 05
3. What can CUBOT do? 20
26
Make CUBOT smile :) 32
Make CUBOT move 40
Make CUBOT sing 44
Make CUBOT dance
47
EXTRA!
My very own CUBOT!

01

02

CUBOT is a robot that can
move, sing and dance!

micro:bit V2 board

These are all its
main components

AA battery holder 360 digital servo
with switch with wheel x2

03

USB micro cable

AA battery x2

white rivet x6 screwdriver
wheel caster Make sure that all of
the components listed

are inside the box!

04

05

Begin with this piece of cardboard to
form the inner chassis.

06

Attach the servo motors into the
precut holes in the chassis.

07

Secure the servo motors with the

given screws. This part might be a bit

tricky. 08

After both servos are secured, fold
the cardboard so that both ends of
the servos meet.

09

Slide in the 2 pieces of cardboards
into the slots.

10

Chassis complete! 11
Time for some wiring.

We will wire the servos to the battery
pack and micro:bit based on the
diagram above.

12

Carefully twist the ground (brown)
wires from the servos and battery
pack together. Do the same for the
positive (red) wires.

13

Secure the connection with some
white rivets. Insert just half of the
rivet, the fastener will be inserted
later.

14

Connect the orange signal wire from
the servo motors to Pin 0 and Pin 1.

15

Attach the wheels to the servo
motors.

16

Attach the ball caster to the bottom

of the chassis and secure them with

the rivets. 17

Attach the micro:bit to the cover box.

Secure the board with the rivet

fastener. 18

Gently slot the cover over the

chassis and it’s done! 19

20

20

Before we can make CUBOT
do fun things, we first need

to train its BRAIN!

The micro:bit is the
brain of your cubot,
SO we need to teach it

by coding it.

21

1. Open your browser and head to
makecode.microsoft.org.

2. click on
New Project

3. Name your project and click Create

22

4. You will see this windows now

Here you can Here you'll Here you'll place
see how your choose your your blocks

code works blocks

23

5. We will use these 2 blocks more often:

any code placed in this will only run
once when the micro:bit is powered

any code placed in this will run over and
over again when the micro:bit is powered

24

6. To download your code into the
micro:bit board, connect the board
and your PC/laptop with the USB
cable provided.

7. When you plugged in your micro:bit,
a new drive is created with the
MICROBIT label. This is where you’ll
save your program.

8. The basic steps are:
1. Connect your micro:bit to your
computer with a USB cable.
2. Click Download the .hex file.
3. Move the .hex file from your
computer onto the MICROBIT
drive.

25

Make cubot smile :)

The micro:bit board has 25 LED (light
emitting diodes) that can be coded
to form words and images.

26

Make CUBOT smile :)

Click on the tab “Basic” and select

the block named “show leds”. 27

Make CUBOT smile :)

drag and drop the
“show leds” block into
the “on start” block
because we’ll want this
to show whenever we
switch on our cubot.
Draw a smile by
clicking the individual
squares in the “show
led” block.

Let’s give cubot

a happy voice

too when we turn

it on. Head to the

“Music” tab and

grab a “play

sound until done”

block. 28

Make CUBOT smile :)

Add the block
into our “on
start” block and
change it to your
preferred sound.

Upload this code into your micro:bit,
switch on and now CUBOT has a smile!

29

Make CUBOT smile :)

You can even make

cubot change

expressions by

sequencing several

“show leds” blocks

in the “forever”

block to repeat the

sequence .

30

Make CUBOT smile :)

Do also explore these blocks
and discover what they do.

31

Make cubot move

The servo motors connected will
receive signals from the micro:bit to
move the wheels.

32

Make CUBOT move

Depending on
which wheel
we move and
the rotation,
we can code
the CUBOT to
move forward,
backward, or
turn.

We will need
to do a little
setup before
we can code
the servo.

33

Make CUBOT move

Click on the
“Advanced” tab and
select “Extensions”

In the next screen,
click on the “servo”
library.

34

Make CUBOT move

A new “Servos” tab will 35
appear in dark green.

Make CUBOT move

The right servo is connected
to P0 while the left servo is
connected to P1.

36

Make CUBOT move

Now let’s code CUBOT to move when we
press the A button on the micro:bit. We
will need:

P0 is the pin number, while the %
determines how fast the servo will spin
(higher number = faster)

37

Make CUBOT move

The table below will help
you with the values:

The left servo spins at -50% while right
servo at +50% to move forward because
of the servos are assembled to in inverse
to each other.

38

Make CUBOT move

Don’t forget to
add some “pause”
blocks in between
each direction for
cubot to run the
code for a while
before changing
to other
directions.

An example code
is shown here.

Now it is your
turn to

experiment!

39

Make cubot sing

All the required blocks for creating
sound are located in the “Music” tab.
Let's try the "play melody" block

Place the block into “on button
pressed” block to play the melody
whenever the A button is pressed.

40

Make CUBOT sing

When the note

symbol is

clicked, you can

edit your own

melody with the

Editor or select

one from the

Gallery.

The tempo

controls how

fast the melody

is played.

41

Make CUBOT sing

Sequence a few melodies to compose
your own song.

There are some preset melodies that
you can choose from in the “start
melody” block.

42

Make CUBOT sing

You can even try the “play tone” block
to compose your own unique songs.

have fun
composing!

43

Make cubot dance

Now let’s combine both the
movement codes and the melody
codes to make your cubot dance!
First we add our melody. Don’t forget
to select the “repeating once in
background so that cubot’s
movement will run once the melody
starts.

44

Make CUBOT dance

Now we add our

movement blocks.

Here’s where you

get creative with

your cubot’s

dance moves.

Don’t forget a
“stop servo” block
at the end so that
the dance would
stop.

45

Make CUBOT dance

Experiment with the values in the
servo blocks and “pause” blocks
to see how your dance turns out.

happy dancing!

46


Click to View FlipBook Version