education line - knobloch gmbh

20
education line english / american right-hand traffic CrossRoads traffic light control with splendid ideas plug & learn Connection to USB Developed in practice Instruction and examples Low cost, high quality A process data processing project

Upload: others

Post on 29-Apr-2022

24 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: education line - Knobloch GmbH

education line

english / american right-hand traffic

CrossRoads traffic light control with splendid ideas

plug & learn

Connection to USB Developed in practice Instruction and examples Low cost, high quality

A process data processing project

Page 2: education line - Knobloch GmbH

e du c at ion l in e

2 Antje Bertsch www.anberit.de November 2014

Introduction Today Data Processing as a topic is present in teaching. We tried to do justice to this progress and developed CrossRoads as a process data processing project for use in schools. CrossRoads has a large number of positive properties, among them its portable size and the possibility to connect it to the PC via USB without using an external interface or an additional power supply. True to the motto Plug & Learn! The programs introduced in this brochure are the result of practical experience in teaching. You may gain an impression of what possibilities CrossRoads offers to students of different ages and levels of development. We recommend the use of CrossRoads in practice for students aged 13 to 16. The module depicts an intersection with a set of traffic lights including 4 traffic lights and 8 pedestrian-operated lights. Hall-effect sensors help to detect exceeding the speed limit or red light runners by activating a speed trap. A brightness sensor controls the street light and allows the changeover to night service. Using ROBO Pro control software by fischertechnik, students can create flow charts on the graphical user interface and see them on the screen. These programs can then be tested on the module and students have an immediate sense of achievement. Programming with Java, Delphi or other programming languages for teaching higher grades is possible, corresponding drivers and instruction are available. Information available under http://www.ftcommunity.de/ftComputingFinis/ . Controlling the module with the free, object-oriented programming language BlueJ is possible. Find more information under http://did.inf.uni-bayreuth.de/?id=2995

November 2014 Antje Bertsch Ralf Knobloch Realschullehrerin Knobloch GmbH

Contents Page 1. The ROBO Pro software ……………………………..….………….…………… 3 2. Interface settings for CrossRoads ………...……………...……...………………… 5 3. Introduction to traffic light control …….………….……………………………….... 7 4. Hints for the work with ROBO Pro …………………………………………… 8 5. Pedestrian-operated lights ………… …….. ……………………………………. 12 6. Changeover to night service … … … ……………….………….….…….. 16 7. Traffic lights control and speed trap………….………………………………….… 17 8. Products from the e duc at ion l ine …………………….…..……………….... 19

Page 3: education line - Knobloch GmbH

e du c at ion l in e

November 2014 Antje Bertsch www.anberit.de 3

1. The ROBO Pro software 1.1. Installing ROBO Pro and the driver for the ROBO interface

♦ To use RObO Pro at home or at school there are different licenses available under http://www.knobloch-gmbh.de/wbc.php?sid=49617ef2daa&pid=210&tpl=pr1510detail.html

♦ The installation of ROBO Pro software is easy, but you must be admin on your PC to manage the driver installation.

♦ Since summer 2011 the new version 3 of RoboPro has been available, including the drivers for win 7. You can use the following operating systems: Windows XP (32 und 64-Bit) Windows Vista (32 und 64-Bit) Windows 7 (32 und 64-Bit)

♦ Since summer 2012 you will find the update RoboPro 3.1.3 on http://www.fischertechnik.de/home/downloads/Computing.aspx this update is applicable for all languages, because changing of the language is now possible by activating a button in the program.

♦ If you didn’t get the latest version from your retailer, install first an older version and then download and install the latest update immediately.

♦ Connect CrossRoads to the USB port. On PC’s with win 7 the driver installation goes on automatically.

♦ For other operating systems please have a look in the manual. Standard directory for USB drivers: C:\Program Files\ROBOPro\USB Driver Install We recommend the user-defined installation by choosing the path mentioned above to find the drivers.

