Very new to Arduino and Blynk, and have reviewed advices from multiple sources.
I am facing the version.h error even after multiple reinstallation of Arduino IDE and manual addition of the most recent blynk library.
The error did not occur when I am using the older version of Blynk library (0.5.0) but I realized the server has changed and it is impossible to connect to the blynk cloud, but when I am using the most recent library obtained from github, this problem (BlynkSimpleEsp8266.h:18:21: fatal error: version.h: No such file or directory) occurs. Please help.
Details :
• ESP8266 (NodeMCU 1.0 12E), WiFi
• Arduino IDE 2.0.3
• Blynk Library v1.0.0
#define BLYNK_TEMPLATE_ID "TMPLslmrR9go"
#define BLYNK_DEVICE_NAME "Monitor"
#define BLYNK_AUTH_TOKEN "auth"
#include<Wire.h>
#define BLYNK_PRINT Serial
#include <Blynk.h>
#include <ESP8266WiFi.h>
#include <BlynkSimpleEsp8266.h>
#define BLYNK_DEBUG
char auth[] = "auth";
char ssid[] = "wifi";
char pass[] = "password";
const int MPU_addr=0x68;
int16_t AcX,AcY,AcZ,Tmp,GyX,GyY,GyZ;
int minVal=265;
int maxVal=402;
double x;
double y;
double z;
void setup()
{
Wire.begin();
Wire.beginTransmission(MPU_addr);
Wire.write(0x6B);
Wire.write(0);
Wire.endTransmission(true);
Serial.begin(9600);
Blynk.begin(auth, ssid, pass);
}
void loop()
{
Blynk.run();
Wire.beginTransmission(MPU_addr);
Wire.write(0x3B);
Wire.endTransmission(false);
Wire.requestFrom(MPU_addr,14,true);
AcX=Wire.read()<<8|Wire.read();
AcY=Wire.read()<<8|Wire.read();
AcZ=Wire.read()<<8|Wire.read();
int xAng = map(AcX,minVal,maxVal,-90,90);
int yAng = map(AcY,minVal,maxVal,-90,90);
int zAng = map(AcZ,minVal,maxVal,-90,90);
x= RAD_TO_DEG * (atan2(-yAng, -zAng)+PI);
y= RAD_TO_DEG * (atan2(-xAng, -zAng)+PI);
z= RAD_TO_DEG * (atan2(-yAng, -xAng)+PI);
Serial.print("AngleX= ");
Serial.println(x);
Serial.print("AngleY= ");
Serial.println(y);
Serial.print("AngleZ= ");
Serial.println(z);
Serial.println("-----------------------------------------");
Blynk.virtualWrite(V2, x);
Blynk.virtualWrite(V3, y);
Blynk.virtualWrite(V4, z);
}
The error message:
In file included from C:\Users\Acer\AppData\Local\Temp.arduinoIDE-unsaved2023015-6404-169k6zq.zecv\sketch_jan15a\sketch_jan15a.ino:9:0:
c:\Users\Acer\Documents\Arduino\libraries\Blynk\src/BlynkSimpleEsp8266.h:18:21: fatal error: version.h: No such file or directory
#include <version.h>
^
compilation terminated.
exit status 1
Compilation error: exit status 1