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
Modem: SIM800L
Main processor board: WEMOS D1 Mini (ESP8266)
TinyGSM version: 0.11.7
Code:
#defineTINY_GSM_MODEM_SIM800
#include<TinyGsmClient.h>
#include<Firebase_ESP_Client.h>
#include<Ultrasonic.h>
#include<SoftwareSerial.h>// Provide the token generation process info.
#include"addons/TokenHelper.h"// Provide the RTDB payload printing info and other helper functions.
#include"addons/RTDBHelper.h"// Pin configuratuin for Ultrasonic Sensor
#defineTRIG_PIN D2
#defineECHO_PIN D1
float distance = 0;
Ultrasonic ultrasonic(TRIG_PIN, ECHO_PIN);
// Var for voltage metterint voltageValue;
float voltage;
// Insert Firebase project API Key
#defineAPI_KEY""// Insert RTDB URL
#defineDATABASE_URL""// Define Firebase Data object
FirebaseData fbdo;
FirebaseAuth auth;
FirebaseConfig config;
// Pin configuration for SIM800L
SoftwareSerial SIM800L_Serial(12, 13, false, 128);
// Your SIM card PIN
#defineSIM_PIN""// APN settings for your mobile network provider
#defineGPRS_APN"internet"
#defineGPRS_LOGIN""
#defineGPRS_PASSWORD""
TinyGsm modem(SIM800L_Serial);
//TinyGsmClient client(modem);unsignedlong sendDataPrevMillis = 0;
int count = 0;
bool signupOK = false;
voidsetup() {
Serial.begin(115200);
delay(10);
Serial.println("Started Serial");
SIM800L_Serial.begin(115200);
delay(3000); // Give SIM800L some time to initialize
Serial.println("Started SIM800L Serial");
// Unlock SIM card with PIN
modem.simUnlock(SIM_PIN);
}
voidloop() {
distance = ultrasonic.read();
voltageValue = analogRead(A0);
voltage = voltageValue * (7.2 / 1023.0)*2;
Serial.print("Distance: ");
Serial.print(distance);
Serial.println(" cm");
Serial.print("Voltage: ");
Serial.print(voltage);
Serial.println(" V");
//Send data through GPRS (SIM800L)sendDataThroughGPRS();
}
voidsendDataThroughGPRS() {
Serial.println("Connecting to GPRS");
if (modem.gprsConnect(GPRS_APN, GPRS_LOGIN, GPRS_PASSWORD)) {
Serial.println("Connected to GPRS");
}
}
Scenario, steps to reproduce
Arduino IDE - LOLIN(WEMOS) D1 R2 mini board
Serial speed 115200
SIM800L connection to Wemos D1 mini (SIM800L RX to D6 and TX to D7)
SIM800L powered by 2x 18650 3.7v batteries through a voltage regulator (5V)
Wemos D1 powered by USB
SIM800L is connected to network (status LED flashes every 3 seconds).
SIM PIN is disabled
Expected result
I want to make SIM800L works with ESP8266 and finally sent data to Firebase via GPRS.
Actual result
Sensor readings work and are displayed in SERIAL. When I try to call the "modem.gprsConnect(GPRS_APN, GPRS_LOGIN, GPRS_PASSWORD)" function, I get an error "Soft WDT reset":
23:02:58.198 -> ������n��r��n|�l�l��b���b�r��l�nB�n�l���r�l�l���Started standard Serial
23:03:01.242 -> Started SIM800L Serial
23:03:01.242 -> Distance: 25.00 cm
23:03:01.242 -> Voltage: 6.97 V
23:03:01.242 -> Connecting to GPRS
23:03:03.111 ->
23:03:03.111 -> --------------- CUT HERE FOR EXCEPTION DECODER ---------------
[x] Question or request for help
Modem: SIM800L
Main processor board: WEMOS D1 Mini (ESP8266)
TinyGSM version: 0.11.7
Code:
Scenario, steps to reproduce
Expected result
I want to make SIM800L works with ESP8266 and finally sent data to Firebase via GPRS.
Actual result
Sensor readings work and are displayed in SERIAL. When I try to call the "modem.gprsConnect(GPRS_APN, GPRS_LOGIN, GPRS_PASSWORD)" function, I get an error "Soft WDT reset":
��b���b�r��l�nB�n�l
���r�l�l���Started standard SerialI tried to use yield(); and delay(0); but not success.
The text was updated successfully, but these errors were encountered: