Using Arduino IDE and ESP32.
Iphone 6 iOS 14.2
Blynk Server (I think)
Blynk Library 0.6.1
Example is using
Board ESP32
Connection ESP32 WiFi
Auth Token left empty
Example Push data
Using code from “Keep you void loop() clean”, Blynk logo and then data from sensorValue is written to Serial Monitor, but nothing seems to appear in the Blynk App. I think I have followed what was said in the example
This is my first go, so maybe I don’t understand the app - apologies!
Blynk App is called Testing and just shows a blank screen under the green header.
code:
/* Comment this out to disable prints and save space */
#define BLYNK_PRINT Serial
#include <WiFi.h>
#include <WiFiClient.h>
#include <BlynkSimpleEsp32.h>
// You should get Auth Token in the Blynk App.
// Go to the Project Settings (nut icon).
char auth[] = "SagGBdQ5-2Pv3T9cuCbB_77hY0drmutM";
// Your WiFi credentials.
// Set password to "" for open networks.
char ssid[] = "BT-25AHS2";
char pass[] = "*******"; // my actual pWord entered here; not included for safety!
int sensorValue;
BlynkTimer timer;
// This function sends Arduino's up time every second to Virtual Pin (5).
// In the app, Widget's reading frequency should be set to PUSH. This means
// that you define how often to send data to Blynk App.
void myTimerEvent()
{
// You can send any value at any time.
// Please don't send more that 10 values per second.
sensorValue = analogRead(A5);
Blynk.virtualWrite(V5, millis() / 1000);
Serial.print("Sensor is: ");
Serial.println(sensorValue);
}
void setup()
{
// Debug console
Serial.begin(9600);
Blynk.begin(auth, ssid, pass);
// You can also specify server:
//Blynk.begin(auth, ssid, pass, "blynk-cloud.com", 80);
//Blynk.begin(auth, ssid, pass, IPAddress(192,168,1,100), 8080);
// Setup a function to be called every second
timer.setInterval(1000L, myTimerEvent);
}
void loop()
{
Blynk.run();
timer.run(); // Initiates BlynkTimer
}