hello everyone
my project work fine if WiFi signal is available
i want it too work with or without WiFi signal
i tried every solution i found in the forum and didn’t work
I’m using arduino mega with esp-01
here’s my code
#include <Wire.h>
#include <Adafruit_MLX90614.h>
#include "max32664.h"
#define RESET_PIN 04
#define MFIO_PIN 02
#define RAWDATA_BUFFLEN 250
#define BLYNK_TEMPLATE_ID "************"
#define BLYNK_DEVICE_NAME "**************"
#define BLYNK_AUTH_TOKEN "****************"
// Send Blynk user messages to the hardware serial port…
#define BLYNK_PRINT Serial1
#include <ESP8266_Lib.h>
#include <BlynkSimpleShieldEsp8266.h>
char auth[] = BLYNK_AUTH_TOKEN;
char ssid[] = "*********";
char pass[] = "*********";
// Hardware Serial on Mega, Leonardo, Micro...
#define EspSerial Serial1
// Your ESP8266 baud rate:
#define ESP8266_BAUD 9600
ESP8266 wifi(&EspSerial);
BlynkTimer timer;
void setup(){
Serial.begin(9600);
Serial1.begin(9600);
Wire.begin();
mlx.begin();
// Debug console for ESP and to restore the Serial monitor update (ask mohammed it hard to explain)
Serial1.begin(115200);
// Set ESP8266 baud rate
EspSerial.begin(ESP8266_BAUD);
delay(10);
Blynk.begin(auth, wifi, ssid, pass);
// You can also specify server:
//Blynk.begin(auth, wifi, ssid, pass, "blynk.cloud", 80);
//Blynk.begin(auth, wifi, ssid, pass, IPAddress(192,168,1,100), 8080);
// Setup a function to be called every second
timer.setInterval(1000L, myTimerEvent);
delay(10000);
}
void loop(){
Blynk.run();
timer.run(); // Initiates BlynkTimer
//some codes here
delay(100);
}
// 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.
Blynk.virtualWrite(V0,00000000000000);
Blynk.virtualWrite(V1,11111111111111111);
Blynk.virtualWrite(V2,222222222222222);
Blynk.virtualWrite(V3,333333333333333);
Blynk.virtualWrite(V4,444444444444444);
Blynk.virtualWrite(V5,555555555555555);
}