BLYNK
BLYNK.IO       📲 GETTING STARTED       📗 DOCS       👉 SKETCH BUILDER

I’m having compile error “no matching function..”

Whent I try to compile my sketch, IDE shows the following error:

no matching function for call to 'BlynkTimer::setInterval(long int, float&)'

I’m using ESP8266 NodeMCUMOD

I am a newbie at this so most of the codes are just taken from the net and tweaked a bit to match my project
Any ideas?

My full code is here:

#include <ESP8266WiFi.h>
#include <BlynkSimpleEsp8266.h>
#include <SoftwareSerial.h>
#include <SimpleTimer.h>
//#include <Timer.h> //'timer' does not name a type
//#define Timer t
#define SimpleTimer_H
char auth[] = "";
char ssid[] = ""; 
char pass[] = "";
BlynkTimer t;
float Timer1 = 0;


String myString; // complete message from arduino, which consistors of snesors data
char cdata; // received charactors
float WATER; // sensors 
// This function sends Arduino's up time every second to Virtual Pin (1).
// In the app, Widget's reading frequency should be set to PUSH. This means
// that you define how often to send data to Blynk App.
void myTimerEvent()
{
  // You can send any value at any time.
  // Please don't send more that 10 values per second.
  Blynk.virtualWrite(V0, millis() / 1000);
  
}
 
 
 
void setup()
{
//Timer= timer;
  // Debug console
  Serial.begin(9600);
 
    Blynk.begin (auth, ssid, pass);

    Timer1 = t.setInterval(1000L,WATER); 
   

}
void loop() /////////////////////////////////////////////////////////////
{
  //Timer = timer;
   if (Serial.available() == 0 ) 
   {
  Blynk.run();
  t.run(); // Initiates BlynkTimer
   }
   
  if (Serial.available() > 0 ) 
  {
    cdata = Serial.read(); 
    myString = myString+ cdata; 
   // Serial.print(rdata);
    if( cdata == '\n')
    {
   //  Serial.println(myString); 
  // Serial.println("fahad");
// new code
String l = getValue(myString, ',', 0);
 
 
WATER = l.toFloat();
 
  myString = "";
// end new code
    }
  }
 
}
 
void water()
{
float sdata1 = WATER;
  // You can send any value at any time.
  // Please don't send more that 10 values per second.
  Blynk.virtualWrite(V0, sdata1);
 
}

String getValue(String cdata, char separator, int index)
{
    int found = 0;
    int strIndex[] = { 0, -1 };
    int maxIndex = cdata.length() - 1;
 
    for (int i = 0; i <= maxIndex && found <= index; i++) {
        if (cdata.charAt(i) == separator || i == maxIndex) {
            found++;
            strIndex[0] = strIndex[1] + 1;
            strIndex[1] = (i == maxIndex) ? i+1 : i;
        }
    }
    return found > index ? cdata.substring(strIndex[0], strIndex[1]);
}```

@HanGrid please edit your post, using the pencil icon at the bottom, and add triple backticks at the beginning and end of your code so that it displays correctly.
Triple backticks look like this:
```

Pete.

done. thank you good sir

I suggest that you start by reading this…

Pete.