i have problem with sending data sensor to the blynk cloud, it connected blynk but the value is not shown. im using arduino uno + ESP 8266-01
does anybody can find where the problem is ?
my program :
'''
#define BLYNK_TEMPLATE_ID
#define BLYNK_DEVICE_NAME
#define BLYNK_AUTH_TOKEN
#define BLYNK_PRINT Serial
#include <ESP8266_Lib.h>
#include <BlynkSimpleShieldEsp8266.h>
char auth[] = BLYNK_AUTH_TOKEN;
char ssid[] =
char pass[] = ;
#include <SoftwareSerial.h>
SoftwareSerial EspSerial(2, 3); // RX, TX
#define ESP8266_BAUD 38400
ESP8266 wifi(&EspSerial);
SimpleTimer timer;
#include <Wire.h>
#include "DFRobot_PH.h"
#include <EEPROM.h>
#define PH_PIN A1
float voltage,phValue,temperature = 25;
DFRobot_PH ph;
void sendsensor2()
{
static unsigned long timepoint = millis();
if(millis()-timepoint>1000U){ //time interval: 1s
timepoint = millis();
//temperature = readTemperature(); // read your temperature sensor to execute temperature compensation
voltage = analogRead(PH_PIN)/1024.0*5000; // read the voltage
phValue = ph.readPH(voltage,temperature); // convert voltage to pH with temperature compensation
Serial.print("voltage:");
Serial.print(voltage,1);
Blynk.virtualWrite(V1, voltage);
Serial.print("V pH:");
Serial.println(phValue,2);
Blynk.virtualWrite(V0, phValue);
}
ph.calibration(voltage,temperature); // calibration process by Serail CMD
}
void setup()
{
// Debug console
Serial.begin(115200);
// Set ESP8266 baud rate
EspSerial.begin(ESP8266_BAUD);
delay(10);
ph.begin();
Blynk.begin(auth, wifi, ssid, pass, "blynk.cloud", 80);
timer.setInterval(1000, sendsensor2);
}
void loop()
{
Blynk.run();
timer.run();
}
'''