From 66057e8841d2aa05701d1a76e76099b9c50773ca Mon Sep 17 00:00:00 2001 From: Volodymyr Shymanskyy Date: Tue, 1 May 2018 13:24:03 +0300 Subject: [PATCH] Add SSL example --- examples/more/Hologram_Dash/Hologram_Dash.ino | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/examples/more/Hologram_Dash/Hologram_Dash.ino b/examples/more/Hologram_Dash/Hologram_Dash.ino index cd3d502..532fee4 100644 --- a/examples/more/Hologram_Dash/Hologram_Dash.ino +++ b/examples/more/Hologram_Dash/Hologram_Dash.ino @@ -19,6 +19,9 @@ // Uncomment this if you want to see all AT commands //#define DUMP_AT_COMMANDS +// Uncomment this if you want to use SSL +//#define USE_SSL + // Set serial for debug console (to the Serial Monitor, speed 115200) #define SerialMon Serial @@ -34,7 +37,6 @@ const char pass[] = ""; // Server details const char server[] = "vsh.pp.ua"; const char resource[] = "/TinyGSM/logo.txt"; -const int port = 80; #ifdef DUMP_AT_COMMANDS #include @@ -44,7 +46,13 @@ const int port = 80; TinyGsm mdm(SerialAT); #endif -TinyGsmClient client(mdm); +#ifdef USE_SSL + TinyGsmClientSecure client(mdm); + const int port = 443; +#else + TinyGsmClient client(mdm); + const int port = 80; +#endif void setup() { // Set console baud rate