Use Coding Cards to Play with mTiny

 

The mTiny robot kit provides coding cards, allowing children to start learning programming without any screen. Children can compile a complete program by putting coding cards together.

mceclip5.png

This page describes the coding cards included in the mTiny robot kit. 

Coding cards

There are nine types of coding cards.

nine_types.png

Type 1: Facial expression

happy.png

Happy

silly.png

Silly

angry.png

Angry

sad.png

Sad

scared.png

Scared

dizzy.png

Dizzy

sleepy.png

Sleepy

When a facial expression card is executed, mTiny puts on the expression.

Type 2: Action

forward.png

Move forward

When this card is executed, mTiny moves 18.6 cm (one map block) forward.

turn_right.png

Turn right

When this card is executed, mTiny turns right.

turn_left.png

Turn left

When this card is executed, mTiny turns left.

Type 3: Input

input.png

Input card

It indicates the start of a program.

When you tap this card, mTiny starts to record the coding cards following this card.

Type 4: Go!

go_.png

Go!

It indicates the start of program execution.

When you tap this card, mTiny starts to execute the coding cards it has recorded.

Type 5: Repeat

repeat.png

A repeat card is used to repeat the execution of the coding card it follows. 

Type 6: Loop

loop.png

A loop card is used to repeat the execution of all the coding cards before it for the specified number of times, and mceclip0.png, the loop card without a number, is used to continuously repeat the execution.

Note that a loop card can be put only at the end of a program.

Type 7: Loop parentheses

mceclip1.png

As you can see, a loop card ends a program. What if I want to repeat the execution of a number of coding cards for a specified number of times and then continue to execute other coding cards? You can use the loop parenthesis cards and a repeat card, for example:

mceclip2.png

Type 8: Musical note

Note mceclip3.png
Melody mceclip4.png

When a note card is executed, mTiny plays a note; and when a melody card is executed, mTiny plays a melody.

Type 9: Shape and line

mceclip6.png

With a marker provided in the mTiny robot kit, mTiny can draw a shape or line when a shape or line card is executed. For details about how to use a marker, see "Put a marker into the pen slot of mTiny."

You can also use mceclip0.png, the pen down card and mceclip1.png, the pen up card in combination with the joystick or action cards to make mTiny draw the path it moves in.

Coding card execution rule

The execution of coding cards follows the First In First Out (FIFO) rule, that is, the coding card you tap and mTiny records first is executed first, and the one you tap last and mTiny records last is executed last.

For example, tap the following coding cards in turn from left to right.

1 mceclip2.png mTiny puts on a happy expression first, and then it moves forward.
2 mceclip3.png mTiny moves forward first, and then it puts on a happy expression.

 

Coding examples

Example 1

mTiny moves forward four blocks, turns right and then moves forward one block.

mceclip4.png

Example 2

mTiny repeats the following movements four times: moves forward and then puts on a happy expression. 

mceclip5.png

Example 3

mTiny repeats the movement of moving forward and then putting on a happy expression four times, and then it moves forward.

mceclip6.png

Example 4

mTiny draws a rectangle while moving in the path of a rectangle.

Note: Before using the pen-down and pen-up cards, you need to put a marker into the pen slot of mTiny.

mceclip7.png

 

Was this article helpful?
17 out of 18 found this helpful

Comments

0 comments

Please sign in to leave a comment.