Hi Pete,
Thanks again for helping.
I am not using Edgent. I went to examples.blynk.cc for ESP32 example code and with necessary amendment.
I think Device setup between Blynk web and my mobile app is ok. Both communicating - switch on/off.
17:05:26.674 -> ets Jul 29 2019 12:21:46
17:05:26.674 ->
17:05:26.674 -> rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
17:05:26.674 -> configsip: 0, SPIWP:0xee
17:05:26.674 -> clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
17:05:26.710 -> mode:DIO, clock div:1
17:05:26.710 -> load:0x3fff0030,len:1412
17:05:26.710 -> load:0x40078000,len:13400
17:05:26.710 -> load:0x40080400,len:3672
17:05:26.710 -> entry 0x400805f8
17:05:27.005 -> [22] Connecting to AndroidAP
17:06:04.620 -> [37637] Connected to WiFi
17:06:04.620 -> [37637] IP: 192.168.102.140
17:06:04.620 -> [37637]
17:06:04.620 -> ___ __ __
17:06:04.620 -> / _ )/ /_ _____ / /__
17:06:04.620 -> / _ / / // / _ \/ '_/
17:06:04.620 -> /____/_/\_, /_//_/_/\_\
17:06:04.620 -> /___/ v1.1.0 on ESP32
17:06:04.620 ->
17:06:04.620 -> #StandWithUkraine https://bit.ly/swua
17:06:04.620 ->
17:06:04.620 ->
17:06:04.620 -> [37648] Connecting to blynk.cloud:80
17:06:05.425 -> [38466] Ready (ping: 203ms).
I am using firebeetle ESP32E. I tried their initial setup runs, they are working ok. E.g. 7.4 WiFi Tutorial
https://wiki.dfrobot.com/FireBeetle_Board_ESP32_E_SKU_DFR0654#target_6
What do you think? Just couldn’t switch on the LED on pin 21?
Below are the code.
https://examples.blynk.cc/?board=ESP32&shield=ESP32%20WiFi&example=GettingStarted%2FBlynkBlink
with some modifications specific to
#define BLYNK_TEMPLATE_ID "TMPL5MbBfajw"
#define BLYNK_DEVICE_NAME "Pump"
#define BLYNK_AUTH_TOKEN "qomzR-yr--UoKmDgo75ClzqPz9bMJOUl"
// Comment this out to disable prints and save space
#define BLYNK_PRINT Serial
#include <WiFi.h>
#include <WiFiClient.h>
#include <BlynkSimpleEsp32.h>
char auth[] = BLYNK_AUTH_TOKEN;
// Your WiFi credentials.
// Set password to "" for open networks.
char ssid[] = "AndroidAP";
char pass[] = "H1100";
BLYNK_WRITE(V21) // this is the pin where LED on 21
{
int s0 = param.asInt();
if (s0 == HIGH);
{
digitalWrite(21, HIGH);
}
if (s0 == LOW);
{
digitalWrite(21, LOW);
}
}
void setup()
{
// Debug console
Serial.begin(115200);
pinMode (21, OUTPUT);
digitalWrite(21, HIGH); // This added to check if LED light on? But no...
//Blynk.begin(auth, ssid, pass);
// You can also specify server:
Blynk.begin(auth, ssid, pass, "blynk.cloud", 80); // Using this here
//Blynk.begin(auth, ssid, pass, IPAddress(192,168,1,100), 8080);
}
void loop()
{
Blynk.run();
}