Ok, I manage to get it connected, I think theres a problem on my external power supply, I currently using the nano as power and it works. I need to check it again with my external psu cause i need more power. also I flipped the Rx Tx the Rx pin from Esp connected to Tx nano and Tx esp to Rx nano.
I manage to get it connected with some issue but manage to find a way thanks to this post.
But the connection to my phone sometimes connected and disconnected, is it because of the power?
[0]
___ __ __
/ _ )/ /_ _____ / /__
/ _ / / // / _ \/ '_/
/____/_/\_, /_//_/_/\_\
/___/ v1.0.1 on Arduino Nano
[588] Connecting to DT_Wifi
[3772] AT version:1.2.0.0(Jul 1 2016 20:04:45)
SDK version:1.5.4.1(39cb9a32)
v1.0.0
Mar 11 2018 18:27:31
OK
[9048] +CIFSR:STAIP,"192.168.137.65"
+CIFSR:STAMAC,"2c:f4:32:19:d4:f4"
[9057] Connected to WiFi
[19681] Ready (ping: 39ms).
[51335] Ready (ping: 39ms).
[82699] Ready (ping: 39ms).
[114262] Ready (ping: 39ms).
[145853] Ready (ping: 39ms).
[177483] Ready (ping: 39ms).
[209156] Ready (ping: 38ms).
[241268] Ready (ping: 39ms).
[273049] Ready (ping: 40ms).
[304845] Ready (ping: 40ms).
[336311] Ready (ping: 39ms).
this is what I get from the terminal. it’s connected to my phone but no data recieved i guess because of the Rx Tx purposely flipped? or the fact that it has unstable connection? I know I can trigger something I’m using D13 from my phone to trigger the nano onboard LED, the led on the esp is blinking everytime I press the button, but the led on the nano is not triggering.
I’m using another code that I mix match but it should be the same
#define BLYNK_PRINT Serial
#include <dht.h>
#include <SimpleTimer.h>
#include <SoftwareSerial.h>
#include <ESP8266_Lib.h>
#include <BlynkSimpleShieldEsp8266.h>
char auth[] = "OqLOk9AHObLAAdyK_05qx7ri4o0zrGIZ";
char ssid[] = "DT_Wifi";
char pass[] = "Sherlock";
SoftwareSerial EspSerial(4, 3); // RX, TX
ESP8266 wifi(&EspSerial);
WidgetTerminal terminal(V1);
SimpleTimer timer;
String vdata = "";
#define dht_apin A0 //Pin DHT_11
dht DHT;
void sendSensor()
{
DHT.read11(dht_apin);
long measurement1 = DHT.humidity;
long measurement2 = DHT.temperature;
delay(2000);
Blynk.virtualWrite(V5, measurement1);
delay(2000);
Blynk.virtualWrite(V4, measurement2);
vdata = vdata + "Humidity : " + measurement1 +"%"+", "+ "Temperature : " + measurement2 +" C";
Blynk.virtualWrite(V2, vdata);
vdata = "";
}
void setup()
{
Serial.begin(9600);
//Set ESP8266 baud rate
EspSerial.begin(9600);
Blynk.begin(auth, wifi, ssid, pass,"blynk-cloud.com", 8080);
timer.setInterval(5000L,sendSensor); // 1000L
terminal.println(F("Blynk v" BLYNK_VERSION ": Device started"));
terminal.clear();
terminal.flush();
}
void loop()
{
timer.run();
Blynk.run();
}