Compilation error: no matching function for call to 'BlynkStream::begin(SoftwareSerial&, char [33], char [3], char [12])'

What should i do? Arduino UNO

#define BLYNK_TEMPLATE_ID "TMPL63T2iTTND"
#define BLYNK_TEMPLATE_NAME "MLX90614"
#define BLYNK_AUTH_TOKEN "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"

#include <SoftwareSerial.h>
#include <Wire.h>
#include <Adafruit_MLX90614.h>
#include <BlynkSimpleStream.h>

SoftwareSerial espSerial(2, 3); // RX, TX

char auth[] = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"; // Blynk authentication token
char ssid[] = "DA";
char pass[] = "ahkaunakapa";

Adafruit_MLX90614 mlx = Adafruit_MLX90614();

void setup() {
  Serial.begin(9600); // For debugging
  espSerial.begin(9600); // SoftwareSerial for communication with ESP32
  Wire.begin(); // Initialize I2C communication
  mlx.begin(); // Initialize MLX90614 sensor
  Blynk.begin(espSerial, auth, ssid, pass); // Initialize Blynk
}

void loop() {
  Blynk.run();

  if (espSerial.available()) {
    char c = espSerial.read();
    Serial.write(c); // Forward data received from ESP32 to Serial monitor
  }

  if (Serial.available()) {
    char c = Serial.read();
    espSerial.write(c); // Forward data received from Serial monitor to ESP32
  }
  
  float objTemp = mlx.readObjectTempC(); // Read object temperature in Celsius
  float ambTemp = mlx.readAmbientTempC(); // Read ambient temperature in Celsius
  
  Serial.print("Object Temperature: ");
  Serial.print(objTemp);
  Serial.println(" °C");
  
  Serial.print("Ambient Temperature: ");
  Serial.print(ambTemp);
  Serial.println(" °C");
  
  Blynk.virtualWrite(V0, objTemp); // Send object temperature to Blynk
  Blynk.virtualWrite(V1, ambTemp); // Send ambient temperature to Blynk
  
  delay(1000); // Delay for readability
}

I have removed your Blynk authentication token from the code that you posted

The error says there is nothing matching your list of arguments, so the compiler can't find a function that does what you seem this to want to do.

I have failed to find a real document for the begin() method, but have so far I exams,es only seen two variations.

  Blynk.begin(BLYNK_AUTH_TOKEN);

and

  Blynk.begin(BLYNK_AUTH_TOKEN, said, pass);

I have no idea how Blynk starts with just the token, and no idea how you'd tell it that espSerial was somehow involved.

Where did that line of code come from? I assume the code is all or mostly not written by you. Please provide a link if it a project you are borrowing from heavily.

a7

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.