Not a member of Pastebin yet?
                        Sign Up,
                        it unlocks many cool features!                    
                - // Uncomment this for debug
 - #define _DEBUG_
 - #define THINGER_USE_STATIC_MEMORY
 - #define THINGER_STATIC_MEMORY_SIZE 512
 - #define TINY_GSM_MODEM_ESP8266
 - #include <SPI.h>
 - #include <TinyGsmClient.h>
 - #include <ThingerESP8266AT.h>
 - #define USERNAME "xx"
 - #define DEVICE_ID "xx"
 - #define DEVICE_CREDENTIAL "xx"
 - #define SSID "xx"
 - #define SSID_PASSWORD "xx"
 - // Emulate Serial1 on pins 10/11 if HW is not present (use interrupt pins for better performance)
 - #ifndef HAVE_HWSERIAL1
 - #include <SoftwareSerial.h>
 - SoftwareSerial Serial1(6,7); // RX, TX
 - #endif
 - ThingerESP8266AT thing(USERNAME, DEVICE_ID, DEVICE_CREDENTIAL, Serial1);
 - void setup() {
 - // uncomment this for debug over serial
 - Serial.begin(115200);
 - /* Notice: initialize serial for ESP8266 at your ESP8266 baud rate
 - * You can change the baud rate of ESP8266 sending a command like "AT+UART_DEF=9600,8,1,0,0\r\n"
 - * Test with different rates, and use the higher one that works with your setup.
 - */
 - Serial1.begin(9600);
 - thing.add_wifi(SSID, SSID_PASSWORD);
 - // more details at http://docs.thinger.io/arduino/
 - }
 - void loop() {
 - thing.handle();
 - }
 - LOG:
 - [NETWORK] Starting connection...
 - [NETWORK] Connected!
 - [_SOCKET] Connecting to iot.thinger.io:25200...
 - [_SOCKET] Using secure TLS/SSL connection: no
 - [_SOCKET] Error while connecting!
 - [NETWORK] Starting connection...
 - [NETWORK] Connected!
 - [_SOCKET] Connecting to iot.thinger.io:25200...
 - [_SOCKET] Using secure TLS/SSL connection: no
 - [_SOCKET] Error while connecting!
 - etc....
 
Advertisement
 
                    Add Comment                
                
                        Please, Sign In to add comment