Apitor

Chapter 4 Tutorial display
Chapter 4.1 Introduction
This is the best way to Main Control Unit programming. More. The best way to programming in general.
The programs are extremely short, but you see the effect immediately!
Note
Mobile and Central Block must be Bluetooth linked, even the program is a rousing „Wow!” in the mobile only.

Fig. 4-1
Click „Practice”

Fig. 4-2
Display with 15 push-buttons.
Every push-button is an input to 1 programming exercise.
Note
There is push-button 1 active only when the display is first time opened! The rest of them (14) are blocked.
When you finish exercise 1 successfully, the  push-buttons 1 and 2 are active, 13 are blocked etc…
I did all 15 exercises, so all 15 push-buttons are active in the Fig. 4-2.

Exercises description
Every exercise consists of parts:
First part
The program is shown only. The instructions look like Lego bricks. Try to remember this program.
Second part
Program
reconstruction.  It’s possible to remind the program at any moment.–>Click the „Prompt” push-button–>Fig. 4-4.
The Second part exists as an easy and difficult version
Easy
There are instructions at your disposal on the display. Their order is random. You should file them correctly.
Don’t forget to write instruction parameter in when necessary! Sensor sensitivity or loudness for example.
Difficult
There is an empty display without instructions. You load them from the instructions panel.–> see Fig. 4-4.
Go to the exercise 1 –> click the push-button in the Fig. 4-2.

Chapter 4.2 Exercise 1

Fig. 4-3
First part of the exercise
The simplest as possible program. Try to remember it. The display elements are descripted in the Fig. 4-4.
The program consists of 2 instructions only.
1. Start 
2.Sound (sound1)
All the programs begin with the StartThis instruction observes the Start push-button all the time.
It does nothing when the Start push-button isn’t clicked by You. When it’s clicked–>The next instruction is executed!
Note for absolute programmers beginners.
Try to imagine the computer program as row of dominoes. Every domino is an instruction.
When you knock down the first domino–> the second and all dominoes wil be knocked down.
The first domino is a Start instruction and your finger is a Start push-button.
You see the variation between Start instruction and  Start push-button. I hope so.
Go to the second part. Click left upper cross.

Fig.4-4
Begining
of the Second part of the exercise no.1
Your job is a Fig. 4-3 program reconstruction. The prompt is your assistant any time now.
All the 2 necessary intructions are on the display.
The intructions are kind of the „magnetised” Lego bricks and may be positioned by finger. You don’t be super precisely!
The „magnetised” instructions will be connected  with the click sound, when their distance is small.
This pictorial programming method is much easier than a common instructions writing! There are less errors!
Note
Use „Center”, „Zoom+” and „Zoom-” push-buttons when your fingers are too big.

Fig.4-5
End
of the Second part of the exercise 1
The instructions are connected and the program is ready to test. Click „Start” push-button.
You hear a short sound and the „Start” push-button changes from runner to ||. Program completed succesfully!
Now what? Is it all? Yes! The program was extremely simple and short. Suchlike programs for beginners are named „Hello world”.
I suppose that you will not win the Nobel Price.
Note that Main Control Unit is as an unemployed but  the bluetooth connection must exist. The same are the exercises 2…11.
Let’s go to the exercise 2. Click „Return” push-button. The display Fig. 4-2 will open.
The exercise completed successfully, so the push-button no.should be unblocked. Click it!

Chapter 4.3 Exercise 2
First part

Fig.4-6
There is one difference towards exercise 1. There is a sound9 (not sound1).
Click left upper cross and go to the second part.

Second part

Fig. 4-7
Change sound1 for sound9 in the sound instruction.  Sound1 and sound9 are the instruction parameters.
Move the sound instruction up then.

Fig. 4-8
Center
and zoom the  display first. Use the push-buttons–>see Fig. 4-4.
Click the sound1 parameter  on the sound instruction  and tick the sound9 parameter. You can connect instructions together now.

Fig. 4-9
Click „Start” push-button. The booming „Wow” is heard! „Start” push-button changes from runner to ||.
Program completed succesfully! Click icon ||. It changes to runner Click runner and  „Wow” is again…
Let’s go to the exercise 3. You are clever at doing it now.

Chapter 4.4 Exercise 3
The further description is less detailed.
First part
Similar to previous exercises.

Fig.4-10
Click cross
Second part

Fig.4-11
Surprise. There is Start instruction only! Where are the others? This is just a difficult exercise version–>see Chapter 4.1.
All the instructions are hidden in the instructions panel. See Fig. 4-4. They form different  sets i.e. Move,Show,Sense…
Click the given set and you see given instruction. The sound instruction is hidden in the Show set for example. Click it.

Fig.4-12
Click the required sound instruction.

Fig.4-13
Change the sound parameter sound1–>sonud2 and stick the course yourself. You already know how to do it.

Chapter 4.5 Exercise 4
You will impress your friends when you program the robot this way.
– The robot goes himself.
– His distance sensor detects the wall.
– He stops.
– He says „Aw, the wall”. 
– He turns
– He returns
It requires the recording possiblity.

Fig.4-14
Remember the program and click the left upper cross.

Fig.4-15
Click the parameter window in the recording instruction. Zoom end center the picture if necessary.

Fig.4-16
There are typical recorder push-buttons.
Please record „Alice has a cat” for example and check it by Playback push-button.
Click left upper cross.

Fig.4-17
Click „Start” push-button.  It’s heard „Alice has a cat”

Chapter 4.6 Exercises 5,6 and 7
Nothing new. You will cope. I am sure.

Chapter 4.7  Exercise 8
The programs were very simple by now. 2 instructions only.  There will be until 4! Nobel price already waits.

Fig.4-18
Remember the program.

Fig.4-19
Change for „music3” and connect the instructions.

Fig. 4-20
Click „Start” push-button. The 10 sec melody will sound.

Chapter 4.8 Exercises 9,10 and 11
Nothing new. You will cope. I am sure.

Chapter 4.9 Exercises 12 and 13
There is a job for Main Control Unit first time. The wheels are recommended.

Fig. 4-21
Call the exercise 12 now.

Fig. 4-22
Remember the program and click the left upper cross.

Fig. 4-23
The newness is the  number „100” writing into the  wait instruction.
Click the instruction input window.

Fig. 4-24
How to enter number 100 to the instruction?
The action is similar to the slot machine

Fig. 4-25
Click Start (Runner)
The action is:
-Music plays
– 1 wheel rotates
– end after 10 sec (100*0.1sec)
The exercise13 is a difficult version only. Do it yourself.

Chapter 4.9 Exercises 14 and 15
Say loudly „Car go!”–>car goes
You are silent–>car stops
What’s more! The louder you are–>the car speed is bigger.

Fig. 4-26
Program to remember

Fig. 4-27
Build the program.

Fig. 4-28
Click Start and test the program.
Tne louder you speak the rotating speed is bigger