♦ The drivers for windows operating systems older than win 7 don’t have any Microsoft digital signature, so you have to confirm the installation as administrator.

1.2. Trial version for Students Under http://www.fischertechnik.de/home/downloads/Computing.aspx there is a free ROBO Pro trial version available.

Select the English version by clicking on the text Demoversion ROBO Pro Software englisch - 7,19 MB in the middle of the window. The trial version includes the program’s most important functions. Students can use it to create programs at home though the trail version does not allow controlling hardware. They can also use it to set inputs in the simulation mode and to test basic ROBO Pro functions. The output’s state is displayed in the test window. Attention The new version ROBO Pro 3.1.3 is not downwardly compatible to the previous versions! Your students cannot start the programs edited with the actual demo-version at home, if at your school there is still the anterior version 2.x installed!

Page 4: education line - Knobloch GmbH

e du c at ion l in e

4 Antje Bertsch www.anberit.de November 2014

The illustration shows ROBO Pro program controlling a simple sequence.

Program Window

1.3 ROBO Pro Program Windows and Program Elements To start ROBO Pro, click on the Start button you see in the task bar and then select Programs. In the Start menu you will find an entry named ROBO Pro. You will also find the following entries in this folder: To familiarize with the user interface, we shall open a ready-made sample program. Set Level 2 to control the module’s inputs and outputs. This is necessary, as some elements are not available in Level 1. You will find the basic elements to create a program in the following folder:

Program Elements In order to create flow charts, program elements from the element window on the left side of the screen can be moved into the program window. The finished flow charts can then be checked before being tested using a CrossRoads module connected to the PC.

cars length red light

red amber light green light amber light

Here you must switch to Robo IF

Page 5: education line - Knobloch GmbH

e du c at ion l in e

November 2014 Antje Bertsch www.anberit.de 5

2. Interface settings for the CrossRoads module

Before testing ROBO Pro with a CrossRoads module, the settings required to run the program have to be chosen. Click on the icon to open the following window. Here you can select the settings for the USB port and the Interface Hint: If an error warning („no Interface found“) appears on the screen after selecting the USB port, open the system control (System control / System / Hardware / Device Manager for "USB-Controller") and check if the driver has been set up correctly. In order to transmit the commands from the program to the module, an Interface is required. Four Interfaces are already embedded in the CrossRoads module, each to control a set of traffic lights.

Click on this icon in the toolbar to open the following window. Use it to check the names for the various traffic lights and their corresponding interfaces in the terminal diagram on the next page.

The standard interface is named IF1.

EM1 EM2 EM3 are the extension modules. Set up the Interface EM2, click on the outputs O1 to O8 one after the other and check which lamps light up consequently.

You will find this icon in the middle of the program’s toolbar.

Page 6: education line - Knobloch GmbH

e du c at ion l in e

6 Antje Bertsch www.anberit.de November 2014

Occupation of outputs and inputs

Inputs O8 O7 O6 O5 O4 O3 O2 O1 Byte 0 - Interface: D7 D6 D5 D4 D3 D2 D1 D0 (Robo-Interface) main road right main road left green amber red green amber Red Byte 1 (EM1): D7 D6 D5 D4 D3 D2 D1 D0 street camera intersecting street top intersecting street bottom light LED green amber red green amber red Byte 2 (EM2): D7 D6 D5 D4 D3 D2 D1 D0 pedestrian-operated lights IS top IS bottom MR right MR left (situated on the corresponding traffic lights) left right top bottom green red green red green red green Red Byte 3 (EM3): D7 D6 D5 D4 D3 D2 D1 D0 pedestrian-operated lights IS top IS bottom MR right MR left (vis-à-vis the corresponding traffic lights) right left bottom top green red green red green red green red Inputs I8 I7 I6 I5 I4 I3 I2 I1 Byte 0 - Interface: sensors activating D7 D6 D5 D4 D3 D2 D1 D0 pedestrian lights (Robo-Interface) intersecting street main road top bottom right left right left left right bottom top top bottom Byte 1 (EM1): magnetic sensors D7 D6 D5 D4 D3 D2 D1 D0 (manhole cover) centre intersecting street main road top bottom top bottom right left

