From 889d7b35d9de69557adc70fed57980a80cbbe173 Mon Sep 17 00:00:00 2001 From: marcus johansson Date: Thu, 14 Sep 2017 16:27:32 +0200 Subject: [PATCH] St update --- examples/BasicAuthGet/BasicAuthGet.ino | 12 ++++++------ examples/BasicAuthGet/arduino_secrets.h | 3 +++ examples/BasicAuthGet/config.h | 3 --- examples/CustomHeader/CustomHeader.ino | 7 ++++++- examples/CustomHeader/arduino_secrets.h | 3 +++ examples/CustomHeader/config.h | 3 --- examples/DweetGet/DweetGet.ino | 13 +++++++------ examples/DweetGet/arduino_secrets.h | 3 +++ examples/DweetPost/DweetPost.ino | 7 ++++++- examples/DweetPost/arduino_secrets.h | 3 +++ examples/DweetPost/config.h | 2 -- examples/HueBlink/HueBlink.ino | 14 ++++++++------ examples/HueBlink/arduino_secrets.h | 3 +++ examples/HueBlink/config.h | 2 -- examples/PostWithHeaders/PostWithHeaders.ino | 15 +++++++++------ examples/PostWithHeaders/arduino_secrets.h | 3 +++ examples/PostWithHeaders/config.h | 2 -- examples/SimpleDelete/SimpleDelete.ino | 15 +++++++++------ examples/SimpleDelete/arduino_secrets.h | 3 +++ examples/SimpleDelete/config.h | 2 -- examples/SimpleGet/SimpleGet.ino | 15 +++++++++------ examples/SimpleGet/arduino_secrets.h | 3 +++ examples/SimpleGet/config.h | 2 -- examples/SimpleHttpExample/SimpleHttpExample.ino | 10 ++++++++-- examples/SimpleHttpExample/arduino_secrets.h | 3 +++ examples/SimplePost/SimplePost.ino | 14 ++++++++------ examples/SimplePost/arduino_secrets.h | 3 +++ examples/SimplePost/config.h | 2 -- examples/SimplePut/SimplePut.ino | 14 ++++++++------ examples/SimplePut/arduino_secrets.h | 3 +++ examples/SimplePut/config.h | 2 -- examples/SimpleWebSocket/SimpleWebSocket.ino | 12 ++++++------ examples/SimpleWebSocket/arduino_secrets.h | 3 +++ examples/SimpleWebSocket/config.h | 3 --- 34 files changed, 126 insertions(+), 81 deletions(-) create mode 100644 examples/BasicAuthGet/arduino_secrets.h delete mode 100644 examples/BasicAuthGet/config.h create mode 100644 examples/CustomHeader/arduino_secrets.h delete mode 100644 examples/CustomHeader/config.h create mode 100644 examples/DweetGet/arduino_secrets.h create mode 100644 examples/DweetPost/arduino_secrets.h delete mode 100644 examples/DweetPost/config.h create mode 100644 examples/HueBlink/arduino_secrets.h delete mode 100644 examples/HueBlink/config.h create mode 100644 examples/PostWithHeaders/arduino_secrets.h delete mode 100644 examples/PostWithHeaders/config.h create mode 100644 examples/SimpleDelete/arduino_secrets.h delete mode 100644 examples/SimpleDelete/config.h create mode 100644 examples/SimpleGet/arduino_secrets.h delete mode 100644 examples/SimpleGet/config.h create mode 100644 examples/SimpleHttpExample/arduino_secrets.h create mode 100644 examples/SimplePost/arduino_secrets.h delete mode 100644 examples/SimplePost/config.h create mode 100644 examples/SimplePut/arduino_secrets.h delete mode 100644 examples/SimplePut/config.h create mode 100644 examples/SimpleWebSocket/arduino_secrets.h delete mode 100644 examples/SimpleWebSocket/config.h diff --git a/examples/BasicAuthGet/BasicAuthGet.ino b/examples/BasicAuthGet/BasicAuthGet.ino index b8e0f51..e793d47 100644 --- a/examples/BasicAuthGet/BasicAuthGet.ino +++ b/examples/BasicAuthGet/BasicAuthGet.ino @@ -2,11 +2,7 @@ GET client with HTTP basic authentication for ArduinoHttpClient library Connects to server once every five seconds, sends a GET request - note: WiFi SSID and password are stored in config.h file. - If it is not present, add a new tab, call it "config.h" - and add the following variables: - char ssid[] = "ssid"; // your network SSID (name) - char pass[] = "password"; // your network password + created 14 Feb 2016 by Tom Igoe @@ -17,7 +13,11 @@ */ #include #include -#include "config.h" +#include "arduino_secrets.h" +///////please enter your sensitive data in the Secret tab/arduino_secrets.h +/////// Wifi Settings /////// +char ssid[] = SECRET_SSID; +char pass[] = SECRET_PASS; char serverAddress[] = "192.168.0.3"; // server address int port = 8080; diff --git a/examples/BasicAuthGet/arduino_secrets.h b/examples/BasicAuthGet/arduino_secrets.h new file mode 100644 index 0000000..a8ff904 --- /dev/null +++ b/examples/BasicAuthGet/arduino_secrets.h @@ -0,0 +1,3 @@ +#define SECRET_SSID "" +#define SECRET_PASS "" + diff --git a/examples/BasicAuthGet/config.h b/examples/BasicAuthGet/config.h deleted file mode 100644 index 7765359..0000000 --- a/examples/BasicAuthGet/config.h +++ /dev/null @@ -1,3 +0,0 @@ -char ssid[] = "ssid"; // your network SSID (name) -char pass[] = "password"; // your network password - diff --git a/examples/CustomHeader/CustomHeader.ino b/examples/CustomHeader/CustomHeader.ino index 898c97b..fa44aca 100644 --- a/examples/CustomHeader/CustomHeader.ino +++ b/examples/CustomHeader/CustomHeader.ino @@ -16,7 +16,12 @@ #include #include -#include "config.h" + +#include "arduino_secrets.h" +///////please enter your sensitive data in the Secret tab/arduino_secrets.h +/////// Wifi Settings /////// +char ssid[] = SECRET_SSID; +char pass[] = SECRET_PASS; char serverAddress[] = "192.168.0.3"; // server address int port = 8080; diff --git a/examples/CustomHeader/arduino_secrets.h b/examples/CustomHeader/arduino_secrets.h new file mode 100644 index 0000000..a8ff904 --- /dev/null +++ b/examples/CustomHeader/arduino_secrets.h @@ -0,0 +1,3 @@ +#define SECRET_SSID "" +#define SECRET_PASS "" + diff --git a/examples/CustomHeader/config.h b/examples/CustomHeader/config.h deleted file mode 100644 index 7765359..0000000 --- a/examples/CustomHeader/config.h +++ /dev/null @@ -1,3 +0,0 @@ -char ssid[] = "ssid"; // your network SSID (name) -char pass[] = "password"; // your network password - diff --git a/examples/DweetGet/DweetGet.ino b/examples/DweetGet/DweetGet.ino index 96f698d..51abd3f 100644 --- a/examples/DweetGet/DweetGet.ino +++ b/examples/DweetGet/DweetGet.ino @@ -9,11 +9,7 @@ For more on dweet.io, see https://dweet.io/play/ - note: WiFi SSID and password are stored in config.h file. - If it is not present, add a new tab, call it "config.h" - and add the following variables: - char ssid[] = "ssid"; // your network SSID (name) - char pass[] = "password"; // your network password + created 15 Feb 2016 updated 16 Feb 2016 @@ -23,7 +19,12 @@ */ #include #include -#include "config.h" + +#include "arduino_secrets.h" +///////please enter your sensitive data in the Secret tab/arduino_secrets.h +/////// Wifi Settings /////// +char ssid[] = SECRET_SSID; +char pass[] = SECRET_PASS; const char serverAddress[] = "dweet.io"; // server address int port = 80; diff --git a/examples/DweetGet/arduino_secrets.h b/examples/DweetGet/arduino_secrets.h new file mode 100644 index 0000000..a8ff904 --- /dev/null +++ b/examples/DweetGet/arduino_secrets.h @@ -0,0 +1,3 @@ +#define SECRET_SSID "" +#define SECRET_PASS "" + diff --git a/examples/DweetPost/DweetPost.ino b/examples/DweetPost/DweetPost.ino index 201e76c..41c6f2f 100644 --- a/examples/DweetPost/DweetPost.ino +++ b/examples/DweetPost/DweetPost.ino @@ -18,7 +18,12 @@ */ #include #include -#include "config.h" + +#include "arduino_secrets.h" +///////please enter your sensitive data in the Secret tab/arduino_secrets.h +/////// Wifi Settings /////// +char ssid[] = SECRET_SSID; +char pass[] = SECRET_PASS; const char serverAddress[] = "dweet.io"; // server address int port = 80; diff --git a/examples/DweetPost/arduino_secrets.h b/examples/DweetPost/arduino_secrets.h new file mode 100644 index 0000000..a8ff904 --- /dev/null +++ b/examples/DweetPost/arduino_secrets.h @@ -0,0 +1,3 @@ +#define SECRET_SSID "" +#define SECRET_PASS "" + diff --git a/examples/DweetPost/config.h b/examples/DweetPost/config.h deleted file mode 100644 index c263766..0000000 --- a/examples/DweetPost/config.h +++ /dev/null @@ -1,2 +0,0 @@ -char ssid[] = "ssid"; // your network SSID (name) -char pass[] = "password"; // your network password diff --git a/examples/HueBlink/HueBlink.ino b/examples/HueBlink/HueBlink.ino index a88bec9..c18ae47 100644 --- a/examples/HueBlink/HueBlink.ino +++ b/examples/HueBlink/HueBlink.ino @@ -13,11 +13,7 @@ This example shows how to concatenate Strings to assemble the PUT request and the body of the request. - note: WiFi SSID and password are stored in config.h file. - If it is not present, add a new tab, call it "config.h" - and add the following variables: - char ssid[] = "ssid"; // your network SSID (name) - char pass[] = "password"; // your network password + modified 15 Feb 2016 by Tom Igoe (tigoe) to match new API @@ -26,9 +22,15 @@ #include #include #include -#include "config.h" +#include "arduino_secrets.h" + +///////please enter your sensitive data in the Secret tab/arduino_secrets.h +/////// Wifi Settings /////// +char ssid[] = SECRET_SSID; +char pass[] = SECRET_PASS; int status = WL_IDLE_STATUS; // the Wifi radio's status + char hueHubIP[] = "192.168.0.3"; // IP address of the HUE bridge String hueUserName = "huebridgeusername"; // hue bridge username diff --git a/examples/HueBlink/arduino_secrets.h b/examples/HueBlink/arduino_secrets.h new file mode 100644 index 0000000..a8ff904 --- /dev/null +++ b/examples/HueBlink/arduino_secrets.h @@ -0,0 +1,3 @@ +#define SECRET_SSID "" +#define SECRET_PASS "" + diff --git a/examples/HueBlink/config.h b/examples/HueBlink/config.h deleted file mode 100644 index c263766..0000000 --- a/examples/HueBlink/config.h +++ /dev/null @@ -1,2 +0,0 @@ -char ssid[] = "ssid"; // your network SSID (name) -char pass[] = "password"; // your network password diff --git a/examples/PostWithHeaders/PostWithHeaders.ino b/examples/PostWithHeaders/PostWithHeaders.ino index 06139db..835a26f 100644 --- a/examples/PostWithHeaders/PostWithHeaders.ino +++ b/examples/PostWithHeaders/PostWithHeaders.ino @@ -3,11 +3,7 @@ Connects to server once every five seconds, sends a POST request with custome headers and a request body - note: WiFi SSID and password are stored in config.h file. - If it is not present, add a new tab, call it "config.h" - and add the following variables: - char ssid[] = "ssid"; // your network SSID (name) - char pass[] = "password"; // your network password + created 14 Feb 2016 by Tom Igoe @@ -18,7 +14,14 @@ */ #include #include -#include "config.h" + +#include "arduino_secrets.h" + +///////please enter your sensitive data in the Secret tab/arduino_secrets.h +/////// Wifi Settings /////// +char ssid[] = SECRET_SSID; +char pass[] = SECRET_PASS; + char serverAddress[] = "192.168.0.3"; // server address int port = 8080; diff --git a/examples/PostWithHeaders/arduino_secrets.h b/examples/PostWithHeaders/arduino_secrets.h new file mode 100644 index 0000000..a8ff904 --- /dev/null +++ b/examples/PostWithHeaders/arduino_secrets.h @@ -0,0 +1,3 @@ +#define SECRET_SSID "" +#define SECRET_PASS "" + diff --git a/examples/PostWithHeaders/config.h b/examples/PostWithHeaders/config.h deleted file mode 100644 index c263766..0000000 --- a/examples/PostWithHeaders/config.h +++ /dev/null @@ -1,2 +0,0 @@ -char ssid[] = "ssid"; // your network SSID (name) -char pass[] = "password"; // your network password diff --git a/examples/SimpleDelete/SimpleDelete.ino b/examples/SimpleDelete/SimpleDelete.ino index 9304be0..374a145 100644 --- a/examples/SimpleDelete/SimpleDelete.ino +++ b/examples/SimpleDelete/SimpleDelete.ino @@ -3,11 +3,7 @@ Connects to server once every five seconds, sends a DELETE request and a request body - note: WiFi SSID and password are stored in config.h file. - If it is not present, add a new tab, call it "config.h" - and add the following variables: - char ssid[] = "ssid"; // your network SSID (name) - char pass[] = "password"; // your network password + created 14 Feb 2016 by Tom Igoe @@ -16,7 +12,14 @@ */ #include #include -#include "config.h" + +#include "arduino_secrets.h" + +///////please enter your sensitive data in the Secret tab/arduino_secrets.h +/////// Wifi Settings /////// +char ssid[] = SECRET_SSID; +char pass[] = SECRET_PASS; + char serverAddress[] = "192.168.0.3"; // server address int port = 8080; diff --git a/examples/SimpleDelete/arduino_secrets.h b/examples/SimpleDelete/arduino_secrets.h new file mode 100644 index 0000000..a8ff904 --- /dev/null +++ b/examples/SimpleDelete/arduino_secrets.h @@ -0,0 +1,3 @@ +#define SECRET_SSID "" +#define SECRET_PASS "" + diff --git a/examples/SimpleDelete/config.h b/examples/SimpleDelete/config.h deleted file mode 100644 index c263766..0000000 --- a/examples/SimpleDelete/config.h +++ /dev/null @@ -1,2 +0,0 @@ -char ssid[] = "ssid"; // your network SSID (name) -char pass[] = "password"; // your network password diff --git a/examples/SimpleGet/SimpleGet.ino b/examples/SimpleGet/SimpleGet.ino index dc68eda..75db9a7 100644 --- a/examples/SimpleGet/SimpleGet.ino +++ b/examples/SimpleGet/SimpleGet.ino @@ -2,11 +2,7 @@ Simple GET client for ArduinoHttpClient library Connects to server once every five seconds, sends a GET request - note: WiFi SSID and password are stored in config.h file. - If it is not present, add a new tab, call it "config.h" - and add the following variables: - char ssid[] = "ssid"; // your network SSID (name) - char pass[] = "password"; // your network password + created 14 Feb 2016 by Tom Igoe @@ -15,7 +11,14 @@ */ #include #include -#include "config.h" + +#include "arduino_secrets.h" + +///////please enter your sensitive data in the Secret tab/arduino_secrets.h +/////// Wifi Settings /////// +char ssid[] = SECRET_SSID; +char pass[] = SECRET_PASS; + char serverAddress[] = "192.168.0.3"; // server address int port = 8080; diff --git a/examples/SimpleGet/arduino_secrets.h b/examples/SimpleGet/arduino_secrets.h new file mode 100644 index 0000000..a8ff904 --- /dev/null +++ b/examples/SimpleGet/arduino_secrets.h @@ -0,0 +1,3 @@ +#define SECRET_SSID "" +#define SECRET_PASS "" + diff --git a/examples/SimpleGet/config.h b/examples/SimpleGet/config.h deleted file mode 100644 index c263766..0000000 --- a/examples/SimpleGet/config.h +++ /dev/null @@ -1,2 +0,0 @@ -char ssid[] = "ssid"; // your network SSID (name) -char pass[] = "password"; // your network password diff --git a/examples/SimpleHttpExample/SimpleHttpExample.ino b/examples/SimpleHttpExample/SimpleHttpExample.ino index a6aa6b6..f64b9ba 100644 --- a/examples/SimpleHttpExample/SimpleHttpExample.ino +++ b/examples/SimpleHttpExample/SimpleHttpExample.ino @@ -11,8 +11,14 @@ // This example downloads the URL "http://arduino.cc/" -char ssid[] = "yourNetwork"; // your network SSID (name) -char pass[] = "secretPassword"; // your network password +#include "arduino_secrets.h" + +///////please enter your sensitive data in the Secret tab/arduino_secrets.h +/////// Wifi Settings /////// +char ssid[] = SECRET_SSID; +char pass[] = SECRET_PASS; + + // Name of the server we want to connect to const char kHostname[] = "arduino.cc"; diff --git a/examples/SimpleHttpExample/arduino_secrets.h b/examples/SimpleHttpExample/arduino_secrets.h new file mode 100644 index 0000000..a8ff904 --- /dev/null +++ b/examples/SimpleHttpExample/arduino_secrets.h @@ -0,0 +1,3 @@ +#define SECRET_SSID "" +#define SECRET_PASS "" + diff --git a/examples/SimplePost/SimplePost.ino b/examples/SimplePost/SimplePost.ino index 42dfea8..6cc3517 100644 --- a/examples/SimplePost/SimplePost.ino +++ b/examples/SimplePost/SimplePost.ino @@ -3,11 +3,7 @@ Connects to server once every five seconds, sends a POST request and a request body - note: WiFi SSID and password are stored in config.h file. - If it is not present, add a new tab, call it "config.h" - and add the following variables: - char ssid[] = "ssid"; // your network SSID (name) - char pass[] = "password"; // your network password + created 14 Feb 2016 by Tom Igoe @@ -16,7 +12,13 @@ */ #include #include -#include "config.h" +#include "arduino_secrets.h" + +///////please enter your sensitive data in the Secret tab/arduino_secrets.h +/////// Wifi Settings /////// +char ssid[] = SECRET_SSID; +char pass[] = SECRET_PASS; + char serverAddress[] = "192.168.0.3"; // server address int port = 8080; diff --git a/examples/SimplePost/arduino_secrets.h b/examples/SimplePost/arduino_secrets.h new file mode 100644 index 0000000..a8ff904 --- /dev/null +++ b/examples/SimplePost/arduino_secrets.h @@ -0,0 +1,3 @@ +#define SECRET_SSID "" +#define SECRET_PASS "" + diff --git a/examples/SimplePost/config.h b/examples/SimplePost/config.h deleted file mode 100644 index c263766..0000000 --- a/examples/SimplePost/config.h +++ /dev/null @@ -1,2 +0,0 @@ -char ssid[] = "ssid"; // your network SSID (name) -char pass[] = "password"; // your network password diff --git a/examples/SimplePut/SimplePut.ino b/examples/SimplePut/SimplePut.ino index 30da9c0..1b06105 100644 --- a/examples/SimplePut/SimplePut.ino +++ b/examples/SimplePut/SimplePut.ino @@ -3,11 +3,7 @@ Connects to server once every five seconds, sends a PUT request and a request body - note: WiFi SSID and password are stored in config.h file. - If it is not present, add a new tab, call it "config.h" - and add the following variables: - char ssid[] = "ssid"; // your network SSID (name) - char pass[] = "password"; // your network password + created 14 Feb 2016 by Tom Igoe @@ -16,7 +12,13 @@ */ #include #include -#include "config.h" +#include "arduino_secrets.h" + +///////please enter your sensitive data in the Secret tab/arduino_secrets.h +/////// Wifi Settings /////// +char ssid[] = SECRET_SSID; +char pass[] = SECRET_PASS; + char serverAddress[] = "192.168.0.3"; // server address int port = 8080; diff --git a/examples/SimplePut/arduino_secrets.h b/examples/SimplePut/arduino_secrets.h new file mode 100644 index 0000000..a8ff904 --- /dev/null +++ b/examples/SimplePut/arduino_secrets.h @@ -0,0 +1,3 @@ +#define SECRET_SSID "" +#define SECRET_PASS "" + diff --git a/examples/SimplePut/config.h b/examples/SimplePut/config.h deleted file mode 100644 index c263766..0000000 --- a/examples/SimplePut/config.h +++ /dev/null @@ -1,2 +0,0 @@ -char ssid[] = "ssid"; // your network SSID (name) -char pass[] = "password"; // your network password diff --git a/examples/SimpleWebSocket/SimpleWebSocket.ino b/examples/SimpleWebSocket/SimpleWebSocket.ino index ccd97b7..baac12f 100644 --- a/examples/SimpleWebSocket/SimpleWebSocket.ino +++ b/examples/SimpleWebSocket/SimpleWebSocket.ino @@ -3,11 +3,6 @@ Connects to the WebSocket server, and sends a hello message every 5 seconds - note: WiFi SSID and password are stored in config.h file. - If it is not present, add a new tab, call it "config.h" - and add the following variables: - char ssid[] = "ssid"; // your network SSID (name) - char pass[] = "password"; // your network password created 28 Jun 2016 by Sandeep Mistry @@ -16,7 +11,12 @@ */ #include #include -#include "config.h" +#include "arduino_secrets.h" + +///////please enter your sensitive data in the Secret tab/arduino_secrets.h +/////// Wifi Settings /////// +char ssid[] = SECRET_SSID; +char pass[] = SECRET_PASS; char serverAddress[] = "echo.websocket.org"; // server address int port = 80; diff --git a/examples/SimpleWebSocket/arduino_secrets.h b/examples/SimpleWebSocket/arduino_secrets.h new file mode 100644 index 0000000..a8ff904 --- /dev/null +++ b/examples/SimpleWebSocket/arduino_secrets.h @@ -0,0 +1,3 @@ +#define SECRET_SSID "" +#define SECRET_PASS "" + diff --git a/examples/SimpleWebSocket/config.h b/examples/SimpleWebSocket/config.h deleted file mode 100644 index 7765359..0000000 --- a/examples/SimpleWebSocket/config.h +++ /dev/null @@ -1,3 +0,0 @@ -char ssid[] = "ssid"; // your network SSID (name) -char pass[] = "password"; // your network password -