From 0d4eb26ca3ecc49107f1a35ce28c5c28fa57d379 Mon Sep 17 00:00:00 2001 From: Alexander Alber Date: Mon, 6 Jun 2022 15:54:10 +0200 Subject: [PATCH] arduino sketch has to be in folder of same name --- .../arduino_zauberstab.ino | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) rename arduino/beta_arduino_due.ino => arduino_zauberstab/arduino_zauberstab.ino (92%) 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];