Page 7: education line - Knobloch GmbH

e du c at ion l in e

November 2014 Antje Bertsch www.anberit.de 7

3. Introduction to traffic lights control 3.1. Simple traffic signal The flow chart on page 4 shows a simple traffic signal sequence for cars; it starts with the red light.

Create the program P1_lights_simple in accordance to the example on page 4. Connect CrossRoads to your PC and check the interface settings. Start and check the program P1_lights_simple.

3.2. Main road traffic lights Both lights positioned on the main road corners (down left and top right on the module) are supposed to work synchronously. Look on the terminal diagram on the front page and think about how to modify the program P1_lights_simple to operate both traffic lights at the same time. Check the opposite program. Save the program as P2_lights_main. See page 6 and think about how to control the traffic lights along the intersecting street to lead in such a sequence. Note down the result: intersecting street intersecting street top bottom red red amber amber green green

If you have difficulty with creating programs, work through the following pages to familiarize with the functions. On page 9 we will learn how to copy a whole group of elements if you want to take over main parts from an already existing program. Use this instruction to create the program for the traffic lights along the intersecting street. In order to create the program P3_lights_intersecting, you should start with a red light for the intersecting street. This will faciliate the combination of programs for the main road and the intersecting street. It is advisable to copy the program P2_lights_main first and insert it into the same window. Now you can easily change the output occupation by comparing the programs.

Page 8: education line - Knobloch GmbH

e du c at ion l in e

8 Antje Bertsch www.anberit.de November 2014

4. Tips for the work with RoboPro Many ROBO Pro functions are well acquainted to students who use to work with a computer. The most important will be explained in the following chapters.

4.1 The RoboPro toolbar

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 To familiarize with ROBO Pro, move the mouse onto the icons on the toolbar and note the corresponding functions (set Level 2!)

1 Open the drawing surface for a new RoboPro program

2 ................................................................................................................................................

3 ................................................................................................................................................

4 ................................................................................................................................................

5 ................................................................................................................................................

6 ................................................................................................................................................

7 ................................................................................................................................................

8 ................................................................................................................................................

9 ................................................................................................................................................

10 ................................................................................................................................................

11 ................................................................................................................................................

12 ................................................................................................................................................

13 ................................................................................................................................................

14 ................................................................................................................................................

15 Run the ROBO Pro program on the debugger. ....................................................................

16 Interrupt the program on the debugger. ................................................................

17 Run a part of the your program on the debugging program. .................................................

18 ...............................................................................................................................................

19 ...............................................................................................................................................

A debugger is looking for

firmware errors and diagnostic

for hardware errors.

Page 9: education line - Knobloch GmbH

e du c at ion l in e

November 2014 Antje Bertsch www.anberit.de 9

4.2 Inserting program elements and selecting their properties A recommendable manual that goes with ROBO Pro is published by and available from fischertechnik. Program functions are well explained in that manual though primarily with regard to fischertechnik modules. Components required especially for the work with CrossRoads will be explained in this section, any remaining questions will be answered in the manual. ROBO Pro helps to create the flow charts you need to control the CrossRoads traffic lights. A program always starts with the start element. The ROBO Pro start elements shows a walking

human figure. In accordance with this, you use a stop element to close off the program and avoid an endless loop. The stop element shows a standing human figure.

