PROGRAMMING SCHOOL
ProgBlox Set - examples
1. Example 8 - Reaction game6. Example 3 - The vehicle follows the light
2. Example 9 - Forklift on robo Car7. Example 4 - A vehicle with bumpers - an advanced example
3. Example 1 - Ramp - 1 limit switch8. Exemple 5 - Vehicle - Car set - supplemented example 15 (1)
4. Example 2 - Ramp - 2 limit switches9. Exemple 6 - Vehicle - Car set - supplemented example 15 (2)
5. Ramp - saved program from example 210. Example 7 - Vehicle - Car set - supplemented example 16 (1)

Example 8 - Reaction game
Prim_EN_08.jpg
The green and red LEDs light up randomly. The goal is to light up another LED of the same color. It is necessary to press the button next to the lit LED while the LED is lit.

Example 9 - Forklift on robo Car
We added a forklift to the robot vehicle. The basic functions can be seen from the video example. Vehicle handling remained the same.

Example 1 - Ramp - 1 limit switch
Prim_EN_01.jpg
Za početak je potrebno upaliti LED svjetla ( crveno i zeleno ). 1. Prekidom signala ( foto senzor ) na žutom ulazu, gasi se crveno LED svijetlo i pokreće se motor koji podiže rampu. 2. Ako crveni ulaz ( tipkalo pritisnuto ) ima signal i žuti ulaz ( foto senzor ) ima signal, pričekaj dvije sekunde, pokreni motor u suprotnom smijeru i spuštaj rampu dvije sekunde. Zaustavi motor i upali crveno LED svjetlo. 3. Ako crveni ulaz ( tipkalo pritisnuto ) ima signal da zaustavi motor.

Example 2 - Ramp - 2 limit switches
Prim_EN_02.jpg
Za početak je potrebno upaliti LED svjetla ( crveno i zeleno ). 1. Prekidom signala ( foto senzor ) na žutom ulazu, gasi se crveno LED svijetlo i pokreće se motor koji podiže rampu. 2. Ako crveni ulaz ( tipkalo pritisnuto ) ima signal i žuti ulaz ( foto senzor ) ima signal, zaustavi motor, pričekaj dvije sekunde, pokreni motor u suprotnom smijeru, pričekaj ( spuštaj rampu ) dvije sekunde i upali crveno LED svjetlo. 3. Ako plavi ulaz ( tipkalo pritisnuto ) i žuti ulaz ( foto senzor ) imaju signal, zaustavlja motor.

Ramp - saved program from example 2
Run the saved program via the RUN button on the control module. Turn on the power of the module and briefly press the RUN button (until the LED lights up).

Example 3 - The vehicle follows the light
Prim_EN_03.jpg
For this exercise, we use two photosensors connected to the red and green input of the control module. The motors on the vehicle are connected to the red and green outputs of the control module. The logic is very simple. The light always comes from the left or right side of the vehicle. That is why the vehicle turns to the left or right when the light is detected individually. When both sensors detect the signal, the vehicle moves forward.

Example 4 - A vehicle with bumpers - an advanced example
Prim_EN_04.jpg
Assembled vehicle model from the new set with bumpers. The program is identical to that for the vehicle from the Car set (example 16), but supplemented with a subprogram for the situation when both sides of the bumper are pressed (turn circularly to the right).

Exemple 5 - Vehicle - Car set - supplemented example 15 (1)
Prim_EN_15-1.jpg
We have added to Example 15 from the Car set a subroutine for the situation when the bumper is pressed directly. When both sides are pressed (red and green), the vehicle should turn to the right.

Exemple 6 - Vehicle - Car set - supplemented example 15 (2)
Prim_EN_15-2.jpg
We have added to Example 15 from the Car set a subroutine for the situation when the bumper is pressed directly. When both sides are pressed (red and green), the vehicle decides whether to turn left or right (randomly).

Example 7 - Vehicle - Car set - supplemented example 16 (1)
Prim_EN_16-1.jpg
We have added to Example 16 from the Car set a subroutine for the situation when the bumper is pressed directly. When both sides are pressed (red and green), the vehicle should turn to the right.