diff --git a/arduino/beta_arduino_due.ino b/arduino_zauberstab/arduino_zauberstab.ino similarity index 92% rename from arduino/beta_arduino_due.ino rename to arduino_zauberstab/arduino_zauberstab.ino index 010378f..dc903f0 100644 --- a/arduino/beta_arduino_due.ino +++ b/arduino_zauberstab/arduino_zauberstab.ino @@ -7,11 +7,11 @@ #define NUM_LEDS 240 -#define SAMPLING_FREQUENCY_BP 40 -#define SAMPLING_FREQUENCY_CONTROL 1 -#define Q 20. +#define SAMPLING_FREQUENCY_BP 40 // number of energy chunks per second +#define SAMPLING_FREQUENCY_CONTROL 1 // check number of times per second if the current band pass is the best one +#define Q 20. // quality factor of band pass filters #define PI 3.1415926535897932384626433832795 -#define n_BP 20 +#define n_BP 20 //number of band pass filters CRGB leds[NUM_LEDS]; @@ -65,7 +65,7 @@ int rounds = 0; void setup() { - Serial.begin(115200); + //Serial.begin(115200); FastLED.addLeds(leds, NUM_LEDS); FastLED.setMaxPowerInVoltsAndMilliamps(5, 350); @@ -131,7 +131,7 @@ void loop() { { last_us_bp += sampling_period_bp; energy_fil += (energy - energy_fil) * 0.01; - Serial.println(energy); + //Serial.println(energy); for(int i = 0; i < n_BP; i++) { y[i] = (b0[i]/a0[i])*energy + 0. + (b2[i]/a0[i])*u2[i] - (a1[i]/a0[i])*yy1[i] - (a2[i]/a0[i])*yy2[i];