As described on page 4, you must work with Level 2 when the CrossRoads module is connected to the PC. After selecting the basic elements at the top of the window, you will find the available program elements on the left side of the screen. Basic elements can be inserted by using the drag&drop function. Individual program elements can be moved while holding down the left mouse button after having red-marked them. To mark groups of elements and move them, you start by drawing a rectangle around the elements while holding down the left mouse button. If you now left click on one of the marked elements and move it by using the left mouse button, the whole group of elements is moved. Copying elements works in a similar way. If you press CTRL+C on the keyboard or click on Copy on the Edit menu, you can change over to any program and re-insert the elements with CTRL+V or Edit/Paste. You can also use CTRG+X to cut elements. To delete elements you can either mark them in red and press the ”delete” key (Del) on the keyboard or click on the delete button in the toolbar. You will find the Undo function to retrieve a deleted element in the Edit menu. Right click on a program element in the program to open a dialog window in which you can change the element’s properties. Here the lamp assigned to output O2 from Interface IF1is switched off.

Here you can select various connections as well. You will find different context menus corresponding to different program elements like sensor inputs for the button activating the pedestrian lights or the magnetic sensors embedded in the manhole covers.

Page 10: education line - Knobloch GmbH

e du c at ion l in e

10 Antje Bertsch www.anberit.de November 2014

4.3 Connecting program elements Normally program elements can be linked directly while they are inserted. In order to do so, the inserted element has to be approached to within less than two grid points of the first. Program flow arrows will then appear automatically. If a line should ever not correctly be joined to a connection or another line, this will be indicated by a green rectangle at the point of the arrow. In this case you have to create the connection by shifting the line or by deleting it and drawing it again. Otherwise the program will not work at this point. Queries and branches as you find them with the pedestrian sensors require additional connections. You can draw connection lines by clicking on the left mouse button and holding it down. In the meantime, a little hand will appear on the screen. step 1 step 2 step 3 step 4 Start drawing the line Draw the Click with the mouse Stop at the output line to change direction at the entrance Connection lines can be changed later by left-clicking on the line and moving it while holding down the left mouse key. The following cases may be displayed:

If the mouse is positioned over a vertical connection line, you can move the whole vertical line while holding down the left mouse key.

If the mouse is positioned over a horizontal connection line, you can move the whole horizontal line while holding down the left mouse key.

If the mouse is positioned over an oblique connection line, a new point is inserted into the connecting line when you left-click. You have to hold the left mouse key down, not releasing it until the mouse is positioned where the new point is to be placed.

If the mouse is positioned near an end point or a corner of a connecting line, you can move this point while holding down the left mouse key. You can only move a connected line endpoint to another suitable program element connection. In this case the endpoint of the connecting line will be linked to this connecting line. Otherwise, the point will be moved.

Page 11: education line - Knobloch GmbH

e du c at ion l in e

November 2014 Antje Bertsch www.anberit.de 11

4.4 Subprograms The more functions and conditions a program contains, the more confusing it will become. For that reason individual steps can be put together in a so called subprogram allowing an overall view. To reuse often repeated functions and processes in different contexts, they can be brought together in such subprograms. Now practice the function ”Insert Subprogram” using the example of the main road’s traffic lights changeover to red signal after the pedestrian lights were activated. Take the familiar program P2_traffic lights_main as your starting point. Subprograms can be fitted into an existing main program by clicking on this icon in the toolbar. You can enter an appropiate name for the subprogram into the now appearing window.

Open the program P2_traffic lights_main, click on the icon Insert subprogram and name the subprogram Pedestrian left. A drawing surface opens up and at the top of the screen the new index card Pedestrian left will appear next to the index Main Program.

Like the main program, a subprogram always begins with a start element. In ROBO Pro, they look like this:

These elements will appear on the screen after opening the subsidiary point Subprogram from the element window on the left. Insert them both and switch to Basic elements to create the subprogram Pedestrian left.

You will find some useful hints concerning a possible operational sequence on the next page.

Once you have succesfully created the subprogram, you must save it.

A saved subprogram can be inserted in a main program by clicking on Loaded Programs and cklicking on the just saved main program afterwards.

