Closed biswajitjei02 closed 4 years ago
utilities,h
bool setPowerBoostKeepOn(int en) { Wire.beginTransmission(IP5306_ADDR); Wire.write(IP5306_REG_SYS_CTL0); if (en) { Wire.write(0x37); // Set bit1: 1 enable 0 disable boost keep on } else { Wire.write(0x35); // 0x37 is default reg value } return Wire.endTransmission() == 0; }
I don't know anything about firebase. Are you able to run the example programs?
yes
// TTGO T-Call pin definitions
define MODEM_RST 5
define MODEM_PWKEY 4
define MODEM_POWER_ON 23
define MODEM_TX 27
define MODEM_RX 26
define I2C_SDA 21
define I2C_SCL 22
// Other define
define BLYNK_PRINT Serial
define TINY_GSM_MODEM_SIM800
// Set serial for debug console (to the Serial Monitor, default speed 115200)
define Serial Serial
// Hardware Serial on Mega, Leonardo, Micro
define SerialAT Serial1
// Include
include
include
include
include "utilities.h"
// Vars const char apn[] = "portalnmms"; const char user[] = ""; const char pass[] = ""; // Go to the Project Settings (nut icon). const char auth[] = "XXXXXXXtkjKY5JsANxUF2WmOXKP_";
TinyGsm modem(SerialAT); BlynkTimer timer;
void checkGPRS() { Serial.println("GPRS check running");
if (!modem.isGprsConnected()) { if (!modem.gprsConnect(apn, user, pass)) { delay(10000); Serial.println("GPRS not running"); return; } } }
include
define FIREBASE_HOST "XXXXXX.firebaseapp.com"
define FIREBASE_AUTH "XXXXXXXXXXXXXXXXXXfhpFdfG1w7HsNzsdf"
FirebaseData firebaseData;
int val; void setup() {
// Set console baud rate Serial.begin(115200);
// Keep power when running from battery Wire.begin(I2C_SDA, I2C_SCL); bool isOk = setPowerBoostKeepOn(1); Serial.println(String("IP5306 KeepOn ") + (isOk ? "OK" : "FAIL"));
// Set-up modem reset, enable, power pins pinMode(MODEM_PWKEY, OUTPUT); pinMode(MODEM_RST, OUTPUT); pinMode(MODEM_POWER_ON, OUTPUT);
digitalWrite(MODEM_PWKEY, LOW); digitalWrite(MODEM_RST, HIGH); digitalWrite(MODEM_POWER_ON, HIGH);
// Set GSM module baud rate and UART pins SerialAT.begin(115200, SERIAL_8N1, MODEM_RX, MODEM_TX); delay(3000);
// For GPRS reconnect timer.setInterval(10000L, checkGPRS);
Firebase.begin("XXXXXXXX..firebaseio.com","XXXXXXXXXXXXXXXXXFdfG1w7HsNzsdf"); }
void loop() {
Firebase.getString(firebaseData, "newvalue"); Serial.println(firebaseData.stringData()); Serial.println(firebaseData.errorReason());
delay(1000); timer.run();
}
I CAN HELP YOU WITH THAT
send me your issue to this mail vishwasbada619@gmail.com
send me your issue to this mail vishwasbada619@gmail.com
thanks man !! you saved the day.
send me your issue to this mail vishwasbada619@gmail.com
thanks man !! you saved the day.
My pleasure
Closing issue as it seems to have been resolved.
could you please let us know what the issue was? We are trying to send sensor data to firebase using the same board!!
I'm trying to use same board with firebase. Can you share about how you handle issue
// TTGO T-Call pin definitions
define MODEM_RST 5
define MODEM_PWKEY 4
define MODEM_POWER_ON 23
define MODEM_TX 27
define MODEM_RX 26
define I2C_SDA 21
define I2C_SCL 22
// Other define
define BLYNK_PRINT Serial
define TINY_GSM_MODEM_SIM800
// Set serial for debug console (to the Serial Monitor, default speed 115200)
define Serial Serial
// Hardware Serial on Mega, Leonardo, Micro
define SerialAT Serial1
// Include
include
include
include
include "utilities.h"
// Vars const char apn[] = "portalnmms"; const char user[] = ""; const char pass[] = ""; // Go to the Project Settings (nut icon). const char auth[] = "XXXXXXXtkjKY5JsANxUF2WmOXKP_";
TinyGsm modem(SerialAT); BlynkTimer timer;
void checkGPRS() { Serial.println("GPRS check running");
if (!modem.isGprsConnected()) { if (!modem.gprsConnect(apn, user, pass)) { delay(10000); Serial.println("GPRS not running"); return; } } }
include
define FIREBASE_HOST "XXXXXX.firebaseapp.com"
define FIREBASE_AUTH "XXXXXXXXXXXXXXXXXXfhpFdfG1w7HsNzsdf"
FirebaseData firebaseData;
int val; void setup() {
// Set console baud rate Serial.begin(115200);
// Keep power when running from battery Wire.begin(I2C_SDA, I2C_SCL); bool isOk = setPowerBoostKeepOn(1); Serial.println(String("IP5306 KeepOn ") + (isOk ? "OK" : "FAIL"));
// Set-up modem reset, enable, power pins pinMode(MODEM_PWKEY, OUTPUT); pinMode(MODEM_RST, OUTPUT); pinMode(MODEM_POWER_ON, OUTPUT);
digitalWrite(MODEM_PWKEY, LOW); digitalWrite(MODEM_RST, HIGH); digitalWrite(MODEM_POWER_ON, HIGH);
// Set GSM module baud rate and UART pins SerialAT.begin(115200, SERIAL_8N1, MODEM_RX, MODEM_TX); delay(3000);
// For GPRS reconnect timer.setInterval(10000L, checkGPRS);
Firebase.begin("XXXXXXXX..firebaseio.com","XXXXXXXXXXXXXXXXXFdfG1w7HsNzsdf"); }
void loop() {
Firebase.getString(firebaseData, "newvalue"); Serial.println(firebaseData.stringData()); Serial.println(firebaseData.errorReason());
delay(1000); timer.run();
}