Hi, I’m trying to connect to blynk using the board manager for esp32 v2.0.17 (I can’t use newer versions because I want to implement the hallRead() function, which has been discontinued since) and it just won’t connect.
#define SECRET_SSID "xxx"
#define SECRET_PASS "xxx"
#define BLYNK_TEMPLATE_ID "..."
#define BLYNK_TEMPLATE_NAME "test"
#define BLYNK_AUTH_TOKEN "..."
#define PIN_SG90 18
#include <WiFi.h>
#include <BlynkSimpleWifi.h>
#include <ESP32Servo.h>
char ssid[] = SECRET_SSID;
char pass[] = SECRET_PASS;
Servo sg90;
int zamykani = 0;
int hallvalue = 0;
void setup() {
Blynk.begin(BLYNK_AUTH_TOKEN, ssid, pass);
sg90.setPeriodHertz(50);
sg90.attach(PIN_SG90, 500, 2400);
Serial.begin(9600);
}
void loop() {
Blynk.run();
if (zamykani == 0){
sg90.write(180);
}else if (zamykani == 1) {
sg90.write(90);
}
}
BLYNK_WRITE(V0){
zamykani = param.asInt();
}