The symbols for the programs that have been saved up to now will appear in the element window.

The subprogram Pedestrian left can now be inserted into the main program like a program element.

Now develop the program P4_main+pedestrian_demand using the instruction on the

following page.

Page 12: education line - Knobloch GmbH

e du c at ion l in e

12 Antje Bertsch www.anberit.de November 2014

5 Pedestrian-operated lights 5.1 Signal + pedestrian sensor (on-demand service) We will now create a program intended for controlling traffic lights on a busy road. The traffic lights are supposed to turn to red only after a pedestrian pressed an activating button in order to cross the road. In practice, intervening periods are included. Can you imagine why? Tabular description of traffic signals: main road pedestrian

Create the program for main road left and the crosswalk with its pedestrian lights located there. Note down next to the signals above the Interface’s inputs and outputs you want to use.

main road usually is given a green light to ensure the flow of traffic–outputs O3 and O6 of the Interface IF1

crosswalk signals light up red– outputs EM2 O1 and EM3 O1 a pedestrian presses the activating button, e.g. input I1

( or I2, later I3 or I4) main road traffic lights turn to amber

outputs O3 and O6 for green light off outputs O2 and O5 for amber light on

main road traffic lights turn to red outputs O2 and O5 for amber light: off outputs O1 and O4 for red light: on pedestrian lights are still red (safety phase)

main road traffic lights turn to red (for 10 seconds), while pedestrian have a green light pedestrian outputs EM2 O2 and EM3 O2 on (for 10 seconds)

crosswalk signals turn to red, main road is given a red light too (safety phase)

red and amber signals for cars– outputs O2 and O5 are switched on

outputs for red and amber lights are switched off - return to the start element Create the program in ROBO Pro, save it as P4_main+pedestrian_demand and test it. This makes clear how useful it is to save often repeated processes in a subprogram and simply re-insert them in the main program. You will find the necessary instruction on the previous page, e.g. Pedestrian left.

cars length pedestrian sequence green long 5s red (until activated) green light amber short 2s red amber light

red short 2s red safety phase red long 10s green red light red short 2s red safety phase

red-amber short 2s red red-amber

Page 13: education line - Knobloch GmbH

e du c at ion l in e

November 2014 Antje Bertsch www.anberit.de 13

Proposed solution to P4_main+pedestrian_demand Traffic lights + pedestrian sensor (on-demand service) only for sensors I1 and I2 (pedestrian crosswalk on the left side of the module)

Extend the program to include the querying sensors controlling the pedestrian lights on the right side of the module. In parallel with the pedestrian lights on the left, the lights on the right will turn to green. As soon as a pedestrian activates one of the four crosswalk buttons on the right (I3 or I4) or the left (I1 or I2) the main road traffic lights will turn red while the pedestrian on both sides of the module will have a short green phase. Save the program as P5_main+pedestrian_demand_all.

Here you can work with another ROBO Pro function, the logic Operators to be precise. This requires to set Level 3. The number of inputs for the Operators is set in the context menu

using the right mouse button. The sensors can be found via Inputs, Outputs. Under Branch, Wait you will

find the element you must insert in the program as “branch” instead of sensor

pedestrian left

Page 14: education line - Knobloch GmbH

e du c at ion l in e

14 Antje Bertsch www.anberit.de November 2014

5.2 Traffic lights + and opposing traffic lights Let the traffic lights situated on the corners of the respective street run synchronously. Select the necessary CrossRoads outputs and note them down next to the following picture showing the concerned traffic light sequence. It will be helpful to consult the terminal diagram on page 6. The intervening period from when a red light is displayed and when the intersecting street is given a green light is called all-red time. It allows drivers who could not stop at the amber light or those who “jumped the gun” to clear the intersection. Here you see the combination of the sequences: traffic lights traffic lights left right main road traffic light traffic lights top bottom intersecting street

