For some reason I am unable to connect to Thinger.
I am using Arduino Mega 2560 and SIM800L.
I am using the example code from the Thinger library.
The same code works like charm on Arduino UNO.
I use the same power supply, same GPRS module, the same code.
At this point I have trouble shooted everything I could think of.
Could it be that the SoftwareSerial does not work?
#define THINGER_SERIAL_DEBUG
// Select your modem:
#define TINY_GSM_MODEM_SIM800
//#define TINY_GSM_MODEM_SIM900
//#define TINY_GSM_MODEM_A6
//#define TINY_GSM_MODEM_A7
//#define TINY_GSM_MODEM_M590
// Can be installed from Library Manager or GitHub - vshymanskyy/TinyGSM: A small Arduino library for GSM modules, that just works
#include <TinyGsmClient.h>
#include <ThingerTinyGSM.h>
#include âarduino_secrets.hâ
// Emulate Serial1 on pins 10/11 if HW is not present (use interrupt pin in RX for better performance)
#ifndef HAVE_HWSERIAL1
#include âSoftwareSerial.hâ
SoftwareSerial Serial1(10, 11); // RX, TX
#endif
ThingerTinyGSM thing(USERNAME, DEVICE_ID, DEVICE_CREDENTIAL, Serial1);
void setup() {
// open serial for debugging
Serial.begin(115200);
// Serial for AT commands (can be higher with HW Serial, or even lower in SW Serial)
Serial1.begin(57600);
// set APN (you can remove user and password from call if your apn does not require them)
thing.setAPN(APN_NAME, APN_USER, APN_PSWD);
// set PIN (optional)
// thing.setPIN(CARD_PIN);
// resource input example (i.e, controlling a digitalPin);
pinMode(LED_BUILTIN, OUTPUT);
thing[âledâ] << digitalPin(LED_BUILTIN);
// resource output example (i.e. reading a sensor value)
thing[âmillisâ] >> outputValue(millis());
// more details at DEVICES - Thinger.io Documentation
}
void loop() {
thing.handle();
}