Repository navigation
Expand file tree
/
Copy pathNetzwerktester_14M2.bas
More file actions
87 lines (75 loc) · 1.61 KB
/
Copy pathNetzwerktester_14M2.bas
File metadata and controls
87 lines (75 loc) · 1.61 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
#picaxe 14m2
symbol DELAYTIME = 500 ; Pausenzeit in ms nach jeder LED
symbol LED1 = C.0
symbol LED2 = C.1
symbol LED3 = C.2
symbol LED4 = B.5
symbol LED5 = B.4
symbol LED6 = B.3
symbol LED7 = B.2
symbol LED8 = B.1
symbol LED9 = C.4 ; Schirm
symbol counter = b2
symbol ledNumber = b3
gosub clearAllLeds
main_loop:
ledNumber = 0
for counter = 1 to 9
gosub clearLed ; aktuelle LED aus
inc ledNumber ; LED-Nummer erhoehen
gosub setLed ; aktuelle LED an
pause DELAYTIME
next counter
gosub clearLed ; aktuelle LED aus
pause DELAYTIME ; 2 Takte lang alle LEDs aus
pause DELAYTIME ; ~
goto main_loop
setLed: ; schaltet LED mit Nummer in Variable "ledNumber" (1-9) ein
select case ledNumber
case 1
high LED1
case 2
high LED2
case 3
high LED3
case 4
high LED4
case 5
high LED5
case 6
high LED6
case 7
high LED7
case 8
high LED8
case 9
high LED9
endselect
return
clearLed: ; schaltet LED mit Nummer in Variable "ledNumber" (1-9) aus
select case ledNumber
case 1
low LED1
case 2
low LED2
case 3
low LED3
case 4
low LED4
case 5
low LED5
case 6
low LED6
case 7
low LED7
case 8
low LED8
case 9
low LED9
endselect
return
clearAllLeds: ; schaltet alle LEDs 1-9 aus
for ledNumber = 1 to 9
gosub clearLed
next ledNumber
return