PROGRAMMING SCHOOL
ProgBlox Set - examples
1. Example 1 - Ramp - 1 limit switch
2. Example 2 - Ramp - 2 limit switches
3. Ramp - saved program from example 2
4. Example 3 - The vehicle follows the light

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.