I have an EPS8266 that is running and I am monitoring the Serial data for all activities. The
Without APP running:
[23410] Connecting to Default
[29927] Connected to WiFi
[29927] My IP: 158.238.10.37
[29927] Blynk v0.3.1
[29928] Connecting to cloud.blynk.cc:8442
[30142] Ready (ping: 23ms).
S0 21.44 C 70.59 F
S1 19.56 C 67.21 F
Difference -3F
Battery = 63.2%
Moderate
S0 21.37 C 70.47 F
S1 19.87 C 67.78 F
Difference -3F
Battery = 62.0%
Moderate
S0 21.37 C 70.47 F
S1 20.12 C 68.22 F
Difference -2F
Battery = 62.6%
Moderate
With App running:
[2590438] Connecting to cloud.blynk.cc:8442
[2596626] Ready (ping: 6001ms).
S0 23.50 C 74.30 F
S1 16.44 C 61.59 F
Difference -13F
Battery = 60.2%
Cold
[2619311] Connecting to cloud.blynk.cc:8442
[2625464] Ready (ping: 6001ms).
[2664308] Connecting to cloud.blynk.cc:8442
[2664973] Ready (ping: 22ms).
S0 23.12 C 73.62 F
S1 16.50 C 61.70 F
Difference -12F
Battery = 60.8%
Cold
S0 22.81 C 73.06 F
S1 16.50 C 61.70 F
Difference -12F
Battery = 60.8%
Cold
[2737573] Connecting to cloud.blynk.cc:8442
[2743835] Ready (ping: 6001ms).
[2782701] Connecting to cloud.blynk.cc:8442
[2788894] Ready (ping: 6000ms).
S0 22.62 C 72.72 F
[2800221] Connecting to cloud.blynk.cc:8442
S1 16.50 C 61.70 F
[2800510] Ready (ping: 108ms).
Difference -11F
Battery = 61.1%
Cold
The app can run on any device and have the same result. Phone over 4g, work WIFI, home WIFI (same as device)
I have tried setting all of the widgets to Push all the way up to 59sec for update frequency with no differences.
I thought it was a power issue so increased power supply to a 10A 3.3v supply running at 3.4v under load.
Tried removing all other devices from my home wifi to reduce any network issues.
any help would be appreciated.
Here is my code so far:
#include <OneWire.h>
#define BLYNK_PRINT Serial // Comment this out to disable prints and save space
#include <ESP8266WiFi.h>
#include <BlynkSimpleEsp8266.h>
// You should get Auth Token in the Blynk App.
// Go to the Project Settings (nut icon).
char auth[] = "#####################";
OneWire ds(5); // on pin 5 (a 4.7K resistor is necessary)
void setup()
{
Serial.begin(9600);
Blynk.begin(auth, "Default", "############");
}
void loop()
{
Blynk.run();
byte i;
byte c;
byte t;
byte present = 0;
byte type_s;
byte data[12];
byte addr[8];
float fe[8];
float Battv;
int Batt;
for( c = 0; c < 8; c++) {
if ( !ds.search(addr)) {
ds.reset_search();
Battv = (((analogRead(A0)/238.53923)-2.8)/1.4)*1000;
Serial.print("Bat ");
Batt = Battv;
String str;
char result[5];
result[0]=(Batt/100)+'0';
result[1]=((Batt/10)%10)+'0';
result[2]='.';
result[3]=(Batt%10)+'0';
result[4]='\0';
str +=result;
str +="%";
char buf[8];
str.toCharArray(buf,sizeof(buf));
Blynk.virtualWrite(V11,buf);
Serial.println(buf);
Serial.println("wait");
for(t=0; t < 30; t++){
delay(1000);
Serial.print("-");
}
Serial.println();
return;
}
ds.reset();
ds.select(addr);
ds.write(0x44, 1); // start conversion, with parasite power on at the end
delay(750);
Blynk.run();
present = ds.reset();
ds.select(addr);
ds.write(0xBE); // Read Scratchpad
for ( i = 0; i < 9; i++) { // we need 9 bytes
data[i] = ds.read();
}
// Convert the data to actual temperature
// because the result is a 16 bit signed integer, it should
// be stored to an "int16_t" type, which is always 16 bits
// even when compiled on a 32 bit processor.
int16_t raw = (data[1] << 8) | data[0];
if (type_s) {
raw = raw << 3; // 9 bit resolution default
if (data[7] == 0x10) {
// "count remain" gives full 12 bit resolution
raw = (raw & 0xFFF0) + 12 - data[6];
}
}
else {
byte cfg = (data[4] & 0x60);
// at lower res, the low bits are undefined, so let's zero them
if (cfg == 0x00) raw = raw & ~7; // 9 bit resolution, 93.75 ms
else if (cfg == 0x20) raw = raw & ~3; // 10 bit res, 187.5 ms
else if (cfg == 0x40) raw = raw & ~1; // 11 bit res, 375 ms
//// default is 12 bit resolution, 750 ms conversion time
}
fe[c] = ((float)raw / 16.0)*1.8+32;
Serial.print("S");
Serial.print(c);
Serial.print(" ");
Serial.print(fe[c]);
Serial.println(" F");
switch (c) {
case 0:
Blynk.virtualWrite(V0, fe[c]);
Blynk.run();
break;
case 1:
Blynk.virtualWrite(V1, fe[c]);
Blynk.virtualWrite(V10, (fe[1]-fe[0]));
Serial.print("Dif ");
Serial.println(fe[1]-fe[0]);
Blynk.run();
break;
case 2:
Blynk.virtualWrite(V2, fe[c]);
Blynk.run();
break;
case 3:
Blynk.virtualWrite(V3, fe[c]);
Blynk.run();
break;
case 4:
Blynk.virtualWrite(V4, fe[c]);
Blynk.run();
break;
case 5:
Blynk.virtualWrite(V5, fe[c]);
Blynk.run();
break;
case 6:
Blynk.virtualWrite(V6, fe[c]);
Blynk.run();
break;
case 7:
Blynk.virtualWrite(V7, fe[c]);
Blynk.run();
break;
default:
// if nothing else matches, do the default
// default is optional
break;
}
}
}
Chris