5 Sec. 2 Sec. 2 Sec. 2 Sec. 5 Sec. 2 Sec. 2 Sec. 2 Sec.

There are two possibilities to combine the different traffic lights in ROBO Pro: 1. Take the finished program P2_traffic lights_main, copy the program P3_traffic

lights_intersecting next to it and adjust sequences and lengths. Let them run simultaneously in ROBOPro as P6_intersection afterwards.

2. Control the traffic light’s inputs with the same program such as P7_intersection Couldn’t you imagine a clearer solution by using subprograms?

Page 15: education line - Knobloch GmbH

e du c at ion l in e

November 2014 Antje Bertsch www.anberit.de 15

5.3 Main road and intersecting street including crosswalks Now the pedestrian lights along the intersecting street should turn green whenever the main road traffic lights do so. In accordance, the main road pedestrian lights turn to green every time the drivers on the intersecting street have a green signal. The demand-sensors should not be used this time. Create the program P8_intersection_crosswalk using subprograms as follows:

Names of the subprograms: Hauptstr_Grün Main road green

FG_Hauptstr_rot Pedestrian_MainRoad_red

FG_Neben_grün Pedestrian_IntersectionStreet_green

FG_Neben_rot Pedestrian_IntersectionStreet_red

Wechsel_Haupt_N Change_MainStreet_IntersectionStreet

FG_Hautstr_grün Pedestrian_MainRoad_green

Wechsel_Neben_H Change_IntersectionStreet_MainStreet

Try to change the program for the following situation: Green-light of the main road should be longer than the green-light of the intersecting street.

Page 16: education line - Knobloch GmbH

e du c at ion l in e

16 Antje Bertsch www.anberit.de November 2014

6 Changeover to night service Traffic lights are often inactive at night and give up the standard three-coloured sequence. They just emit an amber-coloured flashing signal which means “caution”. The changeover to night service often depends on the incidence of light. For this reason there is a brightness sensor top right in the module. The street lighting can be switched on when the brightness sensor gets too little light. Set Level 3 to use the Input for querying the LDR (Light Dependent Resistor). Select the program elements Panel input and Panel display by right-clicking on the context menu tabs. Displays are inserted automatically. Use the program P7_intersection and insert it as a subprogram named Intersection in the new program P9_night.

Names of the subprograms: Tag-Umschalt Day-Changing Kreuzung Intersection Nacht-Umschalt Night-Changing Nachtblinken Night-pulsating-light

Page 17: education line - Knobloch GmbH

e du c at ion l in e

November 2014 Antje Bertsch www.anberit.de 17

7 Traffic lights control and speed trap 7.1 Speed traps detecting vehicles disobeying the speed limit Two Hall-effect sensors EM1-I1 and EM1-I5 responsive to magnets are embedded in the side of the main road running from the left to the right. If a driver exceeds the speed limit, he falls below the time he would need when driving at the permitted speed. If both sensors are activated within a fixed period (here three seconds), the car was going too fast and the speed trap EM1-O7 , which is connected to the triggering mechanism for the sensors will emit a red flash of lightning. To implement these conditions in a ROBO Pro program, you must insert variables, command elements and branches. The necessary elements will be at your disposal in Level 3. You can enter a name for the Variables depending on its function. Variables are also able to

store numerical values. Using Command elements, you can assign values to the variables. Every new command

can change the values in the course of the program. You can link two parallel-running programs with the help of variables and a Branch element

able to query their values. Create the program P10_Radar1, save it and copy it next to the program named P8_intersection_crosswalk (see page 15). Then start the programs simultaneously in online mode. Now take a magnet and drive along the main road while the signal is green. Pass the sensors EM1-I1 and EM1-I5 one shortly after the other. If every step is carried out correctly, the speed trap will emit a flash of lightning.

Page 18: education line - Knobloch GmbH

e du c at ion l in e

18 Antje Bertsch www.anberit.de November 2014

