BlynkTimer.h Simpletimer confrontation


Blynk has a problem with SimpleTimer didnt worked together, because of this:

    /tmp/759171214/custom/Blynk/src/Blynk/BlynkTimer.h:38:36: error: conflicting declaration 'typedef void (* timer_callback)()'
    typedef void (*timer_callback)(void);
    In file included from /tmp/759171214/blynk_audio/blynk_audio.ino:35:0:
    /tmp/759171214/custom/SimpleTimer/SimpleTimer.h:42:35: error: 'timer_callback' has a previous declaration as 'typedef class std::function<void()> timer_callback'
    typedef std::function<void(void)> timer_callback;
    /tmp/759171214/blynk_audio/blynk_audio.ino: In function 'void setup()':
    /tmp/759171214/blynk_audio/blynk_audio.ino:83:3: error: 'timer' was not declared in this scope
    /tmp/759171214/blynk_audio/blynk_audio.ino: In function 'void loop()':
    /tmp/759171214/blynk_audio/blynk_audio.ino:130:3: error: 'timer' was not declared in this scope;
    exit status 1

my code

    #include <Arduino.h>
    #undef max
    #undef min
    /* Comment this out to disable prints and save space */
    #define BLYNK_PRINT Serial
    // SimpleTimer - Version: Latest 
    #include <SimpleTimer.h>
    #include <FHT.h> //source
    #include <AudioAnalyzer.h>//source
    #include <SPI.h>
    #include <WiFi101.h>
    #include <BlynkSimpleMKR1000.h>

    //------------Initialize the variables for the AUDIO sensor

    #define SoundSensorPin A0  //this pin read the analog voltage from the sound level meter
    #define VREF  5.0 

    //to identify which freq band range is the loudest,
    // its need to be labelled by its peak num
    // Always show the max magnitude from the sound signal

    Analyzer Audio = Analyzer(4,5,0);//Strobe pin ->4  RST pin ->5 Analog Pin ->0
    //Analyzer Audio = Analyzer();//Strobe->4 RST->5 Analog->0 
    //String FreqNames[] = {"63", "160","400", "1K","2.5K", "6.25K","16K"};
    int FreqNames[] = {63,160,400,1000,2500,6500,16000};
    int FreqVal[7];//
    int max_index;//
    //int hz = 0;
    float voltageValue,dB;

    //to identify the testperson
    int testperson = 1;

    // Create instance of WiFi client
    WiFiClient client;
    char auth[] = "";

    // Your WiFi credentials.
    // Set password to "" for open networks.
    char ssid[] = "";
    char pass[] = "";

    SimpleTimer timer;

    void setup()
      // Debug console
      Audio.Init();//Init module

      Blynk.begin(auth, ssid, pass);

    void soundSensor()
      Audio.ReadFreq(FreqVal);//return 7 value of 7 bands pass filiter 
                              //Frequency(Hz):63  160  400  1K  2.5K  6.25K  16K
                              //FreqVal[]:      0    1    2    3    4    5    6  magnitude
      max_index = 0;
        for(int i=1; i<7; i++)   //         
        if (FreqVal[max_index] < FreqVal[i]) max_index = i;
      Serial.println("Frequenzy: ");
      voltageValue = analogRead(SoundSensorPin) / 1024.0 * VREF;
      dB = voltageValue * 50.0;
      Serial.println("Volume: ");
      Blynk.virtualWrite(V1, dB);
      Serial.println("testperson: ");
      Blynk.virtualWrite(V2, testperson);

    void loop()
        // Connects to the WiFi
      // If the network does not need a password: WiFi.begin(ssid);
      WiFi.begin(ssid, pass);
      //delay(10000);   // Waits 10 seconds to confirm connection
      // Print WiFi strength information;;
      printCurrentNet() ;
      // Disconnects from the WiFi
    void printCurrentNet() {
      // Print the WiFi signal strength:
      long rssi = WiFi.RSSI();
      Serial.print("Signal strength (RSSI): ");
      Serial.println(" dBm");

If the Simpletimer is excluded Arduino is verified the code and its connecting but Blynk doesnt seems to read anything


To clarify this issue/solution.

As per the Documentation … BlynkTimer has long since replaced SimpleTimer by being embedded into the Blynk Library and thus no need to include SimpleTimer library anymore. Otherwise it’s operation and commands work the same, even improved.

Closing this topic.