Hello
צריך עזרה עם blynk Arduino
הניסיון שלי בתכנות הוא קטן בעקרון מתחיל
אני רוצה להפעיל את הArduino עם blynk ושהblynk יעבוד זמן מסוים יעצור לזמן קצר ואז יחזור לזמן מסוים ויעצור לזמן מסוים וזה בעצם ה loop

משהו בסגנון ש
BLYNK_WRITE(V1);
if ((V1) == 1) //If Switch is HIGH, execute following code
{ digitalWrite (D5,HIGH);}

if ((V1) == 0 ) following code
{ digitalWrite (D5,LOW);}

השרשור הוא blynk OUTPUT into Esp8266 ( with the timer library installed)INPUT OUT of esp into Arduino Mega


ואני נתקל בבלגן ה loop עובד אבל אני לא מצליח לתפעל את הסויטץ’ עם ה כפתור הדיגיטלי ניסיתי עם millis ואז אמרו לי ש blynk יותר טוב simpleTimer library אני מצרף את ה קוד

צריך עזרה

#include <ESP8266WiFi.h>
#include <BlynkSimpleEsp8266.h>
// You should get Auth Token in the Blynk App.
// Go to the Project Settings (nut icon).
char auth[] = "XXX";
    
, 
// Your WiFi credentials.

// Set password to "" for open networks.

char ssid[] = "YYY";
char pass[] = "ZZZ";

int LED = D2;

// Define LED as an Integer (whole numbers) and pin D8 on
Wemos D1 Mini Pro
void setup()
{
 
// Debug console

Serial.begin(115200);

// pinMode(LED, OUTPUT); //Set the LED (D1) as an output

Blynk.begin(auth, ssid, pass);

}
void loop()
{
}

Blynk.run();
  
// This function will be called every time button Widget

// in Blynk app writes values to the Virtual Pin V5
BLYNK_WRITE(V5) {
int pinValue = param.asInt(); // Assigning incoming value
from pin V5 to a variable
Serial.print("Pin number: ");
Serial.println(LED);
Serial.println(pinValue);
if (pinValue == 1) {
digitalWrite(LED, HIGH); // Turn LED on.
} else {
digitalWrite(LED, LOW); // Turn LED off.
}





תודה