Browse Source

Update 'Teensy4.1_Datalogger new.ino'

master
Julian Graf 1 year ago
parent
commit
0b00b4d39b
1 changed files with 4 additions and 1 deletions
  1. 4
    1
      Teensy4.1_Datalogger new.ino

+ 4
- 1
Teensy4.1_Datalogger new.ino View File

@@ -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++) {

Loading…
Cancel
Save