|
|
@@ -196,6 +196,7 @@ private: |
|
|
|
float wind_summ = 0; |
|
|
|
int values[60]; |
|
|
|
int saved_minutes = 0; |
|
|
|
int saved_seconds = 0; |
|
|
|
|
|
|
|
public: |
|
|
|
void measure() { |
|
|
@@ -203,11 +204,13 @@ public: |
|
|
|
wind_sec = map(analogRead(Windfahne), 0, 1023, 20, 350); |
|
|
|
digitalWrite(power_Windfahne, LOW); |
|
|
|
wind_summ += wind_sec; |
|
|
|
saved_seconds++; |
|
|
|
} |
|
|
|
void calculate() { |
|
|
|
values[saved_minutes] = wind_summ; |
|
|
|
values[saved_minutes] = wind_summ / saved_seconds; |
|
|
|
wind_summ = 0; |
|
|
|
saved_minutes++; |
|
|
|
saved_seconds = 0; |
|
|
|
} |
|
|
|
void file_print() { |
|
|
|
for (int i = 0; i < saved_minutes; i++) { |