BLYNK
HOME       📲 GETTING STARTED       📗 DOCS       ❓HELP CENTER       👉 SKETCH BUILDER

Error with compilation

Hi everyone! Can you help me?

The screenshot tells us very little.

Copying and pasting the error message, along with the code (don’t forget to use triple backticks at the beginning and end) will tell us much more.

Pete.

[Screenshot deleted by moderator]

[Screenshot deleted by moderator]

Please stop posting screenshots. Copy and paste the code and the compiler messages as described above.

Pete.


I can’t post the code

post it as text

I did, but then this error has appeared (above)

I guess that’s because you’re not using triple backticks when you post it, and it’s treating some if the text as URLs.
Triple backticks look like this:
```
Put them on a line of their own at the start and end of the code or compiler messages that you are trying to post.
If that still doesn’t work then send them to me by private message, but you MUST include the triple backticks otherwise the code will be corrupted…

Pete.

#include <ESP8266WiFi.h> 
#include <BlynkSimpleEsp8266.h> 
#include <BreathDetector.h> 
BreathDetector MyDetector(A0); 
int x, x0, a; 
float out_relax, in_normal; 
int error; 
#define analogPin A0 
 
 
char auth[] = "HQS03enltJfi4hKlm6pmIrVqI_bwOzXa"; 
char ssid[] = "YA"; 
char pass[] = "qwerty123321"; 
 
 
void setup() 
{ 
pinMode(analogPin, INPUT); 
Serial.begin(115200); 
Blynk.begin(auth, ssid, pass); 
} 
 
//void sendTemps() 
//{for (int k = 0; k < 5; ++k){ 
// 
// 
// x = map( analogRead(A0), 0, 1023, -100, 100); 
//// Serial.println(x0 - x); 
// a = x0 - x; 
//sensors.requestTemperatures(); 
//float dx = sensors.getTempCByIndex(0); 
//float dx1 = sensors.getTempCByIndex(1); 
//Serial.println(temp); 
//Blynk.virtualWrite(A0, dh); 
////Blynk.virtualWrite(V2, dx1); 
//} 
 
void loop() 
{ 
Blynk.run(); 
for (int k = 0; k < 5; ++k){ 
 
 
 x = map( analogRead(A0), 0, 1023, -100, 100); 
// Serial.println(x0 - x); 
 a = x0 - x; 
Blynk.virtualWrite(A0); 
 } 
}```

C:\Users\User\Documents\Arduino\libraries\blynk-library-0.6.1\src/Blynk/BlynkParam.h:111:10: note: template argument deduction/substitution failed:

In file included from C:\Users\User\Documents\Arduino\libraries\blynk-library-0.6.1\src/BlynkApiArduino.h:14:0,

from C:\Users\User\Documents\Arduino\libraries\blynk-library-0.6.1\src/BlynkSimpleEsp8266.h:24,

from C:\Users\User\Desktop\dh\dh.ino:3:

C:\Users\User\Documents\Arduino\libraries\blynk-library-0.6.1\src/Blynk/BlynkApi.h:81:9: note: candidate expects 1 argument, 0 provided

cmd.add_multi(values…);

^

In file included from C:\Users\User\Documents\Arduino\libraries\blynk-library-0.6.1\src/Blynk/BlynkApi.h:16:0,

from C:\Users\User\Documents\Arduino\libraries\blynk-library-0.6.1\src/BlynkApiArduino.h:14,

from C:\Users\User\Documents\Arduino\libraries\blynk-library-0.6.1\src/BlynkSimpleEsp8266.h:24,

from C:\Users\User\Desktop\dh\dh.ino:3:

C:\Users\User\Documents\Arduino\libraries\blynk-library-0.6.1\src/Blynk/BlynkParam.h:116:10: note: template<class T, class … Args> void BlynkParam::add_multi(T, Args …)

void add_multi(T head, Args… tail) {

^

C:\Users\User\Documents\Arduino\libraries\blynk-library-0.6.1\src/Blynk/BlynkParam.h:116:10: note: template argument deduction/substitution failed:

In file included from C:\Users\User\Documents\Arduino\libraries\blynk-library-0.6.1\src/BlynkApiArduino.h:14:0,

from C:\Users\User\Documents\Arduino\libraries\blynk-library-0.6.1\src/BlynkSimpleEsp8266.h:24,

from C:\Users\User\Desktop\dh\dh.ino:3:

C:\Users\User\Documents\Arduino\libraries\blynk-library-0.6.1\src/Blynk/BlynkApi.h:81:9: note: candidate expects 2 arguments, 0 provided

cmd.add_multi(values…);

^

Используем библиотеку ESP8266WiFi версии 1.0 из папки: C:\Users\User\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.5.2\libraries\ESP8266WiFi
Используем библиотеку blynk-library-0.6.1 версии 0.6.1 из папки: C:\Users\User\Documents\Arduino\libraries\blynk-library-0.6.1
Используем библиотеку Breath_lib_v1.0 в папке: C:\Users\User\Documents\Arduino\libraries\Breath_lib_v1.0 (legacy)
exit status 1
Ошибка компиляции для платы Generic ESP8266 Module.```

The syntax for Blynk.vitrualWrite is Blynk.vitrualWrite(VPin,value) so you’re missing a parameter.

Secondly, you shouldn’t be doing virtual writes in your void loop, you’ll flood the server. Read this:

Pete.