I am using Arduino Due. I am connecting ESP8266-01 for WiFi through Serial1 of Arduino Due. I want to read two sensors from A0,A1 and update them to Blynk Server for every 3 seconds continuously. When I am compiling, I am getting error as " ‘gg’ was not declared in this scope ". Can someone help me to get rid of that error and get desired output.
#define BLYNK_PRINT Serial
#include <ESP8266_Lib.h>
#include <BlynkSimpleShieldEsp8266.h>
BlynkTimer timer;
#define EspSerial Serial1
#define ESP8266_BAUD 115200
char auth[] = "xxxx";
char ssid[] = "ssid";
char pass[] = "pwd";
ESP8266 wifi(&EspSerial);
void setup()
{
Serial.begin(9600);
EspSerial.begin(ESP8266_BAUD);
delay(10);
Blynk.begin(auth, wifi, ssid, pass);
delay(10);
pinMode(A0,INPUT);
pinMode(A1,INPUT);
timer.setInterval(3000L,gg);
timer.setInterval(3010L,hh);
}
void loop()
{
int a=Serial.read(A0);
int b=Serial.read(A1);
Blynk.run();
timer.run();
}
void gg()
(
Blynk.virtualWrite(V1,a);
}
void hh()
(
Blynk.virtualWrite(V2,b);
}