You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
I try to set the deep sleep mode with wifimanager and I cannot get the full deep sleep mode.
Without wifimanager I get 0.25µA in deep sleep mode but with my code even if I bypass the init in the setup I get 15mA of consuming.
Is there any solution for this issue ?
bool SerialPrt = true; // Si on veux la sortie série
long Time2Sleep = 30e6; // Temps du Deep Sleep en secondes
String Message = "";
int CapteurTemp = 13;
int TXRF = 12;
int RXRF = 0;
int Bpy = 5; // si passé à 0 alors on bypass
Hi,
I try to set the deep sleep mode with wifimanager and I cannot get the full deep sleep mode.
Without wifimanager I get 0.25µA in deep sleep mode but with my code even if I bypass the init in the setup I get 15mA of consuming.
Is there any solution for this issue ?
`
#include <WiFiManager.h>
#include <ESP8266WiFi.h>
#include <OneWire.h>
#include <DallasTemperature.h>
#include <RH_ASK.h>
bool SerialPrt = true; // Si on veux la sortie série
long Time2Sleep = 30e6; // Temps du Deep Sleep en secondes
String Message = "";
int CapteurTemp = 13;
int TXRF = 12;
int RXRF = 0;
int Bpy = 5; // si passé à 0 alors on bypass
RH_ASK driver(2000, RXRF, TXRF, 0);
OneWire oneWire(CapteurTemp);
DallasTemperature sensors(&oneWire);
DeviceAddress sensorDeviceAddress;
void Transmit(String ToTransmit) {
byte DataLength = ToTransmit.length() + 1;
char Data2Send[DataLength];
ToTransmit.toCharArray(Data2Send, DataLength); // Converted String to char.
driver.send((uint8_t*)Data2Send, strlen(Data2Send));
driver.waitPacketSent();
}
float GetTempDS18() {
float NewTemp = 20.5;
return NewTemp;
}
float GetVoltage() {
float Tension = 5.00;
return Tension;
}
void setup() {
pinMode(CapteurTemp, INPUT_PULLUP);
pinMode(Bpy, INPUT_PULLUP);
if (SerialPrt) {
Serial.begin(115200);
Serial.println(" ");
Serial.print("Bpy : ");
Serial.println(digitalRead(Bpy));
}
if (digitalRead(Bpy) == false) {
//********* WiFiManager *********
WiFiManager wifiManager;
WiFi.mode(WIFI_STA); // explicitly set mode, esp defaults to STA+AP
wifiManager.setConfigPortalTimeout(180);
wifiManager.autoConnect("xxx", "xxx");
//********* WiFiManager *********
} else {
// wifi_status_led_uninstall();
// WiFiMode(WIFI_STA);
WiFi.disconnect();
WiFi.mode(WIFI_OFF);
WiFi.forceSleepBegin();
delay(1);
}
}
void loop() {
delay(250);
}
`
The text was updated successfully, but these errors were encountered: