Hey everyone. So I was just experimenting with a ESP8266 as im pretty novice when it comes to blynk and arduino. I ended up using the start up template to display live readings of a potentiometer as well as have a button on the blynk app to turn on and off a LED.
I tried adding another LED to the board and another switch in blynk and the board crashed and now im getting the following error.
[68] Connecting to Galaxy S21
[2070] Connected to WiFi
[2070] IP: 192.168.135.32
[2070]
___ __ __
/ _ )/ /_ _____ / /__
/ _ / / // / _ \/ '_/
/____/_/\_, /_//_/_/\_\
/___/ v0.6.1 on NodeMCU
[2076] Connecting to blynk.cloud:80
[2246] Ready (ping: 62ms).
ets Jan 8 2013,rst cause:4, boot mode:(3,6)
wdt reset
load 0x4010f000, len 3584, room 16
tail 0
chksum 0xb0
csum 0xb0
v2843a5ac
~ld
I made no changes to the code from when it was working 100% as intended and now I it just connects to wifi and succefully connects to blink then resets. I’ve tried reuploading, reseting, unplugging everything. Not sure what to do from here. My full code is below. Thanks in advance!
/*************************************************************
This is a simple demo of sending and receiving some data.
Be sure to check out other examples!
*************************************************************/
// Template ID, Device Name and Auth Token are provided by the Blynk.Cloud
// See the Device Info tab, or Template settings
#define BLYNK_TEMPLATE_ID "TMPLQyxtVycX"
#define BLYNK_DEVICE_NAME "Quickstart Device"
#define BLYNK_AUTH_TOKEN "C3xwkgth6nijpJhQPBWvfcJObEuRk1J1"
// Comment this out to disable prints and save space
#define BLYNK_PRINT Serial
#include <ESP8266WiFi.h>
#include <BlynkSimpleEsp8266.h>
char auth[] = BLYNK_AUTH_TOKEN;
// Your WiFi credentials.
// Set password to "" for open networks.
char ssid[] = "Galaxy S21";
char pass[] = "KyleSanchez";
BlynkTimer timer;
// This function is called every time the Virtual Pin 0 state changes
BLYNK_WRITE(V0)
{
// Set incoming value from pin V0 to a variable
int value = param.asInt();
// Update state
Blynk.virtualWrite(V1, value);
}
BLYNK_WRITE(V1)
{
int pinValue = param.asInt(); // assigning incoming value from pin V1 to a variable
// You can also use:
// String i = param.asStr();
// double d = param.asDouble();
Serial.print("V1 Slider value is: ");
Serial.println(pinValue);
}
// This function is called every time the device is connected to the Blynk.Cloud
BLYNK_CONNECTED()
{
}
// This function sends Arduino's uptime every second to Virtual Pin 2.
void myTimerEvent()
{
// You can send any value at any time.
// Please don't send more that 10 values per second.
Blynk.virtualWrite(V2, millis() / 1000);
}
int PotPin = A0;
void setup()
{
Serial.begin(115200);
//Blynk.begin(BLYNK_AUTH_TOKEN, ssid, pass);
// You can also specify server:
Blynk.begin(auth, ssid, pass, "blynk.cloud", 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();
// You can inject your own code or combine it with other sketches.
// Check other examples on how to communicate with Blynk. Remember
// to avoid delay() function!
int val = analogRead(PotPin);
int percentage = map(val, 0, 1023, 0, 100);
Serial.println(percentage);
Blynk.virtualWrite(V2, percentage);