good day after a year I wanted to upload this program to wemos d1 R1 and it says this error: exit status 1 no matching function for call to 'SoftwareSerial::SoftwareSerial(int, int, bool, int)
and I don’t know why… thanks
#include <ESP8266WiFi.h>
#include <BlynkSimpleEsp8266.h>
//#include "Adafruit_Si7021.h"
#include <SI7021.h>
#include <SoftwareSerial.h>;
#include <Nextion.h>
#include <SimpleTimer.h>
#include <Wire.h>
float temp, hum;
SimpleTimer timer;
//extern SoftwareSerial HMISerial;
//SI7021 sensor;
SoftwareSerial HMISerial(12, 14, false, 256); //RX-D 5 , TX-D 6
Nextion myNextion(HMISerial, 9600);
// You should get Auth Token in the Blynk App.
// Go to the Project Settings (nut icon).
char auth[] = "89ae8723b68d424ca5ae46c1e7813fdb";
// Your WiFi credentials.
// Set password
char ssid[] = "boss";
char pass[] = "";
float temperature;
float humidity;
void sendUptime()
{
int brightness = analogRead(A0);
int bright = map(brightness, 0, 1033, 85, 02);
String dim = "dim=" + String(bright);
myNextion.sendCommand(dim.c_str());
}
BLYNK_WRITE(V1)
{
float currentHour = param.asFloat(); // assigning incoming value from pin V5 to a variable
// You can also use:
// String i = param.asStr();
// double d = param.asDouble();
//Serial.print("currentHour is: ");
//Serial.println(currentHour);
myNextion.setComponentText("t",String( currentHour));
}
BLYNK_WRITE(V2)
{
float currentMinute = param.asFloat(); // assigning incoming value from pin V5 to a variable
// You can also use:
// String i = param.asStr();
// double d = param.asDouble();
//Serial.print("currentMinute is: ");
//Serial.println(currentMinute);
myNextion.setComponentText("t",String( currentMinute));
}
BLYNK_WRITE(V3)
{
float currentDate = param.asFloat(); // assigning incoming value from pin V5 to a variable
// You can also use:
// String i = param.asStr();
// double d = param.asDouble();
// Serial.print("currentDate is: ");
//Serial.println(currentDate);
myNextion.setComponentText("t", String(currentDate));
}
BLYNK_WRITE(V5)
{
float temperature = param.asFloat(); // assigning incoming value from pin V5 to a variable
// You can also use:
// String i = param.asStr();
//double d = param.asDouble();
// Serial.print("temperature is: ");
// Serial.println(temperature);
myNextion.setComponentText("t0", String(temperature));
}
BLYNK_WRITE(V6)
{
float humidity = param.asFloat(); // assigning incoming value from pin V5 to a variable
// You can also use:
// String i = param.asStr();
// double d = param.asDouble();
//Serial.print("humidity is: ");
//Serial.println(humidity);
myNextion.setComponentText("t2", String(humidity));
}
BLYNK_WRITE(V4)
{
float lux = param.asFloat(); // assigning incoming value from pin V5 to a variable
// You can also use:
// String i = param.asStr();
// double d = param.asDouble();
//Serial.print("lux is: ");
// Serial.println(lux);
myNextion.setComponentText("t15", String(lux));
}
BLYNK_WRITE(V7)
{
float co2_ppm = param.asFloat(); // assigning incoming value from pin V5 to a variable
// You can also use:
// String i = param.asStr();
// double d = param.asDouble();
// Serial.print("co2_ppm is: ");
//Serial.println(co2_ppm);
myNextion.setComponentText("t15", String(co2_ppm));
}
BLYNK_WRITE(V8)
{
float dst = param.asFloat(); // assigning incoming value from pin V5 to a variable
// You can also use:
// String i = param.asStr();
// double d = param.asDouble();
// Serial.print("dst tlak is: ");
// Serial.println(dst);
myNextion.setComponentText("t7", String(dst));
}
BLYNK_WRITE(V9)
{
float bp = param.asFloat(); // assigning incoming value from pin V5 to a variable
// You can also use:
// String i = param.asStr();
// double d = param.asDouble();
// Serial.print("bp tlak is: ");
// Serial.println(bp);
myNextion.setComponentText("t11", String(bp));
}
BLYNK_WRITE(V10)
{
float bt = param.asFloat(); // assigning incoming value from pin V5 to a variable
// You can also use:
// String i = param.asStr();
// double d = param.asDouble();
//Serial.print("bt temp is: ");
//Serial.println(bt);
myNextion.setComponentText("t9", String(bt));
}
BLYNK_WRITE(V15)
{
float maxRpm = param.asFloat(); // assigning incoming value from pin V5 to a variable
// You can also use:
// String i = param.asStr();
// double d = param.asDouble();
Serial.print("maxRpm is: ");
Serial.println(maxRpm);
myNextion.setComponentText("t5",String( maxRpm));
}
BLYNK_WRITE(V16)
{
float maxKmh = param.asFloat(); // assigning incoming value from pin V5 to a variable
// You can also use:
// String i = param.asStr();
// double d = param.asDouble();
// Serial.print("maxKmh is: ");
// Serial.println(maxKmh);
myNextion.setComponentText("t4",String( maxKmh));
}
BLYNK_WRITE(V17)
{
float maxTemp = param.asFloat(); // assigning incoming value from pin V5 to a variable
// You can also use:
// String i = param.asStr();
// double d = param.asDouble();
// Serial.print("maxTemp is: ");
// Serial.println(maxTemp);
myNextion.setComponentText("t",String( maxTemp));
}
BLYNK_WRITE(V18)
{
float minTemp = param.asFloat(); // assigning incoming value from pin V5 to a variable
// You can also use:
// String i = param.asStr();
// double d = param.asDouble();
// Serial.print("minTemp is: ");
// Serial.println(minTemp);
myNextion.setComponentText("t",String( minTemp));
}
void setup()
{
myNextion.init();
//sensor.begin(); //D2-SDA D1-SCL
Serial.begin(9600);
Blynk.begin(auth, ssid, pass);
// You can also specify server:
//Blynk.begin(auth, ssid, pass, "blynk-cloud.com", 8442);
//Blynk.begin(auth, ssid, pass, IPAddress(192,168,1,100), 8442);
timer.setInterval(60000L, sendUptime);
}
void loop()
{
// myNextion.setComponentText("t10", String(sensor.readHumidity(), 2));
// myNextion.setComponentText("t9", String(sensor.readTemperature(), 2));
Blynk.run();
timer.run();
}```