Arduino One + ESP8266 + BMP180

In my project
there is

-Arduino One R3
-ESP8266 with serial port (9600 bps)
-BMP180 with I2C (SDA-SCL)

this is my complete sketch…


#define BLYNK_PRINT Serial
#include <ESP8266_Lib.h>
#include <BlynkSimpleShieldEsp8266.h>
#include <Wire.h>
#include <BMP180MI.h>
#include <SoftwareSerial.h>

char auth[] = "xx";
char ssid[] = "xxx";
char pass[] = "xxxx";

SoftwareSerial EspSerial(10, 11); // RX, TX
#define ESP8266_BAUD 9600
#define I2C_ADDRESS 0x77

ESP8266 wifi(&EspSerial);

BMP180I2C Sensore_temp (I2C_ADDRESS);

WidgetLED Led(V2);
BlynkTimer timer;

void TimerEvent() {
    float Temp = Sensore_temp.getTemperature();
    Blynk.virtualWrite(V0, Temp);
}

void setup()
{
  Serial.begin(9600); 
  Wire.begin();
  EspSerial.begin(ESP8266_BAUD);
  delay(100);
  Blynk.begin(auth, wifi, ssid, pass);
  //Sensore_temp=BMP180();
  Sensore_temp.resetToDefaults();
  timer.setInterval(5000L, TimerEvent);
}

void loop()
{
  Blynk.run();
  timer.run();
}

the esp8266 is always connect a my wi fi.
But t disconnects continuously without transmitting the temperature

What does your serial monitor show?

Pete.

17:21:47.448 -> [99] 
17:21:47.448 ->     ___  __          __
17:21:47.497 ->    / _ )/ /_ _____  / /__
17:21:47.544 ->   / _  / / // / _ \/  '_/
17:21:47.544 ->  /____/_/\_, /_//_/_/\_\
17:21:47.591 ->         /___/ v0.6.0 on Arduino Uno
17:21:47.638 -> 
17:21:48.060 -> [689] Connecting to xxxxxxxxxxxxxxxxxxxxxxxx
17:21:51.249 -> [3873] AT version:1.3.0.0(Jul 14 2016 18:54:01)
17:21:51.284 -> SDK version:2.0.0(656edbf)
17:21:51.331 -> compile time:Jul 19 2016 18:44:44
17:21:51.378 -> OK
17:21:56.508 -> [9148] 
17:21:56.508 -> [9148] Connected to WiFi
17:22:06.912 -> [19521] Ready (ping: 45ms).

this…

And what do the disconnects/reconnects look like?

Pete.

continuously every few seconds

the temperature does not update

What I meant is, what are you seeing in the serial monitor when the disconnect/reconnect takes place?

You might want to add Blynk debugging:
http://docs.blynk.cc/#blynk-firmware-debugging-define-blynk_debug

Pete.

nothing, everything remains as I posted

with

#define BLYNK_DEBUG

in the sketch…sketck
in output in serial monitor
see

19:31:37.417 -> [99] 
19:31:37.417 ->     ___  __          __
19:31:37.417 ->    / _ )/ /_ _____  / /__
19:31:37.464 ->   / _  / / // / _ \/  '_/
19:31:37.510 ->  /____/_/\_, /_//_/_/\_\
19:31:37.510 ->         /___/ v0.6.0 on Arduino Uno
19:31:37.557 -> 
19:31:37.979 -> [689] Connecting to ASUS_SCH
19:31:41.167 -> [3872] AT version:1.3.0.0(Jul 14 2016 18:54:01)
19:31:41.214 -> SDK version:2.0.0(656edbf)
19:31:41.260 -> compile time:Jul 19 2016 18:44:44
19:31:41.307 -> OK
19:31:44.448 -> [7149] 
19:31:44.448 -> [7149] Connected to WiFi
19:31:54.620 -> [17311] <[1D|00|01|00] 5aa39d8c2e30475b898d8ff5d9d5678b
19:31:54.760 -> [17465] >[00|00|01|00|C8]
19:31:54.807 -> [17465] Ready (ping: 26ms).
19:31:54.854 -> [17466] Free RAM: 453
19:31:54.854 -> [17539] <[11|00|02|00]fver[00]0.6.0[00]h-beat[00]10[00]buff-in[00]256[00]dev
19:31:59.917 -> [22588] Cmd error
19:32:10.135 -> [32788] <[1D|00|01|00] xxxxx   -   my auth
19:32:20.401 -> [43051] <[1D|00|01|00] 
19:32:30.667 -> [53312] <[1D|00|01|00] 
19:32:40.903 -> [63577] <[1D|00|01|00] 
19:32:51.168 -> [73836] <[1D|00|01|00] 
19:33:01.457 -> [84097] <[1D|00|01|00] 
19:33:11.720 -> [94370] <[1D|00|01|00]
19:33:22.027 -> [104630] <[1D|00|01|00] 
19:33:32.279 -> [114892] <[1D|00|01|00] 
19:33:42.562 -> [125153] <[1D|00|01|00]
19:33:52.800 -> [135416] <[1D|00|01|00] 
19:34:03.086 -> [145680] <[1D|00|01|00] 
19:34:13.358 -> [155944] <[1D|00|01|00] 
19:34:23.607 -> [166204] <[1D|00|01|00] 
19:34:33.883 -> [176472] <[1D|00|01|00] 
19:34:44.163 -> [186742] <[1D|00|01|00] 
19:34:54.441 -> [197002] <[1D|00|01|00] 
19:35:04.693 -> [207265] <[1D|00|01|00] 
19:35:14.976 -> [217525] <[1D|00|01|00] 
19:35:25.243 -> [227794] <[1D|00|01|00] 
19:35:35.521 -> [238055] <[1D|00|01|00] 
19:35:45.804 -> [248316] <[1D|00|01|00]
19:35:56.039 -> [258569] <[1D|00|01|00] 

thank’s

Correct about the missing Temp. Add in a print statement to see what, if anything, show in the Serial Monitor.

But no disconnections… All I see is a regular heartbeat every 10 seconds. What indications make you think there are disconnects every few seconds?

1 Like

I see the disconnections on the app Blynk (for android)

in “my devices” i selected
hardware model: Arduino UNO
connection type: Wi-Fi

I entered the code in TimerEvent function

BLYNK_LOG("This is my value of temperature: ", Temp);

but without result.

the problems is in temperature measurement.