Instructions
14 | Lichtmesser – das Fotometer 69
};
047
048
b
y
te M
y
Char3[8] =
{
049
B11100
,
050
B
111
00
,
05
1
B11100
,
052
B11100
,
053
B11100
,
054
B11100
,
055
B
111
00
,
056
B11100
,
057
}
;
058
0
5
9
b
y
te M
y
Char4[8] =
{
060
B11110
,
061
B11110
,
062
B11110
,
063
B11110
,
064
B11110
,
065
B11110
,
066
B11110
,
067
B11110
,
068
}
;
069
0
7
0
b
y
te M
y
Char5[8] =
{
071
B11111
,
072
B11111
,
073
B11111
,
074
B11111
,
075
B11111
,
076
B11111
,
077
B11111
,
078
B11111
,
079
}
;
080
0
8
1
int adc_AVG(b
y
te channel
)
082
{
083
total= total – readin
g
s[index]; 084
readin
g
s[index] = analo
g
Read(channel)
;
085
tota
l
= tota
l
+ rea
d
ings
[
in
d
ex
]
; 086
index = index + 1
;
087
0
8
8
if (index >= numReadin
g
s)index = 0; 089
0
9
0
average = total
/
numReadings; 091
return average
/
1024.0 * 100.0
;
092
}
093
10174-5 Conrad Arduino Lernpaket_09.indd 6910174-5 Conrad Arduino Lernpaket_09.indd 69 14.07.2015 08:10:3114.07.2015 08:10:31