Hello! I encountered such a problem when I just try to transfer information from the phone to the PC through the terminal, everything works, but when I insert this part of the code into my code, it stops working. When compiling, it throws an error: “the variable or field” BlynkWidgetWrite8 “was declared invalid.” (I use the Ada Fruit library)
I am using NodeMCU ESP8266 Wi-Fi connection.
Android smartphone.
Blink from Vladimir Shimansky, version 0.6.1.
Code:
#define BLYNK_PRINT Serial
#include <ESP8266WiFi.h>
#include <BlynkSimpleEsp8266.h>
#include <SPI.h>
#include <Wire.h>
#include <Adafruit_GFX.h>
#include <Adafruit_SSD1306.h>
#define SCREEN_WIDTH 128
#define SCREEN_HEIGHT 64
#define OLED_RESET D4
char auth[] = "HpsrNg_CFi9Z-peyv1hmV2";
char ssid[] = "TOCHKA";
char pass[] = "F157HGSH";
Adafruit_SSD1306 display(SCREEN_WIDTH, SCREEN_HEIGHT, &Wire, OLED_RESET);
int flag=0;
int regim=1;
int regi=1;
int ON = 0;
void setup()
{
Serial.begin(9600);
Blynk.begin(auth, ssid, pass);
pinMode(D7,INPUT);
pinMode(D5,INPUT);
pinMode(D6,INPUT);
if(!display.begin(SSD1306_SWITCHCAPVCC, 0x3C)) {
Serial.println(F("SSD1306 allocation failed"));
}
}
BLYNK_WRITE(V8){
int pinValue = param.asInt();
Serial.println(pinValue);
}
void loop() {
Blynk.run();
}