7.2 Speed trap detecting red light runners crossing against a red or amber light Now three programs run simultaneously:

1. The main program PR8_intersection_crosswalk (see Section 5.3). The command element you see on the right has to be added to the program in order to activate the speed trap exclusively after a green light.

2. A program that queries the sensor EM1-I1 on the left side of the module and passes the value 1 to the operator input C when a car activates the sensor.

3. A program that activates the speed trap EM1-O7 and sets operator input C back to 0 afterwards.

In order to prepare the main road’s surveillance when the traffic lights are red, the first variable and with it operator input A must be set to 1. This will be caused by the subprogram change_main_intersecting that controls the traffic light’s changeover from green to red signal. Value 1 is needed for the query by the logical operator and. Only if all and-Operator inputs are set to 1, the speed trap is activated. If a car (magnet) passes the sensor EM1-I1 although main road traffic lights are turning to red, the operator input C gets the value 1. The middle operator input B receives the signal 1, if a car passes sensor EM1-I5 shortly after that. The speed trap is activated, if all described conditions for the operator inputs are met at the same time. Disadvantage: As all sensors in the module are embedded in the road surfaces, a car driving on the intersecting road and passing the sensor EM1-I5 could also activate the speed trap. PR8_intersection_crosswalk

speed trap

- Variable main_red - Query sensor EM1-I5 - Variable EM1-I1 activated

Program for querying sensor EM1-I1 main road left side

PR8_intersection_crosswalk

speed trap

- Variable main_red - Query sensor EM1-I5 - Variable EM1-I1 activated

Program for querying sensor EM1-I1 main road left side

PR8_intersection_crosswalk

speed trap

- Variable main_red - Query sensor EM1-I5 - Variable EM1-I1 activated

Program for querying sensor EM1-I1 main road left side

Page 19: education line - Knobloch GmbH

e du c at ion l in e

November 2014 Antje Bertsch www.anberit.de 19

8 Products from the education l ine* 8.1 Programs corresponding to the

CrossRoads module

„CrossRoads“ * Prices on request or at http://www.knobloch-gmbh.de educatione line – USB-Produkte

8.2 Traffic light control Plug & Learn with modules for younger students „Signal“ „TrafficLights“ You can simulate many examples of this booklet with the small model TrafficLights since it includes not only two traffic lights but there is also an activating button for pedestrian demand and a brightness sensor for changeover to night service.

When reading all examples of the model CrossRoads you will soon find out, how to imitate this situations in a simple way with the model TrafficLights.

Set of Traffic Lights

♦ day and night service via brightness sensor

♦ additional LED in the middle allows random selection programs

♦ sensors activating pedestrian lights

O1 O2 O3

O4 O5 O6

A1

O7

I1

Page 20: education line - Knobloch GmbH

e du c at ion l in e

20 Antje Bertsch www.anberit.de November 2014

8.3 Look-out running lights – discolight – play dice Make the lights of the small model TrafficLights work step by step in a circle – at first rotating

counter-clockwise and after a small break clockwise. Create the program in an infinite loop. Save your program as TL_infinite.

Start the program with the light in the middle – output O7 – and start the running of the lights only after somebody has pressed the activating button. Save as TL_Push.

You can even play dice with the small model TrafficLights!

one two three

four five six

Develop subprograms for each number and then make different new programs like: dice_1-6 counting up from 1 to 6 or dice 6-1 counting down

Antje Bertsch - Realschullehrerin – E-Tutorin und ECDL-Trainerin

Alte Wiese 5 Tel.: +49 2620 301 4275 Mail: [email protected]

D 56337 Simmern / Ww Mobil: +49 173 6743 772 Web: www.anberit.de

Knobloch GmbH

Selitstraße 10 Tel.: +49 (0)6731/4962-0 [email protected] D-55234 Erbes-Büdesheim Fax: +49 (0)6731/4962-19 www.knobloch-gmbh.de