diff --git a/examples/Inkplate10/Advanced/DeepSleep/Inkplate10_Partial_Update_With_Deep_Sleep/Inkplate10_Partial_Update_With_Deep_Sleep.ino b/examples/Inkplate10/Advanced/DeepSleep/Inkplate10_Partial_Update_With_Deep_Sleep/Inkplate10_Partial_Update_With_Deep_Sleep.ino index a95db3227..7077f76e5 100644 --- a/examples/Inkplate10/Advanced/DeepSleep/Inkplate10_Partial_Update_With_Deep_Sleep/Inkplate10_Partial_Update_With_Deep_Sleep.ino +++ b/examples/Inkplate10/Advanced/DeepSleep/Inkplate10_Partial_Update_With_Deep_Sleep/Inkplate10_Partial_Update_With_Deep_Sleep.ino @@ -58,7 +58,7 @@ #include "driver/rtc_io.h" // Include ESP32 library for RTC pin I/O (needed for rtc_gpio_isolate() function) #include // Include ESP32 library for RTC (needed for rtc_get_reset_reason() function) -#define uS_TO_S_FACTOR 1000000 // Conversion factor for micro seconds to seconds +#define uS_TO_S_FACTOR 1000000ULL // Conversion factor for micro seconds to seconds #define TIME_TO_SLEEP 10 // Time how long ESP32 will be in deep sleep (in seconds). In this case 10 seconds. Inkplate display(INKPLATE_1BIT); // Create an object on Inkplate library and also set library into 1-bit mode (BW) diff --git a/examples/Inkplate10/Advanced/DeepSleep/Inkplate10_Simple_Deep_Sleep/Inkplate10_Simple_Deep_Sleep.ino b/examples/Inkplate10/Advanced/DeepSleep/Inkplate10_Simple_Deep_Sleep/Inkplate10_Simple_Deep_Sleep.ino index 851769612..bf20df471 100644 --- a/examples/Inkplate10/Advanced/DeepSleep/Inkplate10_Simple_Deep_Sleep/Inkplate10_Simple_Deep_Sleep.ino +++ b/examples/Inkplate10/Advanced/DeepSleep/Inkplate10_Simple_Deep_Sleep/Inkplate10_Simple_Deep_Sleep.ino @@ -60,7 +60,7 @@ const uint8_t *pictures[] = {picture1, picture2, picture3}; // This array of pinters holds address of every picture in the memory, // so we can easly select it by selecting index in array -#define uS_TO_S_FACTOR 1000000 // Conversion factor for micro seconds to seconds +#define uS_TO_S_FACTOR 1000000ULL // Conversion factor for micro seconds to seconds #define TIME_TO_SLEEP 20 // How long ESP32 will be in deep sleep (in seconds) RTC_DATA_ATTR int slide = 0; diff --git a/examples/Inkplate10/Advanced/DeepSleep/Inkplate10_Wake_Up_Button/Inkplate10_Wake_Up_Button.ino b/examples/Inkplate10/Advanced/DeepSleep/Inkplate10_Wake_Up_Button/Inkplate10_Wake_Up_Button.ino index abc164dc8..bf9dd8d31 100644 --- a/examples/Inkplate10/Advanced/DeepSleep/Inkplate10_Wake_Up_Button/Inkplate10_Wake_Up_Button.ino +++ b/examples/Inkplate10/Advanced/DeepSleep/Inkplate10_Wake_Up_Button/Inkplate10_Wake_Up_Button.ino @@ -53,7 +53,7 @@ #include // Conversion factor for micro seconds to seconds -#define uS_TO_S_FACTOR 1000000 +#define uS_TO_S_FACTOR 1000000ULL // Time ESP32 will go to sleep (in seconds) #define TIME_TO_SLEEP 30 diff --git a/examples/Inkplate10/Advanced/WEB_WiFi/Inkplate10_HTTPS_POST_Request/Inkplate10_HTTPS_POST_Request.ino b/examples/Inkplate10/Advanced/WEB_WiFi/Inkplate10_HTTPS_POST_Request/Inkplate10_HTTPS_POST_Request.ino index a67c4d804..70f0b6941 100644 --- a/examples/Inkplate10/Advanced/WEB_WiFi/Inkplate10_HTTPS_POST_Request/Inkplate10_HTTPS_POST_Request.ino +++ b/examples/Inkplate10/Advanced/WEB_WiFi/Inkplate10_HTTPS_POST_Request/Inkplate10_HTTPS_POST_Request.ino @@ -61,8 +61,8 @@ #include // Enter your WiFi credentials -const char *ssid = "Soldered Electronics"; -const char *pass = "dasduino"; +const char *ssid = ""; +const char *pass = ""; // Specify the API URL to send a POST request const char *apiUrl = "https://jsonplaceholder.typicode.com/posts"; diff --git a/examples/Inkplate10/Advanced/WEB_WiFi/Inkplate10_HTTPS_With_Certificate/Inkplate10_HTTPS_With_Certificate.ino b/examples/Inkplate10/Advanced/WEB_WiFi/Inkplate10_HTTPS_With_Certificate/Inkplate10_HTTPS_With_Certificate.ino index 4dd8ced81..50a3d7003 100644 --- a/examples/Inkplate10/Advanced/WEB_WiFi/Inkplate10_HTTPS_With_Certificate/Inkplate10_HTTPS_With_Certificate.ino +++ b/examples/Inkplate10/Advanced/WEB_WiFi/Inkplate10_HTTPS_With_Certificate/Inkplate10_HTTPS_With_Certificate.ino @@ -59,8 +59,8 @@ #include "Inkplate.h" //Include Inkplate library to the sketch Inkplate display(INKPLATE_1BIT); // Create an object on Inkplate library and also set library into 1 Bit mode (BW) -const char ssid[] = "Soldered Electronics"; // Your WiFi SSID -const char *password = "dasduino"; // Your WiFi password +const char ssid[] = ""; // Your WiFi SSID +const char *password = ""; // Your WiFi password //This is the certificate for the website https://varipass.org diff --git a/examples/Inkplate10/Advanced/WEB_WiFi/Inkplate10_HTTP_Request/Inkplate10_HTTP_Request.ino b/examples/Inkplate10/Advanced/WEB_WiFi/Inkplate10_HTTP_Request/Inkplate10_HTTP_Request.ino index 47ec6f186..219066cc1 100644 --- a/examples/Inkplate10/Advanced/WEB_WiFi/Inkplate10_HTTP_Request/Inkplate10_HTTP_Request.ino +++ b/examples/Inkplate10/Advanced/WEB_WiFi/Inkplate10_HTTP_Request/Inkplate10_HTTP_Request.ino @@ -54,8 +54,8 @@ #include //Include HTTP library to this sketch #include //Include ESP32 WiFi library to our sketch -#define ssid "Soldered Electronics" // Name of the WiFi network (SSID) that you want to connect Inkplate to -#define pass "dasduino" // Password of that WiFi network +#define ssid "" // Name of the WiFi network (SSID) that you want to connect Inkplate to +#define pass "" // Password of that WiFi network Inkplate display(INKPLATE_1BIT); // Create an object on Inkplate library and also set library into 1 Bit mode (BW) diff --git a/examples/Inkplate10/Diagnostics/Inkplate10_Factory_Programming_VCOM/test.cpp b/examples/Inkplate10/Diagnostics/Inkplate10_Factory_Programming_VCOM/test.cpp index 30b7b57b8..676576389 100644 --- a/examples/Inkplate10/Diagnostics/Inkplate10_Factory_Programming_VCOM/test.cpp +++ b/examples/Inkplate10/Diagnostics/Inkplate10_Factory_Programming_VCOM/test.cpp @@ -4,8 +4,8 @@ const char sdCardTestStringLength = 100; const char *testString = {"This is some test string..."}; // Change this to your WiFi -const char *WSSID = {"Soldered Electronics"}; -const char *WPASS = {"dasduino"}; +const char *WSSID = {""}; +const char *WPASS = {""}; // Change this to your used slave device const uint8_t easyCDeviceAddress = 0x76; diff --git a/examples/Inkplate10/Projects/Inkplate10_Google_Calendar/Inkplate10_Google_Calendar.ino b/examples/Inkplate10/Projects/Inkplate10_Google_Calendar/Inkplate10_Google_Calendar.ino index 5e7a5b8e3..71f5e6b14 100644 --- a/examples/Inkplate10/Projects/Inkplate10_Google_Calendar/Inkplate10_Google_Calendar.ino +++ b/examples/Inkplate10/Projects/Inkplate10_Google_Calendar/Inkplate10_Google_Calendar.ino @@ -79,7 +79,7 @@ NetworkFunctions network(calendarID, apiKey); Gui gui(inkplate); // --- Deep Sleep Configuration --- -#define uS_TO_S_FACTOR 1000000 // Convert microseconds to seconds +#define uS_TO_S_FACTOR 1000000ULL // Convert microseconds to seconds #define TIME_TO_SLEEP 600 // Sleep time: 600 seconds = 10 minutes void setup() diff --git a/examples/Inkplate10/Projects/Inkplate10_Image_Frame_From_Web/Inkplate10_Image_Frame_From_Web.ino b/examples/Inkplate10/Projects/Inkplate10_Image_Frame_From_Web/Inkplate10_Image_Frame_From_Web.ino index 4330a694d..3af957731 100644 --- a/examples/Inkplate10/Projects/Inkplate10_Image_Frame_From_Web/Inkplate10_Image_Frame_From_Web.ino +++ b/examples/Inkplate10/Projects/Inkplate10_Image_Frame_From_Web/Inkplate10_Image_Frame_From_Web.ino @@ -60,8 +60,8 @@ Inkplate display(INKPLATE_3BIT); -const char ssid[] = "Soldered Electronics"; // Your WiFi SSID -const char *password = "dasduino"; // Your WiFi password +const char ssid[] = ""; // Your WiFi SSID +const char *password = ""; // Your WiFi password void setup() { diff --git a/examples/Inkplate10/Projects/Inkplate10_OpenMeteo_Weather_Station/Inkplate10_OpenMeteo_Weather_Station.ino b/examples/Inkplate10/Projects/Inkplate10_OpenMeteo_Weather_Station/Inkplate10_OpenMeteo_Weather_Station.ino index 29ea09415..5f2317469 100644 --- a/examples/Inkplate10/Projects/Inkplate10_OpenMeteo_Weather_Station/Inkplate10_OpenMeteo_Weather_Station.ino +++ b/examples/Inkplate10/Projects/Inkplate10_OpenMeteo_Weather_Station/Inkplate10_OpenMeteo_Weather_Station.ino @@ -81,8 +81,8 @@ #include "src/includes.h" // Include necessary libraries and dependencies for Inkplate and networking // --- WiFi Configuration --- -const char *ssid = "Soldered Electronics"; -const char *password = "dasduino"; +const char *ssid = ""; +const char *password = ""; // --- User and Location Info --- String myUsername = "Username"; // User's name to be displayed on screen @@ -104,7 +104,7 @@ WeatherData weatherData; // Structure to hold fetched weather data Gui gui(inkplate); // Drawing visuals and info // --- Deep Sleep Configuration --- -#define uS_TO_S_FACTOR 1000000 // Convert microseconds to seconds +#define uS_TO_S_FACTOR 1000000ULL // Convert microseconds to seconds #define TIME_TO_SLEEP 1800 // Sleep time: 1800 seconds = 30 minutes // --- Main Setup: Runs Once on Boot --- diff --git a/examples/Inkplate10/Projects/Inkplate10_Quotables/Inkplate10_Quotables.ino b/examples/Inkplate10/Projects/Inkplate10_Quotables/Inkplate10_Quotables.ino index 19b860ed8..e2e2036bc 100644 --- a/examples/Inkplate10/Projects/Inkplate10_Quotables/Inkplate10_Quotables.ino +++ b/examples/Inkplate10/Projects/Inkplate10_Quotables/Inkplate10_Quotables.ino @@ -73,8 +73,8 @@ //---------- CHANGE HERE -------------: // Put in your ssid and password -char ssid[] = "Soldered Electronics"; -char pass[] = "dasduino"; +char ssid[] = ""; +char pass[] = ""; //---------------------------------- diff --git a/examples/Inkplate10/Projects/Inkplate10_Spotify_Dashboard/Inkplate10_Spotify_Dashboard.ino b/examples/Inkplate10/Projects/Inkplate10_Spotify_Dashboard/Inkplate10_Spotify_Dashboard.ino index d6f11560e..de8e0c81d 100644 --- a/examples/Inkplate10/Projects/Inkplate10_Spotify_Dashboard/Inkplate10_Spotify_Dashboard.ino +++ b/examples/Inkplate10/Projects/Inkplate10_Spotify_Dashboard/Inkplate10_Spotify_Dashboard.ino @@ -87,8 +87,8 @@ // CREDENTIALS / SECRETS -static const char* WIFI_SSID = "Soldered Electronics"; -static const char* WIFI_PASSWORD = "dasduino"; +static const char* WIFI_SSID = ""; +static const char* WIFI_PASSWORD = ""; static const char* SPOTIFY_CLIENT_ID = "your_spotify_client_id"; static const char* SPOTIFY_CLIENT_SECRET = "your_spotify_client_secret"; diff --git a/examples/Inkplate13SPECTRA/Advanced/DeepSleep/Inkpate13SPECTRA_Wake_Up_Button/Inkpate13SPECTRA_Wake_Up_Button.ino b/examples/Inkplate13SPECTRA/Advanced/DeepSleep/Inkpate13SPECTRA_Wake_Up_Button/Inkpate13SPECTRA_Wake_Up_Button.ino index 8199704aa..2a27e2690 100644 --- a/examples/Inkplate13SPECTRA/Advanced/DeepSleep/Inkpate13SPECTRA_Wake_Up_Button/Inkpate13SPECTRA_Wake_Up_Button.ino +++ b/examples/Inkplate13SPECTRA/Advanced/DeepSleep/Inkpate13SPECTRA_Wake_Up_Button/Inkpate13SPECTRA_Wake_Up_Button.ino @@ -5,7 +5,7 @@ #include // Conversion factor for micro seconds to seconds -#define uS_TO_S_FACTOR 1000000 +#define uS_TO_S_FACTOR 1000000ULL // Time ESP32 will go to sleep (in seconds) #define TIME_TO_SLEEP 120 diff --git a/examples/Inkplate13SPECTRA/Advanced/WEB_WiFi/Inkplate13SPECTRA_HTTPS_With_Certificate/Inkplate13SPECTRA_HTTPS_With_Certificate.ino b/examples/Inkplate13SPECTRA/Advanced/WEB_WiFi/Inkplate13SPECTRA_HTTPS_With_Certificate/Inkplate13SPECTRA_HTTPS_With_Certificate.ino index a8a645b89..130d23cff 100644 --- a/examples/Inkplate13SPECTRA/Advanced/WEB_WiFi/Inkplate13SPECTRA_HTTPS_With_Certificate/Inkplate13SPECTRA_HTTPS_With_Certificate.ino +++ b/examples/Inkplate13SPECTRA/Advanced/WEB_WiFi/Inkplate13SPECTRA_HTTPS_With_Certificate/Inkplate13SPECTRA_HTTPS_With_Certificate.ino @@ -25,8 +25,8 @@ #include "Inkplate.h" // Include Inkplate library to the sketch Inkplate display; -const char ssid[] = "Soldered Electronics"; // Your WiFi SSID -const char *password = "dasduino"; // Your WiFi password +const char ssid[] = ""; // Your WiFi SSID +const char *password = ""; // Your WiFi password //This is the certificate for the website https://varipass.org diff --git a/examples/Inkplate13SPECTRA/Advanced/WEB_WiFi/Inkplate13SPECTRA_HTTP_POST_ThingSpeak/Inkplate13SPECTRA_HTTP_POST_ThingSpeak.ino b/examples/Inkplate13SPECTRA/Advanced/WEB_WiFi/Inkplate13SPECTRA_HTTP_POST_ThingSpeak/Inkplate13SPECTRA_HTTP_POST_ThingSpeak.ino index 2cd86bfcd..34cfad1c1 100644 --- a/examples/Inkplate13SPECTRA/Advanced/WEB_WiFi/Inkplate13SPECTRA_HTTP_POST_ThingSpeak/Inkplate13SPECTRA_HTTP_POST_ThingSpeak.ino +++ b/examples/Inkplate13SPECTRA/Advanced/WEB_WiFi/Inkplate13SPECTRA_HTTP_POST_ThingSpeak/Inkplate13SPECTRA_HTTP_POST_ThingSpeak.ino @@ -39,8 +39,8 @@ WiFiClient client; #define POSTING_INTERVAL_IN_SESCS 20 // Enter your WiFi credentials -const char *ssid = "Soldered Electronics"; -const char *pass = "dasduino"; +const char *ssid = ""; +const char *pass = ""; // ThingSpeak settings char *server = "api.thingspeak.com"; diff --git a/examples/Inkplate13SPECTRA/Advanced/WEB_WiFi/Inkplate13SPECTRA_HTTP_Request/Inkplate13SPECTRA_HTTP_Request.ino b/examples/Inkplate13SPECTRA/Advanced/WEB_WiFi/Inkplate13SPECTRA_HTTP_Request/Inkplate13SPECTRA_HTTP_Request.ino index aca5186d9..dc43c4fba 100644 --- a/examples/Inkplate13SPECTRA/Advanced/WEB_WiFi/Inkplate13SPECTRA_HTTP_Request/Inkplate13SPECTRA_HTTP_Request.ino +++ b/examples/Inkplate13SPECTRA/Advanced/WEB_WiFi/Inkplate13SPECTRA_HTTP_Request/Inkplate13SPECTRA_HTTP_Request.ino @@ -24,8 +24,8 @@ #include //Include HTTP library to this sketch #include //Include ESP32 WiFi library to our sketch -#define ssid "Soldered Electronics" // Name of the WiFi network (SSID) that you want to connect Inkplate to -#define pass "dasduino" // Password of that WiFi network +#define ssid "" // Name of the WiFi network (SSID) that you want to connect Inkplate to +#define pass "" // Password of that WiFi network Inkplate inkplate; // Create an object on Inkplate library and also set library into 1 Bit mode (BW) diff --git a/examples/Inkplate13SPECTRA/Advanced/WEB_WiFi/Inkplate13SPECTRA_Show_Pictures_From_Web/Inkplate13SPECTRA_Show_Pictures_From_Web.ino b/examples/Inkplate13SPECTRA/Advanced/WEB_WiFi/Inkplate13SPECTRA_Show_Pictures_From_Web/Inkplate13SPECTRA_Show_Pictures_From_Web.ino index 326079d42..e69d14c05 100644 --- a/examples/Inkplate13SPECTRA/Advanced/WEB_WiFi/Inkplate13SPECTRA_Show_Pictures_From_Web/Inkplate13SPECTRA_Show_Pictures_From_Web.ino +++ b/examples/Inkplate13SPECTRA/Advanced/WEB_WiFi/Inkplate13SPECTRA_Show_Pictures_From_Web/Inkplate13SPECTRA_Show_Pictures_From_Web.ino @@ -26,8 +26,8 @@ #include "WiFi.h" //Include library for WiFi Inkplate inkplate; // Create an object on Inkplate library and also set library into 1 Bit mode (BW) -const char ssid[] = "Soldered Electronics"; // Your WiFi SSID -const char *password = "dasduino"; // Your WiFi password +const char ssid[] = ""; // Your WiFi SSID +const char *password = ""; // Your WiFi password void setup() { diff --git a/examples/Inkplate13SPECTRA/Diagnostics/Inkplate13SPECTRA_Factory_Programming/test.cpp b/examples/Inkplate13SPECTRA/Diagnostics/Inkplate13SPECTRA_Factory_Programming/test.cpp index baa136419..e62ca0a98 100644 --- a/examples/Inkplate13SPECTRA/Diagnostics/Inkplate13SPECTRA_Factory_Programming/test.cpp +++ b/examples/Inkplate13SPECTRA/Diagnostics/Inkplate13SPECTRA_Factory_Programming/test.cpp @@ -6,8 +6,8 @@ static constexpr size_t sdCardTestStringLength = 100; // Keep this short so it always fits comfortably static const char *testString = "This is some test string..."; -static const char *WSSID = "Soldered Electronics"; -static const char *WPASS = "dasduino"; +static const char *WSSID = ""; +static const char *WPASS = ""; // Change this to your used slave device static const uint8_t easyCDeviceAddress = 0x76; diff --git a/examples/Inkplate13SPECTRA/Projects/Inkplate13SPECTRA_Google_Calendar/Inkplate13SPECTRA_Google_Calendar.ino b/examples/Inkplate13SPECTRA/Projects/Inkplate13SPECTRA_Google_Calendar/Inkplate13SPECTRA_Google_Calendar.ino index 715cfdedf..494758a9c 100644 --- a/examples/Inkplate13SPECTRA/Projects/Inkplate13SPECTRA_Google_Calendar/Inkplate13SPECTRA_Google_Calendar.ino +++ b/examples/Inkplate13SPECTRA/Projects/Inkplate13SPECTRA_Google_Calendar/Inkplate13SPECTRA_Google_Calendar.ino @@ -47,7 +47,7 @@ NetworkFunctions network(calendarID, apiKey); Gui gui(inkplate); // --- Deep Sleep Configuration --- -#define uS_TO_S_FACTOR 1000000 // Convert microseconds to seconds +#define uS_TO_S_FACTOR 1000000ULL // Convert microseconds to seconds #define TIME_TO_SLEEP 600 // Sleep time: 600 seconds = 10 minutes void setup() diff --git a/examples/Inkplate13SPECTRA/Projects/Inkplate13SPECTRA_Image_Frame_From_Web/Inkplate13SPECTRA_Image_Frame_From_Web.ino b/examples/Inkplate13SPECTRA/Projects/Inkplate13SPECTRA_Image_Frame_From_Web/Inkplate13SPECTRA_Image_Frame_From_Web.ino index 741c42456..9e73a5ba5 100644 --- a/examples/Inkplate13SPECTRA/Projects/Inkplate13SPECTRA_Image_Frame_From_Web/Inkplate13SPECTRA_Image_Frame_From_Web.ino +++ b/examples/Inkplate13SPECTRA/Projects/Inkplate13SPECTRA_Image_Frame_From_Web/Inkplate13SPECTRA_Image_Frame_From_Web.ino @@ -23,8 +23,8 @@ Inkplate display; //WiFi credentials -const char *ssid = "Soldered Electronics"; // Your WiFi SSID -const char *password = "dasduino"; // Your WiFi password +const char *ssid = ""; // Your WiFi SSID +const char *password = ""; // Your WiFi password void setup() diff --git a/examples/Inkplate13SPECTRA/Projects/Inkplate13SPECTRA_OpenMeteo_Weather_Station/Inkplate13SPECTRA_OpenMeteo_Weather_Station.ino b/examples/Inkplate13SPECTRA/Projects/Inkplate13SPECTRA_OpenMeteo_Weather_Station/Inkplate13SPECTRA_OpenMeteo_Weather_Station.ino index df410017c..48fe6c16c 100644 --- a/examples/Inkplate13SPECTRA/Projects/Inkplate13SPECTRA_OpenMeteo_Weather_Station/Inkplate13SPECTRA_OpenMeteo_Weather_Station.ino +++ b/examples/Inkplate13SPECTRA/Projects/Inkplate13SPECTRA_OpenMeteo_Weather_Station/Inkplate13SPECTRA_OpenMeteo_Weather_Station.ino @@ -30,8 +30,8 @@ #include "src/includes.h" // Include necessary libraries and dependencies for Inkplate and networking // --- WiFi Configuration --- -const char *ssid = "Soldered Electronics"; -const char *password = "dasduino"; +const char *ssid = ""; +const char *password = ""; // --- User and Location Info --- String myUsername = "Soldered"; // User's name to be displayed on screen @@ -53,7 +53,7 @@ WeatherData weatherData; // Structure to hold fetched weather data Gui gui(inkplate); // Drawing visuals and info // --- Deep Sleep Configuration --- -#define uS_TO_S_FACTOR 1000000 // Convert microseconds to seconds +#define uS_TO_S_FACTOR 1000000ULL // Convert microseconds to seconds #define TIME_TO_SLEEP 1800 // Sleep time: 1800 seconds = 30 minutes // --- Main Setup: Runs Once on Boot --- diff --git a/examples/Inkplate13SPECTRA/Projects/Inkplate13SPECTRA_Spotify_Album/Inkplate13SPECTRA_Spotify_Album.ino b/examples/Inkplate13SPECTRA/Projects/Inkplate13SPECTRA_Spotify_Album/Inkplate13SPECTRA_Spotify_Album.ino index ead95fea0..a0eca0779 100644 --- a/examples/Inkplate13SPECTRA/Projects/Inkplate13SPECTRA_Spotify_Album/Inkplate13SPECTRA_Spotify_Album.ino +++ b/examples/Inkplate13SPECTRA/Projects/Inkplate13SPECTRA_Spotify_Album/Inkplate13SPECTRA_Spotify_Album.ino @@ -41,8 +41,8 @@ // CREDENTIALS / SECRETS -static const char* WIFI_SSID = "Soldered Electronics"; -static const char* WIFI_PASSWORD = "dasduino"; +static const char* WIFI_SSID = ""; +static const char* WIFI_PASSWORD = ""; static const char* SPOTIFY_CLIENT_ID = "your_spotify_client_id"; static const char* SPOTIFY_CLIENT_SECRET = "your_spotify_client_secret"; diff --git a/examples/Inkplate2/Advanced/DeepSleep/Inkplate2_RTC_Alarm_With_Deep_Sleep/Inkplate2_RTC_Alarm_With_Deep_Sleep.ino b/examples/Inkplate2/Advanced/DeepSleep/Inkplate2_RTC_Alarm_With_Deep_Sleep/Inkplate2_RTC_Alarm_With_Deep_Sleep.ino index 2e60a5a08..ea270c74b 100644 --- a/examples/Inkplate2/Advanced/DeepSleep/Inkplate2_RTC_Alarm_With_Deep_Sleep/Inkplate2_RTC_Alarm_With_Deep_Sleep.ino +++ b/examples/Inkplate2/Advanced/DeepSleep/Inkplate2_RTC_Alarm_With_Deep_Sleep/Inkplate2_RTC_Alarm_With_Deep_Sleep.ino @@ -87,8 +87,8 @@ NetworkFunctions network; // Create network object for WiFi and HTTP functions RTC rtc; // RTC object for RTC functions // Write your SSID and password (needed to get the correct time from the Internet) -char ssid[] = "Soldered Electronics"; -char pass[] = "dasduino"; +char ssid[] = ""; +char pass[] = ""; // Adjust your time zone, 1 means UTC+1 int timeZone = 1; diff --git a/examples/Inkplate2/Advanced/DeepSleep/Inkplate2_Simple_Deep_Sleep/Inkplate2_Simple_Deep_Sleep.ino b/examples/Inkplate2/Advanced/DeepSleep/Inkplate2_Simple_Deep_Sleep/Inkplate2_Simple_Deep_Sleep.ino index 9649d65c2..084e361e3 100644 --- a/examples/Inkplate2/Advanced/DeepSleep/Inkplate2_Simple_Deep_Sleep/Inkplate2_Simple_Deep_Sleep.ino +++ b/examples/Inkplate2/Advanced/DeepSleep/Inkplate2_Simple_Deep_Sleep/Inkplate2_Simple_Deep_Sleep.ino @@ -72,7 +72,7 @@ #include "picture2.h" #include "picture3.h" -#define uS_TO_S_FACTOR 1000000 // Conversion factor for micro seconds to seconds +#define uS_TO_S_FACTOR 1000000ULL // Conversion factor for micro seconds to seconds #define TIME_TO_SLEEP 20 // How long ESP32 will be in deep sleep (in seconds) const uint8_t *pictures[] = {pic1, pic2, pic3}; // This array holds address of every picture in the memory, so we can diff --git a/examples/Inkplate2/Advanced/RTC/Inkplate2_RTC_Alarm/Inkplate2_RTC_Alarm.ino b/examples/Inkplate2/Advanced/RTC/Inkplate2_RTC_Alarm/Inkplate2_RTC_Alarm.ino index f117fc98d..55d38a48a 100644 --- a/examples/Inkplate2/Advanced/RTC/Inkplate2_RTC_Alarm/Inkplate2_RTC_Alarm.ino +++ b/examples/Inkplate2/Advanced/RTC/Inkplate2_RTC_Alarm/Inkplate2_RTC_Alarm.ino @@ -72,8 +72,8 @@ Inkplate display; // Initialize Inkplate object NetworkFunctions network; // Create network object for WiFi and HTTP functions // Write your SSID and password (needed to get the correct time from the Internet) -char ssid[] = "Soldered Electronics"; -char pass[] = "dasduino"; +char ssid[] = ""; +char pass[] = ""; // Define a delay time of 40 seconds. It's around a minute if we add the refresh display time #define DELAY_TIME 40 * 1000 diff --git a/examples/Inkplate2/Advanced/RTC/Inkplate2_RTC_Alarm_Periodic/Inkplate2_RTC_Alarm_Periodic.ino b/examples/Inkplate2/Advanced/RTC/Inkplate2_RTC_Alarm_Periodic/Inkplate2_RTC_Alarm_Periodic.ino index 3747e34a7..08481f651 100644 --- a/examples/Inkplate2/Advanced/RTC/Inkplate2_RTC_Alarm_Periodic/Inkplate2_RTC_Alarm_Periodic.ino +++ b/examples/Inkplate2/Advanced/RTC/Inkplate2_RTC_Alarm_Periodic/Inkplate2_RTC_Alarm_Periodic.ino @@ -86,8 +86,8 @@ NetworkFunctions network; // Create network object for WiFi and HTTP functions RTC rtc; // Create RTC object for RTC functions // Write your SSID and password (needed to get the correct time from the Internet) -char ssid[] = "Soldered Electronics"; -char pass[] = "dasduino"; +char ssid[] = ""; +char pass[] = ""; // Adjust your time zone, 1 means UTC+1 int timeZone = 1; diff --git a/examples/Inkplate2/Advanced/WEB_WiFi/Inkplate2_Show_Pictures_From_Web/Inkplate2_Show_Pictures_From_Web.ino b/examples/Inkplate2/Advanced/WEB_WiFi/Inkplate2_Show_Pictures_From_Web/Inkplate2_Show_Pictures_From_Web.ino index 5f295d585..1d673d3f6 100644 --- a/examples/Inkplate2/Advanced/WEB_WiFi/Inkplate2_Show_Pictures_From_Web/Inkplate2_Show_Pictures_From_Web.ino +++ b/examples/Inkplate2/Advanced/WEB_WiFi/Inkplate2_Show_Pictures_From_Web/Inkplate2_Show_Pictures_From_Web.ino @@ -77,8 +77,8 @@ #include "WiFi.h" // Include library for WiFi Inkplate display; // Create an object on Inkplate library and also set library into 1 Bit mode (BW) -const char ssid[] = "Soldered Electronics"; // Your WiFi SSID -const char password[] = "dasduino"; // Your WiFi password +const char ssid[] = ""; // Your WiFi SSID +const char password[] = ""; // Your WiFi password void setup() { diff --git a/examples/Inkplate2/Diagnostics/Inkplate2_Factory_Programming/test.cpp b/examples/Inkplate2/Diagnostics/Inkplate2_Factory_Programming/test.cpp index f628af8e0..a637f80e6 100644 --- a/examples/Inkplate2/Diagnostics/Inkplate2_Factory_Programming/test.cpp +++ b/examples/Inkplate2/Diagnostics/Inkplate2_Factory_Programming/test.cpp @@ -2,8 +2,8 @@ #include "Wire.h" // Change this to your WiFi -const char *WSSID = {"Soldered Electronics"}; -const char *WPASS = {"dasduino"}; +const char *WSSID = {""}; +const char *WPASS = {""}; // Change this to your used slave device const uint8_t easyCDeviceAddress = 0x76; diff --git a/examples/Inkplate2/Projects/Inkplate2_Clock/Inkplate2_Clock.ino b/examples/Inkplate2/Projects/Inkplate2_Clock/Inkplate2_Clock.ino index f92457ad7..ac6408fbe 100644 --- a/examples/Inkplate2/Projects/Inkplate2_Clock/Inkplate2_Clock.ino +++ b/examples/Inkplate2/Projects/Inkplate2_Clock/Inkplate2_Clock.ino @@ -94,8 +94,8 @@ uint8_t MODE = 1; int timeZone = 2; // Put in your ssid and password -char ssid[] = "Soldered Electronics"; -char pass[] = "dasduino"; +char ssid[] = ""; +char pass[] = ""; #define DELAY_WIFI_RETRY_SECONDS 10 //---------------------------------- @@ -111,7 +111,7 @@ char pass[] = "dasduino"; #include "includes/two.h" #include "includes/zero.h" -#define uS_TO_S_FACTOR 1000000 // Conversion factor for micro seconds to seconds +#define uS_TO_S_FACTOR 1000000ULL // Conversion factor for micro seconds to seconds #define TIME_TO_SLEEP 300 // How long ESP32 will be in deep sleep (in seconds) // Array for digital display 7 segment numbers bitmaps diff --git a/examples/Inkplate2/Projects/Inkplate2_Google_Calendar/Inkplate2_Google_Calendar.ino b/examples/Inkplate2/Projects/Inkplate2_Google_Calendar/Inkplate2_Google_Calendar.ino index d30dc54e7..4cfa23070 100644 --- a/examples/Inkplate2/Projects/Inkplate2_Google_Calendar/Inkplate2_Google_Calendar.ino +++ b/examples/Inkplate2/Projects/Inkplate2_Google_Calendar/Inkplate2_Google_Calendar.ino @@ -97,7 +97,7 @@ NetworkFunctions network(calendarID, apiKey); Gui gui(inkplate); // --- Deep Sleep Configuration --- -#define uS_TO_S_FACTOR 1000000 // Convert microseconds to seconds +#define uS_TO_S_FACTOR 1000000ULL // Convert microseconds to seconds #define TIME_TO_SLEEP 600 // Sleep time: 600 seconds = 10 minutes void setup() diff --git a/examples/Inkplate2/Projects/Inkplate2_Hourly_Weather_Station/Inkplate2_Hourly_Weather_Station.ino b/examples/Inkplate2/Projects/Inkplate2_Hourly_Weather_Station/Inkplate2_Hourly_Weather_Station.ino index 9bacf289c..a481a1d12 100644 --- a/examples/Inkplate2/Projects/Inkplate2_Hourly_Weather_Station/Inkplate2_Hourly_Weather_Station.ino +++ b/examples/Inkplate2/Projects/Inkplate2_Hourly_Weather_Station/Inkplate2_Hourly_Weather_Station.ino @@ -100,8 +100,8 @@ Inkplate display; NetworkFunctions network; // Change to your wifi ssid and password -char ssid[] = "Soldered Electronics"; -char pass[] = "dasduino"; +char ssid[] = ""; +char pass[] = ""; // Change to your api key, if you don't have one, head over to: // https://openweathermap.org/guide , register and copy the key provided diff --git a/examples/Inkplate2/Projects/Inkplate2_Image_Frame_From_Web/Inkplate2_Image_Frame_From_Web.ino b/examples/Inkplate2/Projects/Inkplate2_Image_Frame_From_Web/Inkplate2_Image_Frame_From_Web.ino index 4b201c5a2..13b339a18 100644 --- a/examples/Inkplate2/Projects/Inkplate2_Image_Frame_From_Web/Inkplate2_Image_Frame_From_Web.ino +++ b/examples/Inkplate2/Projects/Inkplate2_Image_Frame_From_Web/Inkplate2_Image_Frame_From_Web.ino @@ -76,8 +76,8 @@ Inkplate display; // ---------------- CHANGE HERE ---------------------: // WiFi credentials -const char *ssid = "Soldered Electronics"; // Your WiFi SSID -const char *password = "dasduino"; // Your WiFi password +const char *ssid = ""; // Your WiFi SSID +const char *password = ""; // Your WiFi password // Define delay between 2 images in seconds #define SECS_BETWEEN_IMAGES 30 diff --git a/examples/Inkplate2/Projects/Inkplate2_OpenAI_Text_Prompt/Inkplate2_OpenAI_Text_Prompt.ino b/examples/Inkplate2/Projects/Inkplate2_OpenAI_Text_Prompt/Inkplate2_OpenAI_Text_Prompt.ino index bb92e16e0..1107dcc7e 100644 --- a/examples/Inkplate2/Projects/Inkplate2_OpenAI_Text_Prompt/Inkplate2_OpenAI_Text_Prompt.ino +++ b/examples/Inkplate2/Projects/Inkplate2_OpenAI_Text_Prompt/Inkplate2_OpenAI_Text_Prompt.ino @@ -78,7 +78,7 @@ // How long the device will stay in deep sleep (in minutes) #define SLEEP_DURATION_IN_MINS 30*60 -#define uS_TO_S_FACTOR 1000000 +#define uS_TO_S_FACTOR 1000000ULL // WiFi credentials const char* ssid = ""; diff --git a/examples/Inkplate2/Projects/Inkplate2_OpenMeteo_Weather_Station/Inkplate2_OpenMeteo_Weather_Station.ino b/examples/Inkplate2/Projects/Inkplate2_OpenMeteo_Weather_Station/Inkplate2_OpenMeteo_Weather_Station.ino index 5e263a843..93f61ae5f 100644 --- a/examples/Inkplate2/Projects/Inkplate2_OpenMeteo_Weather_Station/Inkplate2_OpenMeteo_Weather_Station.ino +++ b/examples/Inkplate2/Projects/Inkplate2_OpenMeteo_Weather_Station/Inkplate2_OpenMeteo_Weather_Station.ino @@ -78,8 +78,8 @@ #include "src/includes.h" // Include necessary libraries and dependencies for Inkplate and networking // --- WiFi Configuration --- -const char *ssid = "Soldered Electronics"; -const char *password = "dasduino"; +const char *ssid = ""; +const char *password = ""; // --- User and Location Info --- String myUsername = "Username"; // User's name to be displayed on screen @@ -101,7 +101,7 @@ WeatherData weatherData; // Structure to hold fetched weather data Gui gui(inkplate); // Drawing visuals and info // --- Deep Sleep Configuration --- -#define uS_TO_S_FACTOR 1000000 // Convert microseconds to seconds +#define uS_TO_S_FACTOR 1000000ULL // Convert microseconds to seconds #define TIME_TO_SLEEP 600 // Sleep time: 600 seconds = 10 minutes RTC_DATA_ATTR int bootCount = 0; // This variable persists across deep sleep resets diff --git a/examples/Inkplate2/Projects/Inkplate2_Quotables/Inkplate2_Quotables.ino b/examples/Inkplate2/Projects/Inkplate2_Quotables/Inkplate2_Quotables.ino index 7bacc8341..89fe0ed93 100644 --- a/examples/Inkplate2/Projects/Inkplate2_Quotables/Inkplate2_Quotables.ino +++ b/examples/Inkplate2/Projects/Inkplate2_Quotables/Inkplate2_Quotables.ino @@ -71,8 +71,8 @@ //---------- CHANGE HERE -------------: // Put in your ssid and password -char ssid[] = "Soldered Electronics"; -char pass[] = "dasduino"; +char ssid[] = ""; +char pass[] = ""; //---------------------------------- diff --git a/examples/Inkplate2/Projects/Inkplate2_World_Clock/Inkplate2_World_Clock.ino b/examples/Inkplate2/Projects/Inkplate2_World_Clock/Inkplate2_World_Clock.ino index fe71245ed..3516f70e0 100644 --- a/examples/Inkplate2/Projects/Inkplate2_World_Clock/Inkplate2_World_Clock.ino +++ b/examples/Inkplate2/Projects/Inkplate2_World_Clock/Inkplate2_World_Clock.ino @@ -13,15 +13,15 @@ #define M_PI 3.14159265358979323846 #endif -#define uS_TO_S_FACTOR 1000000ULL +#define uS_TO_S_FACTOR 1000000ULLULL #define TIME_TO_SLEEP 300 #define DELAY_WIFI_RETRY_SECONDS 10 NetworkFunctions network; Inkplate display; -char ssid[] = "Soldered Electronics"; -char pass[] = "dasduino"; +char ssid[] = ""; +char pass[] = ""; int hours; int minutes; diff --git a/examples/Inkplate4TEMPERA/Advanced/DeepSleep/Inkplate4TEMPERA_Partial_Update_With_Deep_Sleep/Inkplate4TEMPERA_Partial_Update_With_Deep_Sleep.ino b/examples/Inkplate4TEMPERA/Advanced/DeepSleep/Inkplate4TEMPERA_Partial_Update_With_Deep_Sleep/Inkplate4TEMPERA_Partial_Update_With_Deep_Sleep.ino index 05a75f38c..d49321fbb 100644 --- a/examples/Inkplate4TEMPERA/Advanced/DeepSleep/Inkplate4TEMPERA_Partial_Update_With_Deep_Sleep/Inkplate4TEMPERA_Partial_Update_With_Deep_Sleep.ino +++ b/examples/Inkplate4TEMPERA/Advanced/DeepSleep/Inkplate4TEMPERA_Partial_Update_With_Deep_Sleep/Inkplate4TEMPERA_Partial_Update_With_Deep_Sleep.ino @@ -58,7 +58,7 @@ #include "driver/rtc_io.h" // Include ESP32 library for RTC pin I/O (needed for rtc_gpio_isolate() function) #include // Include ESP32 library for RTC (needed for rtc_get_reset_reason() function) -#define uS_TO_S_FACTOR 1000000 // Conversion factor for micro seconds to seconds +#define uS_TO_S_FACTOR 1000000ULL // Conversion factor for micro seconds to seconds #define TIME_TO_SLEEP 10 // Time how long ESP32 will be in deep sleep (in seconds). In this case 10 seconds. Inkplate display(INKPLATE_1BIT); // Create an object on Inkplate library and also set library into 1-bit mode (BW) diff --git a/examples/Inkplate4TEMPERA/Advanced/DeepSleep/Inkplate4TEMPERA_Simple_Deep_Sleep/Inkplate4TEMPERA_Simple_Deep_Sleep.ino b/examples/Inkplate4TEMPERA/Advanced/DeepSleep/Inkplate4TEMPERA_Simple_Deep_Sleep/Inkplate4TEMPERA_Simple_Deep_Sleep.ino index 03984fc6c..cd1dd0026 100644 --- a/examples/Inkplate4TEMPERA/Advanced/DeepSleep/Inkplate4TEMPERA_Simple_Deep_Sleep/Inkplate4TEMPERA_Simple_Deep_Sleep.ino +++ b/examples/Inkplate4TEMPERA/Advanced/DeepSleep/Inkplate4TEMPERA_Simple_Deep_Sleep/Inkplate4TEMPERA_Simple_Deep_Sleep.ino @@ -59,7 +59,7 @@ const uint8_t *pictures[] = {picture1, picture2, picture3}; // This array of pinters holds address of every picture in the memory, // so we can easly select it by selecting index in array -#define uS_TO_S_FACTOR 1000000 // Conversion factor for micro seconds to seconds +#define uS_TO_S_FACTOR 1000000ULL // Conversion factor for micro seconds to seconds #define TIME_TO_SLEEP 20 // How long ESP32 will be in deep sleep (in seconds) RTC_DATA_ATTR int slide = 0; diff --git a/examples/Inkplate4TEMPERA/Advanced/DeepSleep/Inkplate4TEMPERA_Wake_Up_Button/Inkplate4TEMPERA_Wake_Up_Button.ino b/examples/Inkplate4TEMPERA/Advanced/DeepSleep/Inkplate4TEMPERA_Wake_Up_Button/Inkplate4TEMPERA_Wake_Up_Button.ino index a6091851a..cd97676f5 100644 --- a/examples/Inkplate4TEMPERA/Advanced/DeepSleep/Inkplate4TEMPERA_Wake_Up_Button/Inkplate4TEMPERA_Wake_Up_Button.ino +++ b/examples/Inkplate4TEMPERA/Advanced/DeepSleep/Inkplate4TEMPERA_Wake_Up_Button/Inkplate4TEMPERA_Wake_Up_Button.ino @@ -56,7 +56,7 @@ Inkplate display(INKPLATE_1BIT); // Conversion factor for micro seconds to seconds -#define uS_TO_S_FACTOR 1000000 +#define uS_TO_S_FACTOR 1000000ULL // Time ESP32 will go to sleep (in seconds) #define TIME_TO_SLEEP 30 diff --git a/examples/Inkplate4TEMPERA/Advanced/DeepSleep/Inkplate4TEMPERA_Wake_Up_On_Touchscreen/Inkplate4TEMPERA_Wake_Up_On_Touchscreen.ino b/examples/Inkplate4TEMPERA/Advanced/DeepSleep/Inkplate4TEMPERA_Wake_Up_On_Touchscreen/Inkplate4TEMPERA_Wake_Up_On_Touchscreen.ino index 4fc7b6369..9d403f372 100644 --- a/examples/Inkplate4TEMPERA/Advanced/DeepSleep/Inkplate4TEMPERA_Wake_Up_On_Touchscreen/Inkplate4TEMPERA_Wake_Up_On_Touchscreen.ino +++ b/examples/Inkplate4TEMPERA/Advanced/DeepSleep/Inkplate4TEMPERA_Wake_Up_On_Touchscreen/Inkplate4TEMPERA_Wake_Up_On_Touchscreen.ino @@ -74,7 +74,7 @@ #include // Conversion factor for micro seconds to seconds -#define uS_TO_S_FACTOR 1000000 +#define uS_TO_S_FACTOR 1000000ULL // Time ESP32 will go to sleep (in seconds) #define TIME_TO_SLEEP 30 diff --git a/examples/Inkplate4TEMPERA/Basic/Inkplate4TEMPERA_Simple_Frontlight/Inkplate4TEMPERA_Simple_Frontlight.ino b/examples/Inkplate4TEMPERA/Basic/Inkplate4TEMPERA_Simple_Frontlight/Inkplate4TEMPERA_Simple_Frontlight.ino index 08711bcfc..5b1535918 100644 --- a/examples/Inkplate4TEMPERA/Basic/Inkplate4TEMPERA_Simple_Frontlight/Inkplate4TEMPERA_Simple_Frontlight.ino +++ b/examples/Inkplate4TEMPERA/Basic/Inkplate4TEMPERA_Simple_Frontlight/Inkplate4TEMPERA_Simple_Frontlight.ino @@ -69,7 +69,7 @@ void setup() Serial.begin(115200); // Set up a serial communication of 115200 baud display.begin(); // Init Inkplate library display.frontlight.setState(true); // Enable frontlight circuit - display.frontlight.setState(b); // Set frontlight intensity + display.frontlight.setBrightness(b); // Set frontlight intensity } void loop() @@ -98,13 +98,13 @@ void loop() { for (int i = 0; i < 64; ++i) { - display.frontlight.setState(i); + display.frontlight.setBrightness(i); delay(30); } for (int i = 63; i >= 0; --i) { - display.frontlight.setState(i); + display.frontlight.setBrightness(i); delay(30); } } @@ -114,10 +114,11 @@ void loop() if (change) // If frontlight valuse has changed, update the intensity and show current value of frontlight { - display.frontlight.setState(b); + display.frontlight.setBrightness(b); Serial.print("Frontlight:"); Serial.print(b, DEC); Serial.println("/63"); } } } + diff --git a/examples/Inkplate4TEMPERA/Diagnostics/Inkplate4TEMPERA_Factory_Programming_VCOM/test.cpp b/examples/Inkplate4TEMPERA/Diagnostics/Inkplate4TEMPERA_Factory_Programming_VCOM/test.cpp index eef004ddd..b3b6cbde0 100644 --- a/examples/Inkplate4TEMPERA/Diagnostics/Inkplate4TEMPERA_Factory_Programming_VCOM/test.cpp +++ b/examples/Inkplate4TEMPERA/Diagnostics/Inkplate4TEMPERA_Factory_Programming_VCOM/test.cpp @@ -3,8 +3,8 @@ const char sdCardTestStringLength = 100; const char *testString = {"This is some test string..."}; -const char *WSSID = {"Soldered Electronics"}; -const char *WPASS = {"dasduino"}; +const char *WSSID = {""}; +const char *WPASS = {""}; // Change this to your used slave device const uint8_t easyCDeviceAddress = 0x76; diff --git a/examples/Inkplate4TEMPERA/Projects/Inkplate4TEMPERA_Google_Calendar/Inkplate4TEMPERA_Google_Calendar.ino b/examples/Inkplate4TEMPERA/Projects/Inkplate4TEMPERA_Google_Calendar/Inkplate4TEMPERA_Google_Calendar.ino index 681f1ed25..a96181acc 100644 --- a/examples/Inkplate4TEMPERA/Projects/Inkplate4TEMPERA_Google_Calendar/Inkplate4TEMPERA_Google_Calendar.ino +++ b/examples/Inkplate4TEMPERA/Projects/Inkplate4TEMPERA_Google_Calendar/Inkplate4TEMPERA_Google_Calendar.ino @@ -97,7 +97,7 @@ NetworkFunctions network(calendarID, apiKey); Gui gui(inkplate); // --- Deep Sleep Configuration --- -#define uS_TO_S_FACTOR 1000000 // Convert microseconds to seconds +#define uS_TO_S_FACTOR 1000000ULL // Convert microseconds to seconds #define TIME_TO_SLEEP 600 // Sleep time: 600 seconds = 10 minutes void setup() diff --git a/examples/Inkplate4TEMPERA/Projects/Inkplate4TEMPERA_Image_Frame_From_Web/Inkplate4TEMPERA_Image_Frame_From_Web.ino b/examples/Inkplate4TEMPERA/Projects/Inkplate4TEMPERA_Image_Frame_From_Web/Inkplate4TEMPERA_Image_Frame_From_Web.ino index c1043bd34..f1c155eaa 100644 --- a/examples/Inkplate4TEMPERA/Projects/Inkplate4TEMPERA_Image_Frame_From_Web/Inkplate4TEMPERA_Image_Frame_From_Web.ino +++ b/examples/Inkplate4TEMPERA/Projects/Inkplate4TEMPERA_Image_Frame_From_Web/Inkplate4TEMPERA_Image_Frame_From_Web.ino @@ -74,8 +74,8 @@ Inkplate display(INKPLATE_3BIT); // ---------------- CHANGE HERE ---------------------: -const char ssid[] = "Soldered Electronics"; // Your WiFi SSID -const char *password = "dasduino"; // Your WiFi password +const char ssid[] = ""; // Your WiFi SSID +const char *password = ""; // Your WiFi password void setup() { diff --git a/examples/Inkplate4TEMPERA/Projects/Inkplate4TEMPERA_OpenMeteo_Weather_Station/Inkplate4TEMPERA_OpenMeteo_Weather_Station.ino b/examples/Inkplate4TEMPERA/Projects/Inkplate4TEMPERA_OpenMeteo_Weather_Station/Inkplate4TEMPERA_OpenMeteo_Weather_Station.ino index 042b67d78..926b44df0 100644 --- a/examples/Inkplate4TEMPERA/Projects/Inkplate4TEMPERA_OpenMeteo_Weather_Station/Inkplate4TEMPERA_OpenMeteo_Weather_Station.ino +++ b/examples/Inkplate4TEMPERA/Projects/Inkplate4TEMPERA_OpenMeteo_Weather_Station/Inkplate4TEMPERA_OpenMeteo_Weather_Station.ino @@ -98,7 +98,7 @@ WeatherData weatherData; // Structure to hold fetched weather data Gui gui(inkplate); // Drawing visuals and info // --- Deep Sleep Configuration --- -#define uS_TO_S_FACTOR 1000000 // Convert microseconds to seconds +#define uS_TO_S_FACTOR 1000000ULL // Convert microseconds to seconds #define TIME_TO_SLEEP 1800 // Sleep time: 1800 seconds = 30 minutes // --- Main Setup: Runs Once on Boot --- diff --git a/examples/Inkplate5/Advanced/DeepSleep/Inkplate5_Partial_Update_With_Deep_Sleep/Inkplate5_Partial_Update_With_Deep_Sleep.ino b/examples/Inkplate5/Advanced/DeepSleep/Inkplate5_Partial_Update_With_Deep_Sleep/Inkplate5_Partial_Update_With_Deep_Sleep.ino index 65de8a498..d6bfb60cf 100644 --- a/examples/Inkplate5/Advanced/DeepSleep/Inkplate5_Partial_Update_With_Deep_Sleep/Inkplate5_Partial_Update_With_Deep_Sleep.ino +++ b/examples/Inkplate5/Advanced/DeepSleep/Inkplate5_Partial_Update_With_Deep_Sleep/Inkplate5_Partial_Update_With_Deep_Sleep.ino @@ -57,7 +57,7 @@ #include "Inkplate.h" // Include Inkplate library to the sketch #include // Include ESP32 library for RTC (needed for rtc_get_reset_reason() function) -#define uS_TO_S_FACTOR 1000000 // Conversion factor for micro seconds to seconds +#define uS_TO_S_FACTOR 1000000ULL // Conversion factor for micro seconds to seconds #define TIME_TO_SLEEP 10 // Time how long ESP32 will be in deep sleep (in seconds). In this case 10 seconds. Inkplate display(INKPLATE_1BIT); // Create an object on Inkplate library and also set library into 1-bit mode (BW) diff --git a/examples/Inkplate5/Advanced/DeepSleep/Inkplate5_Simple_Deep_Sleep/Inkplate5_Simple_Deep_Sleep.ino b/examples/Inkplate5/Advanced/DeepSleep/Inkplate5_Simple_Deep_Sleep/Inkplate5_Simple_Deep_Sleep.ino index 2f8f22980..6bec54024 100644 --- a/examples/Inkplate5/Advanced/DeepSleep/Inkplate5_Simple_Deep_Sleep/Inkplate5_Simple_Deep_Sleep.ino +++ b/examples/Inkplate5/Advanced/DeepSleep/Inkplate5_Simple_Deep_Sleep/Inkplate5_Simple_Deep_Sleep.ino @@ -57,7 +57,7 @@ const uint8_t *pictures[] = {pic1, pic2, pic3}; // This array of pinters holds address of every picture in the memory, // so we can easly select it by selecting index in array -#define uS_TO_S_FACTOR 1000000 // Conversion factor for micro seconds to seconds +#define uS_TO_S_FACTOR 1000000ULL // Conversion factor for micro seconds to seconds #define TIME_TO_SLEEP 20 // How long ESP32 will be in deep sleep (in seconds) RTC_DATA_ATTR int slide = 0; diff --git a/examples/Inkplate5/Advanced/DeepSleep/Inkplate5_Wake_Up_Button/Inkplate5_Wake_Up_Button.ino b/examples/Inkplate5/Advanced/DeepSleep/Inkplate5_Wake_Up_Button/Inkplate5_Wake_Up_Button.ino index 905b38ad9..b3a01d848 100644 --- a/examples/Inkplate5/Advanced/DeepSleep/Inkplate5_Wake_Up_Button/Inkplate5_Wake_Up_Button.ino +++ b/examples/Inkplate5/Advanced/DeepSleep/Inkplate5_Wake_Up_Button/Inkplate5_Wake_Up_Button.ino @@ -56,7 +56,7 @@ Inkplate display(INKPLATE_1BIT); // Conversion factor for micro seconds to seconds -#define uS_TO_S_FACTOR 1000000 +#define uS_TO_S_FACTOR 1000000ULL // Time ESP32 will go to sleep (in seconds) #define TIME_TO_SLEEP 30 diff --git a/examples/Inkplate5/Advanced/WEB_WiFi/Inkplate5_Show_Pictures_From_Web/Inkplate5_Show_Pictures_From_Web.ino b/examples/Inkplate5/Advanced/WEB_WiFi/Inkplate5_Show_Pictures_From_Web/Inkplate5_Show_Pictures_From_Web.ino index c1f2141ec..6ba5f2e25 100644 --- a/examples/Inkplate5/Advanced/WEB_WiFi/Inkplate5_Show_Pictures_From_Web/Inkplate5_Show_Pictures_From_Web.ino +++ b/examples/Inkplate5/Advanced/WEB_WiFi/Inkplate5_Show_Pictures_From_Web/Inkplate5_Show_Pictures_From_Web.ino @@ -54,8 +54,8 @@ #include "WiFi.h" //Include library for WiFi // Enter your WiFi credentials -const char *ssid = "Soldered Electronics"; -const char *pass = "dasduino"; +const char *ssid = ""; +const char *pass = ""; Inkplate display(INKPLATE_1BIT); // Create an object on Inkplate library and also set library into 1 Bit mode (BW) diff --git a/examples/Inkplate5/Diagnostics/Inkplate5_Factory_Programming_VCOM/test.cpp b/examples/Inkplate5/Diagnostics/Inkplate5_Factory_Programming_VCOM/test.cpp index eea798c83..817ce10b4 100644 --- a/examples/Inkplate5/Diagnostics/Inkplate5_Factory_Programming_VCOM/test.cpp +++ b/examples/Inkplate5/Diagnostics/Inkplate5_Factory_Programming_VCOM/test.cpp @@ -3,8 +3,8 @@ const char sdCardTestStringLength = 100; const char *testString = {"This is some test string..."}; -const char *WSSID = {"Soldered Electronics"}; -const char *WPASS = {"dasduino"}; +const char *WSSID = {""}; +const char *WPASS = {""}; // Change this to your used slave device const uint8_t easyCDeviceAddress = 0x76; diff --git a/examples/Inkplate5/Projects/Inkplate5_Image_Frame_From_Web/Inkplate5_Image_Frame_From_Web.ino b/examples/Inkplate5/Projects/Inkplate5_Image_Frame_From_Web/Inkplate5_Image_Frame_From_Web.ino index f4684ab33..b50cf30eb 100644 --- a/examples/Inkplate5/Projects/Inkplate5_Image_Frame_From_Web/Inkplate5_Image_Frame_From_Web.ino +++ b/examples/Inkplate5/Projects/Inkplate5_Image_Frame_From_Web/Inkplate5_Image_Frame_From_Web.ino @@ -62,8 +62,8 @@ Inkplate display(INKPLATE_3BIT); // ---------------- CHANGE HERE ---------------------: // WiFi credentials -const char *ssid = "Soldered Electronics"; // Your WiFi SSID -const char *pass = "dasduino"; // Your WiFi password +const char *ssid = ""; // Your WiFi SSID +const char *pass = ""; // Your WiFi password // Define delay between 2 images in seconds #define SECS_BETWEEN_IMAGES 30 diff --git a/examples/Inkplate5/Projects/Inkplate5_Quotables/Inkplate5_Quotables.ino b/examples/Inkplate5/Projects/Inkplate5_Quotables/Inkplate5_Quotables.ino index 9cdb550ca..05387f682 100644 --- a/examples/Inkplate5/Projects/Inkplate5_Quotables/Inkplate5_Quotables.ino +++ b/examples/Inkplate5/Projects/Inkplate5_Quotables/Inkplate5_Quotables.ino @@ -73,8 +73,8 @@ //---------- CHANGE HERE -------------: // Put in your ssid and password -char ssid[] = "Soldered Electronics"; -char pass[] = "dasduino"; +char ssid[] = ""; +char pass[] = ""; //---------------------------------- diff --git a/examples/Inkplate5V2/Advanced/DeepSleep/Inkplate5V2_Partial_Update_With_Deep_Sleep/Inkplate5V2_Partial_Update_With_Deep_Sleep.ino b/examples/Inkplate5V2/Advanced/DeepSleep/Inkplate5V2_Partial_Update_With_Deep_Sleep/Inkplate5V2_Partial_Update_With_Deep_Sleep.ino index b5f7d27c4..ab5aec174 100644 --- a/examples/Inkplate5V2/Advanced/DeepSleep/Inkplate5V2_Partial_Update_With_Deep_Sleep/Inkplate5V2_Partial_Update_With_Deep_Sleep.ino +++ b/examples/Inkplate5V2/Advanced/DeepSleep/Inkplate5V2_Partial_Update_With_Deep_Sleep/Inkplate5V2_Partial_Update_With_Deep_Sleep.ino @@ -58,7 +58,7 @@ #include "Inkplate.h" // Include Inkplate library to the sketch #include // Include ESP32 library for RTC (needed for rtc_get_reset_reason() function) -#define uS_TO_S_FACTOR 1000000 // Conversion factor for micro seconds to seconds +#define uS_TO_S_FACTOR 1000000ULL // Conversion factor for micro seconds to seconds #define TIME_TO_SLEEP 10 // Time how long ESP32 will be in deep sleep (in seconds). In this case 10 seconds. Inkplate display(INKPLATE_1BIT); // Create an object on Inkplate library and also set library into 1-bit mode (BW) diff --git a/examples/Inkplate5V2/Advanced/DeepSleep/Inkplate5V2_Simple_Deep_Sleep/Inkplate5V2_Simple_Deep_Sleep.ino b/examples/Inkplate5V2/Advanced/DeepSleep/Inkplate5V2_Simple_Deep_Sleep/Inkplate5V2_Simple_Deep_Sleep.ino index 54294f94d..621449f21 100644 --- a/examples/Inkplate5V2/Advanced/DeepSleep/Inkplate5V2_Simple_Deep_Sleep/Inkplate5V2_Simple_Deep_Sleep.ino +++ b/examples/Inkplate5V2/Advanced/DeepSleep/Inkplate5V2_Simple_Deep_Sleep/Inkplate5V2_Simple_Deep_Sleep.ino @@ -56,7 +56,7 @@ const uint8_t *pictures[] = {pic1}; // This array of pinters holds address of every picture in the memory, // so we can easly select it by selecting index in array -#define uS_TO_S_FACTOR 1000000 // Conversion factor for micro seconds to seconds +#define uS_TO_S_FACTOR 1000000ULL // Conversion factor for micro seconds to seconds #define TIME_TO_SLEEP 20 // How long ESP32 will be in deep sleep (in seconds) RTC_DATA_ATTR int slide = 0; diff --git a/examples/Inkplate5V2/Advanced/DeepSleep/Inkplate5V2_Wake_Up_Button/Inkplate5V2_Wake_Up_Button.ino b/examples/Inkplate5V2/Advanced/DeepSleep/Inkplate5V2_Wake_Up_Button/Inkplate5V2_Wake_Up_Button.ino index 56e91f384..293b254e2 100644 --- a/examples/Inkplate5V2/Advanced/DeepSleep/Inkplate5V2_Wake_Up_Button/Inkplate5V2_Wake_Up_Button.ino +++ b/examples/Inkplate5V2/Advanced/DeepSleep/Inkplate5V2_Wake_Up_Button/Inkplate5V2_Wake_Up_Button.ino @@ -56,7 +56,7 @@ Inkplate display(INKPLATE_1BIT); // Conversion factor for micro seconds to seconds -#define uS_TO_S_FACTOR 1000000 +#define uS_TO_S_FACTOR 1000000ULL // Time ESP32 will go to sleep (in seconds) #define TIME_TO_SLEEP 30 diff --git a/examples/Inkplate5V2/Advanced/WEB_WiFi/Inkplate5V2_HTTPS_POST_Request/Inkplate5V2_HTTPS_POST_Request.ino b/examples/Inkplate5V2/Advanced/WEB_WiFi/Inkplate5V2_HTTPS_POST_Request/Inkplate5V2_HTTPS_POST_Request.ino index 829312d01..701d32686 100644 --- a/examples/Inkplate5V2/Advanced/WEB_WiFi/Inkplate5V2_HTTPS_POST_Request/Inkplate5V2_HTTPS_POST_Request.ino +++ b/examples/Inkplate5V2/Advanced/WEB_WiFi/Inkplate5V2_HTTPS_POST_Request/Inkplate5V2_HTTPS_POST_Request.ino @@ -60,8 +60,8 @@ #include "WiFiClientSecure.h" // Enter your WiFi credentials -const char *ssid = "Soldered Electronics"; -const char *pass = "dasduino"; +const char *ssid = ""; +const char *pass = ""; // Specify the API URL to send a POST request const char *apiUrl = "https://jsonplaceholder.typicode.com/posts"; diff --git a/examples/Inkplate5V2/Advanced/WEB_WiFi/Inkplate5V2_HTTPS_With_Certificate/Inkplate5V2_HTTPS_With_Certificate.ino b/examples/Inkplate5V2/Advanced/WEB_WiFi/Inkplate5V2_HTTPS_With_Certificate/Inkplate5V2_HTTPS_With_Certificate.ino index b7c09188a..54195f54c 100644 --- a/examples/Inkplate5V2/Advanced/WEB_WiFi/Inkplate5V2_HTTPS_With_Certificate/Inkplate5V2_HTTPS_With_Certificate.ino +++ b/examples/Inkplate5V2/Advanced/WEB_WiFi/Inkplate5V2_HTTPS_With_Certificate/Inkplate5V2_HTTPS_With_Certificate.ino @@ -59,8 +59,8 @@ #include "Inkplate.h" //Include Inkplate library to the sketch Inkplate display(INKPLATE_1BIT); // Create an object on Inkplate library and also set library into 1 Bit mode (BW) -const char ssid[] = "Soldered Electronics"; // Your WiFi SSID -const char *password = "dasduino"; // Your WiFi password +const char ssid[] = ""; // Your WiFi SSID +const char *password = ""; // Your WiFi password //This is the certificate for the website https://varipass.org diff --git a/examples/Inkplate5V2/Advanced/WEB_WiFi/Inkplate5V2_HTTP_POST_Request/Inkplate5V2_HTTP_POST_Request.ino b/examples/Inkplate5V2/Advanced/WEB_WiFi/Inkplate5V2_HTTP_POST_Request/Inkplate5V2_HTTP_POST_Request.ino index ead0ee9f7..65321e551 100644 --- a/examples/Inkplate5V2/Advanced/WEB_WiFi/Inkplate5V2_HTTP_POST_Request/Inkplate5V2_HTTP_POST_Request.ino +++ b/examples/Inkplate5V2/Advanced/WEB_WiFi/Inkplate5V2_HTTP_POST_Request/Inkplate5V2_HTTP_POST_Request.ino @@ -65,12 +65,12 @@ WiFiClient client; #define POSTING_INTERVAL_IN_SECS 20 // WiFi credentials -const char *ssid = "Stefan"; -const char *pass = "granatir"; +const char *ssid = "your ssid"; +const char *pass = "your password"; // Webhook.site settings const char *server = "webhook.site"; -const char *WEBHOOK_PATH = "http://webhook.site/79927188-abca-4497-b2eb-185155bf8f44"; // e.g. "/abcd-1234-efgh" +const char *WEBHOOK_PATH = "your webhook api"; // e.g. "/abcd-1234-efgh" // Last connection time unsigned long lastConnectionTime = 0; diff --git a/examples/Inkplate5V2/Advanced/WEB_WiFi/Inkplate5V2_Show_Pictures_From_Web/Inkplate5V2_Show_Pictures_From_Web.ino b/examples/Inkplate5V2/Advanced/WEB_WiFi/Inkplate5V2_Show_Pictures_From_Web/Inkplate5V2_Show_Pictures_From_Web.ino index 014f6bcc6..e903bdc51 100644 --- a/examples/Inkplate5V2/Advanced/WEB_WiFi/Inkplate5V2_Show_Pictures_From_Web/Inkplate5V2_Show_Pictures_From_Web.ino +++ b/examples/Inkplate5V2/Advanced/WEB_WiFi/Inkplate5V2_Show_Pictures_From_Web/Inkplate5V2_Show_Pictures_From_Web.ino @@ -53,8 +53,8 @@ #include "WiFi.h" //Include library for WiFi // Enter your WiFi credentials -const char *ssid = "Soldered Electronics"; -const char *pass = "dasduino"; +const char *ssid = ""; +const char *pass = ""; Inkplate display(INKPLATE_1BIT); // Create an object on Inkplate library and also set library into 1 Bit mode (BW) diff --git a/examples/Inkplate5V2/Diagnostics/Inkplate5V2_Factory_Programming_VCOM/test.cpp b/examples/Inkplate5V2/Diagnostics/Inkplate5V2_Factory_Programming_VCOM/test.cpp index eea798c83..817ce10b4 100644 --- a/examples/Inkplate5V2/Diagnostics/Inkplate5V2_Factory_Programming_VCOM/test.cpp +++ b/examples/Inkplate5V2/Diagnostics/Inkplate5V2_Factory_Programming_VCOM/test.cpp @@ -3,8 +3,8 @@ const char sdCardTestStringLength = 100; const char *testString = {"This is some test string..."}; -const char *WSSID = {"Soldered Electronics"}; -const char *WPASS = {"dasduino"}; +const char *WSSID = {""}; +const char *WPASS = {""}; // Change this to your used slave device const uint8_t easyCDeviceAddress = 0x76; diff --git a/examples/Inkplate5V2/Projects/Inkplate5V2_Google_Calendar/Inkplate5V2_Google_Calendar.ino b/examples/Inkplate5V2/Projects/Inkplate5V2_Google_Calendar/Inkplate5V2_Google_Calendar.ino index 6ee5f1a19..db59de9b8 100644 --- a/examples/Inkplate5V2/Projects/Inkplate5V2_Google_Calendar/Inkplate5V2_Google_Calendar.ino +++ b/examples/Inkplate5V2/Projects/Inkplate5V2_Google_Calendar/Inkplate5V2_Google_Calendar.ino @@ -84,7 +84,7 @@ NetworkFunctions network(calendarID, apiKey); Gui gui(inkplate); // --- Deep Sleep Configuration --- -#define uS_TO_S_FACTOR 1000000 // Convert microseconds to seconds +#define uS_TO_S_FACTOR 1000000ULL // Convert microseconds to seconds #define TIME_TO_SLEEP 600 // Sleep time: 600 seconds = 10 minutes void setup() diff --git a/examples/Inkplate5V2/Projects/Inkplate5V2_Image_Frame_From_Web/Inkplate5V2_Image_Frame_From_Web.ino b/examples/Inkplate5V2/Projects/Inkplate5V2_Image_Frame_From_Web/Inkplate5V2_Image_Frame_From_Web.ino index 2711f026c..cb929ef64 100644 --- a/examples/Inkplate5V2/Projects/Inkplate5V2_Image_Frame_From_Web/Inkplate5V2_Image_Frame_From_Web.ino +++ b/examples/Inkplate5V2/Projects/Inkplate5V2_Image_Frame_From_Web/Inkplate5V2_Image_Frame_From_Web.ino @@ -59,8 +59,8 @@ Inkplate display(INKPLATE_3BIT); -const char ssid[] = "Stefan"; // Your WiFi SSID -const char *password = "granatir"; // Your WiFi password +const char ssid[] = "your ssid"; // Your WiFi SSID +const char *password = "your password"; // Your WiFi password void setup() { diff --git a/examples/Inkplate5V2/Projects/Inkplate5V2_OpenAI_Image_Slideshow/Inkplate5V2_OpenAI_Image_Slideshow.ino b/examples/Inkplate5V2/Projects/Inkplate5V2_OpenAI_Image_Slideshow/Inkplate5V2_OpenAI_Image_Slideshow.ino index ec382d455..b392489c3 100644 --- a/examples/Inkplate5V2/Projects/Inkplate5V2_OpenAI_Image_Slideshow/Inkplate5V2_OpenAI_Image_Slideshow.ino +++ b/examples/Inkplate5V2/Projects/Inkplate5V2_OpenAI_Image_Slideshow/Inkplate5V2_OpenAI_Image_Slideshow.ino @@ -86,8 +86,8 @@ Image::Format imageFormat = Image::PNG; // WiFi credentials (replace with your own SSID and password) -const char* ssid = "Stefan"; -const char* password = "granatir"; +const char* ssid = "your ssid"; +const char* password = "your password"; // OpenAI API key (replace with your OpenAI API key) const char* openai_key = ""; diff --git a/examples/Inkplate5V2/Projects/Inkplate5V2_OpenAI_Text_Prompt/Inkplate5V2_OpenAI_Text_Prompt.ino b/examples/Inkplate5V2/Projects/Inkplate5V2_OpenAI_Text_Prompt/Inkplate5V2_OpenAI_Text_Prompt.ino index 696612cc9..a29c537c6 100644 --- a/examples/Inkplate5V2/Projects/Inkplate5V2_OpenAI_Text_Prompt/Inkplate5V2_OpenAI_Text_Prompt.ino +++ b/examples/Inkplate5V2/Projects/Inkplate5V2_OpenAI_Text_Prompt/Inkplate5V2_OpenAI_Text_Prompt.ino @@ -84,8 +84,8 @@ #define SLEEP_DURATION_IN_MINS 30*60 // WiFi credentials -const char* ssid = "Stefan"; -const char* password = "granatir"; +const char* ssid = "your ssid"; +const char* password = "your password"; // OpenAI API key const char* openai_key = ""; diff --git a/examples/Inkplate5V2/Projects/Inkplate5V2_OpenMeteo_Weather_Station/Inkplate5V2_OpenMeteo_Weather_Station.ino b/examples/Inkplate5V2/Projects/Inkplate5V2_OpenMeteo_Weather_Station/Inkplate5V2_OpenMeteo_Weather_Station.ino index dfa517d3c..4de7d8a69 100644 --- a/examples/Inkplate5V2/Projects/Inkplate5V2_OpenMeteo_Weather_Station/Inkplate5V2_OpenMeteo_Weather_Station.ino +++ b/examples/Inkplate5V2/Projects/Inkplate5V2_OpenMeteo_Weather_Station/Inkplate5V2_OpenMeteo_Weather_Station.ino @@ -81,8 +81,8 @@ #include "src/includes.h" // Include necessary libraries and dependencies for Inkplate and networking // --- WiFi Configuration --- -const char *ssid = "Stefan"; -const char *password = "granatir"; +const char *ssid = "your ssid"; +const char *password = "your password"; // --- User and Location Info --- String myUsername = "Username"; // User's name to be displayed on screen @@ -104,7 +104,7 @@ WeatherData weatherData; // Structure to hold fetched weather data Gui gui(inkplate); // Drawing visuals and info // --- Deep Sleep Configuration --- -#define uS_TO_S_FACTOR 1000000 // Convert microseconds to seconds +#define uS_TO_S_FACTOR 1000000ULL // Convert microseconds to seconds #define TIME_TO_SLEEP 1800 // Sleep time: 1800 seconds = 30 minutes // --- Main Setup: Runs Once on Boot --- diff --git a/examples/Inkplate5V2/Projects/Inkplate5V2_Quotables/Inkplate5V2_Quotables.ino b/examples/Inkplate5V2/Projects/Inkplate5V2_Quotables/Inkplate5V2_Quotables.ino index b79a99de0..88dc95c13 100644 --- a/examples/Inkplate5V2/Projects/Inkplate5V2_Quotables/Inkplate5V2_Quotables.ino +++ b/examples/Inkplate5V2/Projects/Inkplate5V2_Quotables/Inkplate5V2_Quotables.ino @@ -73,8 +73,8 @@ //---------- CHANGE HERE -------------: // Put in your ssid and password -char ssid[] = "Stefan"; -char pass[] = "granatir"; +char ssid[] = "your ssid"; +char pass[] = "your password"; //---------------------------------- diff --git a/examples/Inkplate6/Advanced/DeepSleep/Inkplate6_Partial_Update_With_Deep_Sleep/Inkplate6_Partial_Update_With_Deep_Sleep.ino b/examples/Inkplate6/Advanced/DeepSleep/Inkplate6_Partial_Update_With_Deep_Sleep/Inkplate6_Partial_Update_With_Deep_Sleep.ino index 75a012a1c..ed2870818 100644 --- a/examples/Inkplate6/Advanced/DeepSleep/Inkplate6_Partial_Update_With_Deep_Sleep/Inkplate6_Partial_Update_With_Deep_Sleep.ino +++ b/examples/Inkplate6/Advanced/DeepSleep/Inkplate6_Partial_Update_With_Deep_Sleep/Inkplate6_Partial_Update_With_Deep_Sleep.ino @@ -58,7 +58,7 @@ #include "driver/rtc_io.h" // Include ESP32 library for RTC pin I/O (needed for rtc_gpio_isolate() function) #include // Include ESP32 library for RTC (needed for rtc_get_reset_reason() function) -#define uS_TO_S_FACTOR 1000000 // Conversion factor for micro seconds to seconds +#define uS_TO_S_FACTOR 1000000ULL // Conversion factor for micro seconds to seconds #define TIME_TO_SLEEP 10 // Time how long ESP32 will be in deep sleep (in seconds). In this case 10 seconds. Inkplate display(INKPLATE_1BIT); // Create an object on Inkplate library and also set library into 1-bit mode (BW) diff --git a/examples/Inkplate6/Advanced/DeepSleep/Inkplate6_Simple_Deep_Sleep/Inkplate6_Simple_Deep_Sleep.ino b/examples/Inkplate6/Advanced/DeepSleep/Inkplate6_Simple_Deep_Sleep/Inkplate6_Simple_Deep_Sleep.ino index 87b5079e4..66e043336 100644 --- a/examples/Inkplate6/Advanced/DeepSleep/Inkplate6_Simple_Deep_Sleep/Inkplate6_Simple_Deep_Sleep.ino +++ b/examples/Inkplate6/Advanced/DeepSleep/Inkplate6_Simple_Deep_Sleep/Inkplate6_Simple_Deep_Sleep.ino @@ -58,7 +58,7 @@ const uint8_t *pictures[] = {pic1, pic2, pic3}; // This array of pinters holds address of every picture in the memory, // so we can easly select it by selecting index in array -#define uS_TO_S_FACTOR 1000000 // Conversion factor for micro seconds to seconds +#define uS_TO_S_FACTOR 1000000ULL // Conversion factor for micro seconds to seconds #define TIME_TO_SLEEP 20 // How long ESP32 will be in deep sleep (in seconds) RTC_DATA_ATTR int slide = 0; diff --git a/examples/Inkplate6/Advanced/DeepSleep/Inkplate6_Wake_Up_Button/Inkplate6_Wake_Up_Button.ino b/examples/Inkplate6/Advanced/DeepSleep/Inkplate6_Wake_Up_Button/Inkplate6_Wake_Up_Button.ino index daa3be36e..5c986f6a9 100644 --- a/examples/Inkplate6/Advanced/DeepSleep/Inkplate6_Wake_Up_Button/Inkplate6_Wake_Up_Button.ino +++ b/examples/Inkplate6/Advanced/DeepSleep/Inkplate6_Wake_Up_Button/Inkplate6_Wake_Up_Button.ino @@ -53,7 +53,7 @@ #include // Conversion factor for micro seconds to seconds -#define uS_TO_S_FACTOR 1000000 +#define uS_TO_S_FACTOR 1000000ULL // Time ESP32 will go to sleep (in seconds) #define TIME_TO_SLEEP 30 diff --git a/examples/Inkplate6/Diagnostics/Inkplate6_Factory_Programming_VCOM/test.cpp b/examples/Inkplate6/Diagnostics/Inkplate6_Factory_Programming_VCOM/test.cpp index c95c25a30..1fa28df8e 100644 --- a/examples/Inkplate6/Diagnostics/Inkplate6_Factory_Programming_VCOM/test.cpp +++ b/examples/Inkplate6/Diagnostics/Inkplate6_Factory_Programming_VCOM/test.cpp @@ -3,8 +3,8 @@ const char sdCardTestStringLength = 100; const char *testString = {"This is some test string..."}; -const char *WSSID = {"Soldered Electronics"}; -const char *WPASS = {"dasduino"}; +const char *WSSID = {""}; +const char *WPASS = {""}; // Change this to your used slave device const uint8_t easyCDeviceAddress = 0x76; diff --git a/examples/Inkplate6/Projects/Inkplate6_Google_Calendar/Inkplate6_Google_Calendar.ino b/examples/Inkplate6/Projects/Inkplate6_Google_Calendar/Inkplate6_Google_Calendar.ino index 4a934b64b..dc401ece3 100644 --- a/examples/Inkplate6/Projects/Inkplate6_Google_Calendar/Inkplate6_Google_Calendar.ino +++ b/examples/Inkplate6/Projects/Inkplate6_Google_Calendar/Inkplate6_Google_Calendar.ino @@ -83,7 +83,7 @@ NetworkFunctions network(calendarID, apiKey); Gui gui(inkplate); // --- Deep Sleep Configuration --- -#define uS_TO_S_FACTOR 1000000 // Convert microseconds to seconds +#define uS_TO_S_FACTOR 1000000ULL // Convert microseconds to seconds #define TIME_TO_SLEEP 600 // Sleep time: 600 seconds = 10 minutes void setup() diff --git a/examples/Inkplate6/Projects/Inkplate6_Image_Frame_From_Web/Inkplate6_Image_Frame_From_Web.ino b/examples/Inkplate6/Projects/Inkplate6_Image_Frame_From_Web/Inkplate6_Image_Frame_From_Web.ino index 43eb032c6..aa1651b6e 100644 --- a/examples/Inkplate6/Projects/Inkplate6_Image_Frame_From_Web/Inkplate6_Image_Frame_From_Web.ino +++ b/examples/Inkplate6/Projects/Inkplate6_Image_Frame_From_Web/Inkplate6_Image_Frame_From_Web.ino @@ -61,8 +61,8 @@ Inkplate display(INKPLATE_3BIT); -const char ssid[] = "Soldered Electronics"; // Your WiFi SSID -const char *password = "dasduino"; // Your WiFi password +const char ssid[] = ""; // Your WiFi SSID +const char *password = ""; // Your WiFi password void setup() { diff --git a/examples/Inkplate6/Projects/Inkplate6_OpenMeteo_Weather_Station/Inkplate6_OpenMeteo_Weather_Station.ino b/examples/Inkplate6/Projects/Inkplate6_OpenMeteo_Weather_Station/Inkplate6_OpenMeteo_Weather_Station.ino index 87b281f6c..bba767c1d 100644 --- a/examples/Inkplate6/Projects/Inkplate6_OpenMeteo_Weather_Station/Inkplate6_OpenMeteo_Weather_Station.ino +++ b/examples/Inkplate6/Projects/Inkplate6_OpenMeteo_Weather_Station/Inkplate6_OpenMeteo_Weather_Station.ino @@ -104,7 +104,7 @@ WeatherData weatherData; // Structure to hold fetched weather data Gui gui(inkplate); // Drawing visuals and info // --- Deep Sleep Configuration --- -#define uS_TO_S_FACTOR 1000000 // Convert microseconds to seconds +#define uS_TO_S_FACTOR 1000000ULL // Convert microseconds to seconds #define TIME_TO_SLEEP 1800 // Sleep time: 1800 seconds = 30 minutes // --- Main Setup: Runs Once on Boot --- diff --git a/examples/Inkplate6/Projects/Inkplate6_Quotables/Inkplate6_Quotables.ino b/examples/Inkplate6/Projects/Inkplate6_Quotables/Inkplate6_Quotables.ino index 22ec1881c..89159a7fb 100644 --- a/examples/Inkplate6/Projects/Inkplate6_Quotables/Inkplate6_Quotables.ino +++ b/examples/Inkplate6/Projects/Inkplate6_Quotables/Inkplate6_Quotables.ino @@ -73,8 +73,8 @@ //---------- CHANGE HERE -------------: // Put in your ssid and password -char ssid[] = "Soldered Electronics"; -char pass[] = "dasduino"; +char ssid[] = ""; +char pass[] = ""; //---------------------------------- diff --git a/examples/Inkplate6COLOR/Advanced/DeepSleep/Inkplate6COLOR_Simple_Deep_Sleep/Inkplate6COLOR_Simple_Deep_Sleep.ino b/examples/Inkplate6COLOR/Advanced/DeepSleep/Inkplate6COLOR_Simple_Deep_Sleep/Inkplate6COLOR_Simple_Deep_Sleep.ino index f059a65e2..301c4167e 100644 --- a/examples/Inkplate6COLOR/Advanced/DeepSleep/Inkplate6COLOR_Simple_Deep_Sleep/Inkplate6COLOR_Simple_Deep_Sleep.ino +++ b/examples/Inkplate6COLOR/Advanced/DeepSleep/Inkplate6COLOR_Simple_Deep_Sleep/Inkplate6COLOR_Simple_Deep_Sleep.ino @@ -88,7 +88,7 @@ const uint8_t *pictures[] = {picture1, picture2, picture3}; // This array of pinters holds address of every picture in the memory, // so we can easly select it by selecting index in array -#define uS_TO_S_FACTOR 1000000 // Conversion factor for micro seconds to seconds +#define uS_TO_S_FACTOR 1000000ULL // Conversion factor for micro seconds to seconds #define TIME_TO_SLEEP 30 // How long ESP32 will be in deep sleep (in seconds) RTC_DATA_ATTR int slide = 0; diff --git a/examples/Inkplate6COLOR/Advanced/DeepSleep/Inkplate6COLOR_Wake_Up_Button/Inkplate6COLOR_Wake_Up_Button.ino b/examples/Inkplate6COLOR/Advanced/DeepSleep/Inkplate6COLOR_Wake_Up_Button/Inkplate6COLOR_Wake_Up_Button.ino index ce7651a9a..93c6a1d5a 100644 --- a/examples/Inkplate6COLOR/Advanced/DeepSleep/Inkplate6COLOR_Wake_Up_Button/Inkplate6COLOR_Wake_Up_Button.ino +++ b/examples/Inkplate6COLOR/Advanced/DeepSleep/Inkplate6COLOR_Wake_Up_Button/Inkplate6COLOR_Wake_Up_Button.ino @@ -78,7 +78,7 @@ #include // Conversion factor for micro seconds to seconds -#define uS_TO_S_FACTOR 1000000 +#define uS_TO_S_FACTOR 1000000ULL // Time ESP32 will go to sleep (in seconds) #define TIME_TO_SLEEP 30 diff --git a/examples/Inkplate6COLOR/Advanced/WEB_WiFi/Inkplate6COLOR_HTTPS_POST_Request/Inkplate6COLOR_HTTPS_POST_Request.ino b/examples/Inkplate6COLOR/Advanced/WEB_WiFi/Inkplate6COLOR_HTTPS_POST_Request/Inkplate6COLOR_HTTPS_POST_Request.ino index 086124be8..61fa3bcd7 100644 --- a/examples/Inkplate6COLOR/Advanced/WEB_WiFi/Inkplate6COLOR_HTTPS_POST_Request/Inkplate6COLOR_HTTPS_POST_Request.ino +++ b/examples/Inkplate6COLOR/Advanced/WEB_WiFi/Inkplate6COLOR_HTTPS_POST_Request/Inkplate6COLOR_HTTPS_POST_Request.ino @@ -84,8 +84,8 @@ #include // Enter your WiFi credentials -const char *ssid = "Soldered Electronics"; -const char *pass = "dasduino"; +const char *ssid = ""; +const char *pass = ""; // Specify the API URL to send a POST request const char *apiUrl = "https://jsonplaceholder.typicode.com/posts"; diff --git a/examples/Inkplate6COLOR/Advanced/WEB_WiFi/Inkplate6COLOR_HTTPS_With_Certificate/Inkplate6COLOR_HTTPS_With_Certificate.ino b/examples/Inkplate6COLOR/Advanced/WEB_WiFi/Inkplate6COLOR_HTTPS_With_Certificate/Inkplate6COLOR_HTTPS_With_Certificate.ino index f3fb7fbf6..5540a914b 100644 --- a/examples/Inkplate6COLOR/Advanced/WEB_WiFi/Inkplate6COLOR_HTTPS_With_Certificate/Inkplate6COLOR_HTTPS_With_Certificate.ino +++ b/examples/Inkplate6COLOR/Advanced/WEB_WiFi/Inkplate6COLOR_HTTPS_With_Certificate/Inkplate6COLOR_HTTPS_With_Certificate.ino @@ -83,8 +83,8 @@ #include "Inkplate.h" //Include Inkplate library to the sketch Inkplate display; -const char ssid[] = "Soldered Electronics"; // Your WiFi SSID -const char *password = "dasduino"; // Your WiFi password +const char ssid[] = ""; // Your WiFi SSID +const char *password = ""; // Your WiFi password //This is the certificate for the website https://varipass.org diff --git a/examples/Inkplate6COLOR/Advanced/WEB_WiFi/Inkplate6COLOR_HTTP_POST_Request/Inkplate6COLOR_HTTP_POST_Request.ino b/examples/Inkplate6COLOR/Advanced/WEB_WiFi/Inkplate6COLOR_HTTP_POST_Request/Inkplate6COLOR_HTTP_POST_Request.ino index fb18342fc..7bfaaf560 100644 --- a/examples/Inkplate6COLOR/Advanced/WEB_WiFi/Inkplate6COLOR_HTTP_POST_Request/Inkplate6COLOR_HTTP_POST_Request.ino +++ b/examples/Inkplate6COLOR/Advanced/WEB_WiFi/Inkplate6COLOR_HTTP_POST_Request/Inkplate6COLOR_HTTP_POST_Request.ino @@ -65,8 +65,8 @@ WiFiClient client; #define POSTING_INTERVAL_IN_SECS 20 // WiFi credentials -const char *ssid = "Soldered Electronics"; -const char *pass = "dasduino"; +const char *ssid = ""; +const char *pass = ""; // Webhook.site settings const char *server = "webhook.site"; diff --git a/examples/Inkplate6COLOR/Advanced/WEB_WiFi/Inkplate6COLOR_HTTP_Request/Inkplate6COLOR_HTTP_Request.ino b/examples/Inkplate6COLOR/Advanced/WEB_WiFi/Inkplate6COLOR_HTTP_Request/Inkplate6COLOR_HTTP_Request.ino index 21992caae..2db7de103 100644 --- a/examples/Inkplate6COLOR/Advanced/WEB_WiFi/Inkplate6COLOR_HTTP_Request/Inkplate6COLOR_HTTP_Request.ino +++ b/examples/Inkplate6COLOR/Advanced/WEB_WiFi/Inkplate6COLOR_HTTP_Request/Inkplate6COLOR_HTTP_Request.ino @@ -75,8 +75,8 @@ #include //Include HTTP library to this sketch #include //Include ESP32 WiFi library to our sketch -#define ssid "Soldered Electronics" // Name of the WiFi network (SSID) that you want to connect Inkplate to -#define pass "dasduino" // Password of that WiFi network +#define ssid "" // Name of the WiFi network (SSID) that you want to connect Inkplate to +#define pass "" // Password of that WiFi network Inkplate display; // Create an object on Inkplate library and also set library into 1 Bit mode (BW) diff --git a/examples/Inkplate6COLOR/Diagnostics/Inkplate6COLOR_Factory_Programming/test.cpp b/examples/Inkplate6COLOR/Diagnostics/Inkplate6COLOR_Factory_Programming/test.cpp index 0b3795547..078d62cf8 100644 --- a/examples/Inkplate6COLOR/Diagnostics/Inkplate6COLOR_Factory_Programming/test.cpp +++ b/examples/Inkplate6COLOR/Diagnostics/Inkplate6COLOR_Factory_Programming/test.cpp @@ -3,8 +3,8 @@ const char sdCardTestStringLength = 100; const char *testString = {"This is some test string..."}; -const char *WSSID = {"Soldered Electronics"}; -const char *WPASS = {"dasduino"}; +const char *WSSID = {""}; +const char *WPASS = {""}; // Change this to your used slave device const uint8_t easyCDeviceAddress = 0x70; diff --git a/examples/Inkplate6COLOR/Projects/Inkplate6COLOR_Google_Calendar/Inkplate6COLOR_Google_Calendar.ino b/examples/Inkplate6COLOR/Projects/Inkplate6COLOR_Google_Calendar/Inkplate6COLOR_Google_Calendar.ino index f7eb41056..04c38e838 100644 --- a/examples/Inkplate6COLOR/Projects/Inkplate6COLOR_Google_Calendar/Inkplate6COLOR_Google_Calendar.ino +++ b/examples/Inkplate6COLOR/Projects/Inkplate6COLOR_Google_Calendar/Inkplate6COLOR_Google_Calendar.ino @@ -116,7 +116,7 @@ NetworkFunctions network(calendarID, apiKey); Gui gui(inkplate); // --- Deep Sleep Configuration --- -#define uS_TO_S_FACTOR 1000000 // Convert microseconds to seconds +#define uS_TO_S_FACTOR 1000000ULL // Convert microseconds to seconds #define TIME_TO_SLEEP 600 // Sleep time: 600 seconds = 10 minutes void setup() diff --git a/examples/Inkplate6COLOR/Projects/Inkplate6COLOR_News/Inkplate6COLOR_News.ino b/examples/Inkplate6COLOR/Projects/Inkplate6COLOR_News/Inkplate6COLOR_News.ino index fe9e21068..1805294a7 100644 --- a/examples/Inkplate6COLOR/Projects/Inkplate6COLOR_News/Inkplate6COLOR_News.ino +++ b/examples/Inkplate6COLOR/Projects/Inkplate6COLOR_News/Inkplate6COLOR_News.ino @@ -80,8 +80,8 @@ int timeZone = 2; // WiFi credentials (replace with your WiFi network details) -char ssid[] = "Soldered Electronics"; // Replace with your WiFi SSID -char pass[] = "dasduino"; // Replace with your WiFi password +char ssid[] = ""; // Replace with your WiFi SSID +char pass[] = ""; // Replace with your WiFi password // News API key (get one from https://newsapi.org/) char api_key_news[] = "0764e21041bc424c90071880e5f0607f"; // Replace with your News API key diff --git a/examples/Inkplate6COLOR/Projects/Inkplate6COLOR_OpenMeteo_Weather_Station/Inkplate6COLOR_OpenMeteo_Weather_Station.ino b/examples/Inkplate6COLOR/Projects/Inkplate6COLOR_OpenMeteo_Weather_Station/Inkplate6COLOR_OpenMeteo_Weather_Station.ino index 8f01a999e..ad9d48ff2 100644 --- a/examples/Inkplate6COLOR/Projects/Inkplate6COLOR_OpenMeteo_Weather_Station/Inkplate6COLOR_OpenMeteo_Weather_Station.ino +++ b/examples/Inkplate6COLOR/Projects/Inkplate6COLOR_OpenMeteo_Weather_Station/Inkplate6COLOR_OpenMeteo_Weather_Station.ino @@ -104,7 +104,7 @@ WeatherData weatherData; // Structure to hold fetched weather data Gui gui(inkplate); // Drawing visuals and info // --- Deep Sleep Configuration --- -#define uS_TO_S_FACTOR 1000000 // Convert microseconds to seconds +#define uS_TO_S_FACTOR 1000000ULL // Convert microseconds to seconds #define TIME_TO_SLEEP 1800 // Sleep time: 1800 seconds = 30 minutes // --- Main Setup: Runs Once on Boot --- diff --git a/examples/Inkplate6COLOR/Projects/Inkplate6COLOR_Spotify_Dashboard/Inkplate6COLOR_Spotify_Dashboard.ino b/examples/Inkplate6COLOR/Projects/Inkplate6COLOR_Spotify_Dashboard/Inkplate6COLOR_Spotify_Dashboard.ino index 9a84b4510..38295f1eb 100644 --- a/examples/Inkplate6COLOR/Projects/Inkplate6COLOR_Spotify_Dashboard/Inkplate6COLOR_Spotify_Dashboard.ino +++ b/examples/Inkplate6COLOR/Projects/Inkplate6COLOR_Spotify_Dashboard/Inkplate6COLOR_Spotify_Dashboard.ino @@ -77,8 +77,8 @@ // CREDENTIALS / SECRETS -static const char* WIFI_SSID = "Soldered Electronics"; -static const char* WIFI_PASSWORD = "dasduino"; +static const char* WIFI_SSID = ""; +static const char* WIFI_PASSWORD = ""; static const char* SPOTIFY_CLIENT_ID = "your_spotify_client_id"; static const char* SPOTIFY_CLIENT_SECRET = "your_spotify_client_secret"; diff --git a/examples/Inkplate6FLICK/Advanced/DeepSleep/Inkplate6FLICK_Partial_Update_With_Deep_Sleep/Inkplate6FLICK_Partial_Update_With_Deep_Sleep.ino b/examples/Inkplate6FLICK/Advanced/DeepSleep/Inkplate6FLICK_Partial_Update_With_Deep_Sleep/Inkplate6FLICK_Partial_Update_With_Deep_Sleep.ino index 5894f3487..f62a599a7 100644 --- a/examples/Inkplate6FLICK/Advanced/DeepSleep/Inkplate6FLICK_Partial_Update_With_Deep_Sleep/Inkplate6FLICK_Partial_Update_With_Deep_Sleep.ino +++ b/examples/Inkplate6FLICK/Advanced/DeepSleep/Inkplate6FLICK_Partial_Update_With_Deep_Sleep/Inkplate6FLICK_Partial_Update_With_Deep_Sleep.ino @@ -54,7 +54,7 @@ #include "driver/rtc_io.h" // Include ESP32 library for RTC pin I/O (needed for rtc_gpio_isolate() function) #include // Include ESP32 library for RTC (needed for rtc_get_reset_reason() function) -#define uS_TO_S_FACTOR 1000000 // Conversion factor for micro seconds to seconds +#define uS_TO_S_FACTOR 1000000ULL // Conversion factor for micro seconds to seconds #define TIME_TO_SLEEP 10 // Time how long ESP32 will be in deep sleep (in seconds). In this case 10 seconds. Inkplate display(INKPLATE_1BIT); // Create an object on Inkplate library and also set library into 1-bit mode (BW) diff --git a/examples/Inkplate6FLICK/Advanced/DeepSleep/Inkplate6FLICK_Simple_Deep_Sleep/Inkplate6FLICK_Simple_Deep_Sleep.ino b/examples/Inkplate6FLICK/Advanced/DeepSleep/Inkplate6FLICK_Simple_Deep_Sleep/Inkplate6FLICK_Simple_Deep_Sleep.ino index 8d76102a5..d0b2bd0eb 100644 --- a/examples/Inkplate6FLICK/Advanced/DeepSleep/Inkplate6FLICK_Simple_Deep_Sleep/Inkplate6FLICK_Simple_Deep_Sleep.ino +++ b/examples/Inkplate6FLICK/Advanced/DeepSleep/Inkplate6FLICK_Simple_Deep_Sleep/Inkplate6FLICK_Simple_Deep_Sleep.ino @@ -55,7 +55,7 @@ const uint8_t *pictures[] = {picture1, picture2, picture3}; // This array of pinters holds address of every picture in the memory, // so we can easly select it by selecting index in array -#define uS_TO_S_FACTOR 1000000 // Conversion factor for micro seconds to seconds +#define uS_TO_S_FACTOR 1000000ULL // Conversion factor for micro seconds to seconds #define TIME_TO_SLEEP 20 // How long ESP32 will be in deep sleep (in seconds) RTC_DATA_ATTR int slide = 0; diff --git a/examples/Inkplate6FLICK/Advanced/DeepSleep/Inkplate6FLICK_Wake_Up_Button/Inkplate6FLICK_Wake_Up_Button.ino b/examples/Inkplate6FLICK/Advanced/DeepSleep/Inkplate6FLICK_Wake_Up_Button/Inkplate6FLICK_Wake_Up_Button.ino index 5d2096832..4def5e336 100644 --- a/examples/Inkplate6FLICK/Advanced/DeepSleep/Inkplate6FLICK_Wake_Up_Button/Inkplate6FLICK_Wake_Up_Button.ino +++ b/examples/Inkplate6FLICK/Advanced/DeepSleep/Inkplate6FLICK_Wake_Up_Button/Inkplate6FLICK_Wake_Up_Button.ino @@ -50,7 +50,7 @@ #include // Conversion factor for micro seconds to seconds -#define uS_TO_S_FACTOR 1000000 +#define uS_TO_S_FACTOR 1000000ULL // Time ESP32 will go to sleep (in seconds) #define TIME_TO_SLEEP 30 diff --git a/examples/Inkplate6FLICK/Basic/Inkplate6FLICK_Simple_Frontlight/Inkplate6FLICK_Simple_Frontlight.ino b/examples/Inkplate6FLICK/Basic/Inkplate6FLICK_Simple_Frontlight/Inkplate6FLICK_Simple_Frontlight.ino index a2d9c882e..d5a7e0eb1 100644 --- a/examples/Inkplate6FLICK/Basic/Inkplate6FLICK_Simple_Frontlight/Inkplate6FLICK_Simple_Frontlight.ino +++ b/examples/Inkplate6FLICK/Basic/Inkplate6FLICK_Simple_Frontlight/Inkplate6FLICK_Simple_Frontlight.ino @@ -60,7 +60,7 @@ void setup() Serial.begin(115200); // Set up a serial communication of 115200 baud display.begin(); // Init Inkplate library display.frontlight.setState(true); // Enable frontlight circuit - display.frontlight.setState(b); // Set frontlight intensity + display.frontlight.setBrightness(b); // Set frontlight intensity } void loop() @@ -89,13 +89,13 @@ void loop() { for (int i = 0; i < 64; ++i) { - display.frontlight.setState(i); + display.frontlight.setBrightness(i); delay(30); } for (int i = 63; i >= 0; --i) { - display.frontlight.setState(i); + display.frontlight.setBrightness(i); delay(30); } } @@ -105,7 +105,7 @@ void loop() if (change) // If frontlight valuse has changed, update the intensity and show current value of frontlight { - display.frontlight.setState(b); + display.frontlight.setBrightness(b); Serial.print("Frontlight:"); Serial.print(b, DEC); Serial.println("/63"); diff --git a/examples/Inkplate6FLICK/Diagnostics/Inkplate6FLICK_Factory_Programming_VCOM/test.cpp b/examples/Inkplate6FLICK/Diagnostics/Inkplate6FLICK_Factory_Programming_VCOM/test.cpp index a3effda1c..e813084d9 100644 --- a/examples/Inkplate6FLICK/Diagnostics/Inkplate6FLICK_Factory_Programming_VCOM/test.cpp +++ b/examples/Inkplate6FLICK/Diagnostics/Inkplate6FLICK_Factory_Programming_VCOM/test.cpp @@ -3,8 +3,8 @@ const char sdCardTestStringLength = 100; const char *testString = {"This is some test string..."}; -const char *WSSID = {"Soldered Electronics"}; -const char *WPASS = {"dasduino"}; +const char *WSSID = {""}; +const char *WPASS = {""}; // Change this to your used slave device const uint8_t easyCDeviceAddress = 0x76; diff --git a/examples/Inkplate6FLICK/Projects/Inkplate6FLICK_Google_Calendar/Inkplate6FLICK_Google_Calendar.ino b/examples/Inkplate6FLICK/Projects/Inkplate6FLICK_Google_Calendar/Inkplate6FLICK_Google_Calendar.ino index 198703b6a..4636cafc3 100644 --- a/examples/Inkplate6FLICK/Projects/Inkplate6FLICK_Google_Calendar/Inkplate6FLICK_Google_Calendar.ino +++ b/examples/Inkplate6FLICK/Projects/Inkplate6FLICK_Google_Calendar/Inkplate6FLICK_Google_Calendar.ino @@ -92,7 +92,7 @@ NetworkFunctions network(calendarID, apiKey); Gui gui(inkplate); // --- Deep Sleep Configuration --- -#define uS_TO_S_FACTOR 1000000 // Convert microseconds to seconds +#define uS_TO_S_FACTOR 1000000ULL // Convert microseconds to seconds #define TIME_TO_SLEEP 600 // Sleep time: 600 seconds = 10 minutes void setup() diff --git a/examples/Inkplate6FLICK/Projects/Inkplate6FLICK_Image_Frame_From_Web/Inkplate6FLICK_Image_Frame_From_Web.ino b/examples/Inkplate6FLICK/Projects/Inkplate6FLICK_Image_Frame_From_Web/Inkplate6FLICK_Image_Frame_From_Web.ino index 055c51c4b..f0bdb3b4d 100644 --- a/examples/Inkplate6FLICK/Projects/Inkplate6FLICK_Image_Frame_From_Web/Inkplate6FLICK_Image_Frame_From_Web.ino +++ b/examples/Inkplate6FLICK/Projects/Inkplate6FLICK_Image_Frame_From_Web/Inkplate6FLICK_Image_Frame_From_Web.ino @@ -70,7 +70,7 @@ #include "Inkplate.h" -const char ssid[] = "Soldered Electronics"; // Your WiFi SSID +const char ssid[] = ""; // Your WiFi SSID const char *password = ""; // Your WiFi password Inkplate display(INKPLATE_3BIT); diff --git a/examples/Inkplate6FLICK/Projects/Inkplate6FLICK_OpenMeteo_Weather_Station/Inkplate6FLICK_OpenMeteo_Weather_Station.ino b/examples/Inkplate6FLICK/Projects/Inkplate6FLICK_OpenMeteo_Weather_Station/Inkplate6FLICK_OpenMeteo_Weather_Station.ino index 5a7bb3969..978e064d6 100644 --- a/examples/Inkplate6FLICK/Projects/Inkplate6FLICK_OpenMeteo_Weather_Station/Inkplate6FLICK_OpenMeteo_Weather_Station.ino +++ b/examples/Inkplate6FLICK/Projects/Inkplate6FLICK_OpenMeteo_Weather_Station/Inkplate6FLICK_OpenMeteo_Weather_Station.ino @@ -96,7 +96,7 @@ WeatherData weatherData; // Structure to hold fetched weather data Gui gui(inkplate); // Drawing visuals and info // --- Deep Sleep Configuration --- -#define uS_TO_S_FACTOR 1000000 // Convert microseconds to seconds +#define uS_TO_S_FACTOR 1000000ULL // Convert microseconds to seconds #define TIME_TO_SLEEP 1800 // Sleep time: 1800 seconds = 30 minutes // --- Main Setup: Runs Once on Boot --- diff --git a/examples/Inkplate6FLICK/Projects/Inkplate6FLICK_Quotables/Inkplate6FLICK_Quotables.ino b/examples/Inkplate6FLICK/Projects/Inkplate6FLICK_Quotables/Inkplate6FLICK_Quotables.ino index fe7c6bd0f..8c8c8ba23 100644 --- a/examples/Inkplate6FLICK/Projects/Inkplate6FLICK_Quotables/Inkplate6FLICK_Quotables.ino +++ b/examples/Inkplate6FLICK/Projects/Inkplate6FLICK_Quotables/Inkplate6FLICK_Quotables.ino @@ -73,8 +73,8 @@ //---------- CHANGE HERE -------------: // Put in your ssid and password -char ssid[] = "Soldered Electronics"; -char pass[] = "dasduino"; +char ssid[] = ""; +char pass[] = ""; //---------------------------------- diff --git a/examples/Inkplate6PLUS/Advanced/DeepSleep/Inkplate6PLUS_Partial_Update_With_Deep_Sleep/Inkplate6PLUS_Partial_Update_With_Deep_Sleep.ino b/examples/Inkplate6PLUS/Advanced/DeepSleep/Inkplate6PLUS_Partial_Update_With_Deep_Sleep/Inkplate6PLUS_Partial_Update_With_Deep_Sleep.ino index 8c3c279d0..309a73752 100644 --- a/examples/Inkplate6PLUS/Advanced/DeepSleep/Inkplate6PLUS_Partial_Update_With_Deep_Sleep/Inkplate6PLUS_Partial_Update_With_Deep_Sleep.ino +++ b/examples/Inkplate6PLUS/Advanced/DeepSleep/Inkplate6PLUS_Partial_Update_With_Deep_Sleep/Inkplate6PLUS_Partial_Update_With_Deep_Sleep.ino @@ -58,7 +58,7 @@ #include "driver/rtc_io.h" // Include ESP32 library for RTC pin I/O (needed for rtc_gpio_isolate() function) #include // Include ESP32 library for RTC (needed for rtc_get_reset_reason() function) -#define uS_TO_S_FACTOR 1000000 // Conversion factor for micro seconds to seconds +#define uS_TO_S_FACTOR 1000000ULL // Conversion factor for micro seconds to seconds #define TIME_TO_SLEEP 10 // Time how long ESP32 will be in deep sleep (in seconds). In this case 10 seconds. Inkplate display(INKPLATE_1BIT); // Create an object on Inkplate library and also set library into 1-bit mode (BW) diff --git a/examples/Inkplate6PLUS/Advanced/DeepSleep/Inkplate6PLUS_Simple_Deep_Sleep/Inkplate6PLUS_Simple_Deep_Sleep.ino b/examples/Inkplate6PLUS/Advanced/DeepSleep/Inkplate6PLUS_Simple_Deep_Sleep/Inkplate6PLUS_Simple_Deep_Sleep.ino index 51095797e..6add27010 100644 --- a/examples/Inkplate6PLUS/Advanced/DeepSleep/Inkplate6PLUS_Simple_Deep_Sleep/Inkplate6PLUS_Simple_Deep_Sleep.ino +++ b/examples/Inkplate6PLUS/Advanced/DeepSleep/Inkplate6PLUS_Simple_Deep_Sleep/Inkplate6PLUS_Simple_Deep_Sleep.ino @@ -61,7 +61,7 @@ const uint8_t *pictures[] = {picture1, picture2, picture3}; // This array of pinters holds address of every picture in the memory, // so we can easly select it by selecting index in array -#define uS_TO_S_FACTOR 1000000 // Conversion factor for micro seconds to seconds +#define uS_TO_S_FACTOR 1000000ULL // Conversion factor for micro seconds to seconds #define TIME_TO_SLEEP 20 // How long ESP32 will be in deep sleep (in seconds) RTC_DATA_ATTR int slide = 0; diff --git a/examples/Inkplate6PLUS/Advanced/DeepSleep/Inkplate6PLUS_Wake_Up_Button/Inkplate6PLUS_Wake_Up_Button.ino b/examples/Inkplate6PLUS/Advanced/DeepSleep/Inkplate6PLUS_Wake_Up_Button/Inkplate6PLUS_Wake_Up_Button.ino index e7d1a72d7..b58bb5720 100644 --- a/examples/Inkplate6PLUS/Advanced/DeepSleep/Inkplate6PLUS_Wake_Up_Button/Inkplate6PLUS_Wake_Up_Button.ino +++ b/examples/Inkplate6PLUS/Advanced/DeepSleep/Inkplate6PLUS_Wake_Up_Button/Inkplate6PLUS_Wake_Up_Button.ino @@ -53,7 +53,7 @@ #include // Conversion factor for micro seconds to seconds -#define uS_TO_S_FACTOR 1000000 +#define uS_TO_S_FACTOR 1000000ULL // Time ESP32 will go to sleep (in seconds) #define TIME_TO_SLEEP 30 diff --git a/examples/Inkplate6PLUS/Basic/Inkplate6PLUS_Simple_Frontlight/Inkplate6PLUS_Simple_Frontlight.ino b/examples/Inkplate6PLUS/Basic/Inkplate6PLUS_Simple_Frontlight/Inkplate6PLUS_Simple_Frontlight.ino index 99bfe1ddd..c779c1a40 100644 --- a/examples/Inkplate6PLUS/Basic/Inkplate6PLUS_Simple_Frontlight/Inkplate6PLUS_Simple_Frontlight.ino +++ b/examples/Inkplate6PLUS/Basic/Inkplate6PLUS_Simple_Frontlight/Inkplate6PLUS_Simple_Frontlight.ino @@ -58,12 +58,9 @@ int b = 31; // Variable that holds intensity of the frontlight void setup() { Serial.begin(115200); // Set up a serial communication of 115200 baud - // Uncomment this line if you have a USB Power Only Inkplate6PLUS - // Must be called before display.begin()! - //display.setInkplatePowerMode(INKPLATE_USB_PWR_ONLY); display.begin(); // Init Inkplate library display.frontlight.setState(true); // Enable frontlight circuit - display.frontlight.setState(b); // Set frontlight intensity + display.frontlight.setBrightness(b); // Set frontlight intensity } void loop() @@ -92,13 +89,13 @@ void loop() { for (int i = 0; i < 64; ++i) { - display.frontlight.setState(i); + display.frontlight.setBrightness(i); delay(30); } for (int i = 63; i >= 0; --i) { - display.frontlight.setState(i); + display.frontlight.setBrightness(i); delay(30); } } @@ -108,7 +105,7 @@ void loop() if (change) // If frontlight valuse has changed, update the intensity and show current value of frontlight { - display.frontlight.setState(b); + display.frontlight.setBrightness(b); Serial.print("Frontlight:"); Serial.print(b, DEC); Serial.println("/63"); diff --git a/examples/Inkplate6PLUS/Diagnostics/Inkplate6PLUS_Factory_Programming_VCOM/test.cpp b/examples/Inkplate6PLUS/Diagnostics/Inkplate6PLUS_Factory_Programming_VCOM/test.cpp index 1de22c72b..9393d7a06 100644 --- a/examples/Inkplate6PLUS/Diagnostics/Inkplate6PLUS_Factory_Programming_VCOM/test.cpp +++ b/examples/Inkplate6PLUS/Diagnostics/Inkplate6PLUS_Factory_Programming_VCOM/test.cpp @@ -11,8 +11,8 @@ const char sdCardTestStringLength = 100; const char *testString = {"This is some test string..."}; -const char *WSSID = {"Soldered Electronics"}; -const char *WPASS = {"dasduino"}; +const char *WSSID = {""}; +const char *WPASS = {""}; // Change this to your used slave device const uint8_t easyCDeviceAddress = 0x76; diff --git a/examples/Inkplate6PLUS/Projects/Inkplate6PLUS_Google_Calendar/Inkplate6PLUS_Google_Calendar.ino b/examples/Inkplate6PLUS/Projects/Inkplate6PLUS_Google_Calendar/Inkplate6PLUS_Google_Calendar.ino index 3dda8db59..573cd5d71 100644 --- a/examples/Inkplate6PLUS/Projects/Inkplate6PLUS_Google_Calendar/Inkplate6PLUS_Google_Calendar.ino +++ b/examples/Inkplate6PLUS/Projects/Inkplate6PLUS_Google_Calendar/Inkplate6PLUS_Google_Calendar.ino @@ -93,7 +93,7 @@ NetworkFunctions network(calendarID, apiKey); Gui gui(inkplate); // --- Deep Sleep Configuration --- -#define uS_TO_S_FACTOR 1000000 // Convert microseconds to seconds +#define uS_TO_S_FACTOR 1000000ULL // Convert microseconds to seconds #define TIME_TO_SLEEP 600 // Sleep time: 600 seconds = 10 minutes void setup() diff --git a/examples/Inkplate6PLUS/Projects/Inkplate6PLUS_Image_Frame_From_Web/Inkplate6PLUS_Image_Frame_From_Web.ino b/examples/Inkplate6PLUS/Projects/Inkplate6PLUS_Image_Frame_From_Web/Inkplate6PLUS_Image_Frame_From_Web.ino index 1a05c8b4f..6447c415b 100644 --- a/examples/Inkplate6PLUS/Projects/Inkplate6PLUS_Image_Frame_From_Web/Inkplate6PLUS_Image_Frame_From_Web.ino +++ b/examples/Inkplate6PLUS/Projects/Inkplate6PLUS_Image_Frame_From_Web/Inkplate6PLUS_Image_Frame_From_Web.ino @@ -69,8 +69,8 @@ #include "Inkplate.h" -const char ssid[] = "Soldered Electronics"; // Your WiFi SSID -const char *password = "dasduino"; // Your WiFi password +const char ssid[] = ""; // Your WiFi SSID +const char *password = ""; // Your WiFi password Inkplate display(INKPLATE_3BIT); diff --git a/examples/Inkplate6PLUS/Projects/Inkplate6PLUS_OpenMeteo_Weather_Station/Inkplate6PLUS_OpenMeteo_Weather_Station.ino b/examples/Inkplate6PLUS/Projects/Inkplate6PLUS_OpenMeteo_Weather_Station/Inkplate6PLUS_OpenMeteo_Weather_Station.ino index de0db51ee..0494146fd 100644 --- a/examples/Inkplate6PLUS/Projects/Inkplate6PLUS_OpenMeteo_Weather_Station/Inkplate6PLUS_OpenMeteo_Weather_Station.ino +++ b/examples/Inkplate6PLUS/Projects/Inkplate6PLUS_OpenMeteo_Weather_Station/Inkplate6PLUS_OpenMeteo_Weather_Station.ino @@ -96,7 +96,7 @@ WeatherData weatherData; // Structure to hold fetched weather data Gui gui(inkplate); // Drawing visuals and info // --- Deep Sleep Configuration --- -#define uS_TO_S_FACTOR 1000000 // Convert microseconds to seconds +#define uS_TO_S_FACTOR 1000000ULL // Convert microseconds to seconds #define TIME_TO_SLEEP 1800 // Sleep time: 1800 seconds = 30 minutes // --- Main Setup: Runs Once on Boot --- diff --git a/examples/Inkplate6PLUS/Projects/Inkplate6PLUS_Quotables/Inkplate6PLUS_Quotables.ino b/examples/Inkplate6PLUS/Projects/Inkplate6PLUS_Quotables/Inkplate6PLUS_Quotables.ino index 2d153ddfd..3b5df5f77 100644 --- a/examples/Inkplate6PLUS/Projects/Inkplate6PLUS_Quotables/Inkplate6PLUS_Quotables.ino +++ b/examples/Inkplate6PLUS/Projects/Inkplate6PLUS_Quotables/Inkplate6PLUS_Quotables.ino @@ -74,8 +74,8 @@ //---------- CHANGE HERE -------------: // Put in your ssid and password -char ssid[] = "Soldered Electronics"; -char pass[] = "dasduino"; +char ssid[] = ""; +char pass[] = ""; //---------------------------------- diff --git a/library.properties b/library.properties index 9bf6b9983..4312c43d1 100644 --- a/library.properties +++ b/library.properties @@ -1,5 +1,5 @@ name=InkplateLibrary -version=11.0.0 +version=11.0.1 author=Soldered maintainer=David Zovko sentence=Inkplate boards driver library diff --git a/src/boards/Inkplate10/pins.h b/src/boards/Inkplate10/pins.h index b75de75cf..c404962c7 100644 --- a/src/boards/Inkplate10/pins.h +++ b/src/boards/Inkplate10/pins.h @@ -4,8 +4,13 @@ #if defined(ARDUINO_INKPLATE10V2) || defined(ARDUINO_INKPLATE10) #include "soc/gpio_reg.h" #include "soc/gpio_struct.h" +#if defined(ARDUINO_INKPLATE10V2) #define IO_INT_ADDR 0x20 #define IO_EXT_ADDR 0x21 +#elif defined(ARDUINO_INKPLATE10) +#define IO_INT_ADDR 0x20 +#define IO_EXT_ADDR 0x22 +#endif // Pin on the internal io expander which controls MOSFET for turning on and off the SD card #define SD_PMOS_PIN IO_PIN_B2 // 10 diff --git a/src/boards/Inkplate6/pins.h b/src/boards/Inkplate6/pins.h index 85c2ca696..a5460e0c9 100644 --- a/src/boards/Inkplate6/pins.h +++ b/src/boards/Inkplate6/pins.h @@ -3,8 +3,13 @@ #if defined(ARDUINO_INKPLATE6V2) || defined(ARDUINO_INKPLATE6) #include "soc/gpio_reg.h" #include "soc/gpio_struct.h" +#if defined(ARDUINO_INKPLATE6V2) #define IO_INT_ADDR 0x20 #define IO_EXT_ADDR 0x21 +#elif defined(ARDUINO_INKPLATE6) +#define IO_INT_ADDR 0x20 +#define IO_EXT_ADDR 0x22 +#endif // Pin on the internal io expander which controls MOSFET for turning on and off the SD card #define SD_PMOS_PIN IO_PIN_B2 // 10 diff --git a/src/boards/Inkplate6PLUS/pins.h b/src/boards/Inkplate6PLUS/pins.h index e357da878..8b49ba921 100644 --- a/src/boards/Inkplate6PLUS/pins.h +++ b/src/boards/Inkplate6PLUS/pins.h @@ -6,7 +6,7 @@ #if defined(ARDUINO_INKPLATE6PLUSV2) #define IO_INT_ADDR 0x20 #define IO_EXT_ADDR 0x21 -#else +#elif defined(ARDUINO_INKPLATE6PLUS) #define IO_INT_ADDR 0x20 #define IO_EXT_ADDR 0x22 #endif diff --git a/src/system/mcpExpander/mcpExpander.cpp b/src/system/mcpExpander/mcpExpander.cpp index 011d6b4ff..c0245d351 100644 --- a/src/system/mcpExpander/mcpExpander.cpp +++ b/src/system/mcpExpander/mcpExpander.cpp @@ -184,14 +184,33 @@ uint8_t IOExpander::digitalRead(uint8_t _pin, bool _bypassCheck) } /** - * @brief setIntPin enables interrupt on change on IO Expander pin. + * @brief setIntPin enables interrupt on IO Expander pin. * * @param uint8_t _pin * pin to set interrupt on + * @param uint8_t _mode + * interrupt mode: CHANGE, FALLING, or RISING */ -void IOExpander::setIntPin(uint8_t _pin) +void IOExpander::setIntPin(uint8_t _pin, uint8_t _mode) { - setIntPinInternal(_pin); + setIntPinInternal(_pin, _mode); +} + +/** + * @brief setIntOutput configures the interrupt output pin behavior. + * + * @param uint8_t _intPort + * port whose IOCON to configure (MCP23017_INT_PORTA or MCP23017_INT_PORTB) + * @param bool _mirroring + * true = both INT pins mirror each other + * @param bool _openDrain + * true = INT pin is open-drain (overrides polarity) + * @param bool _polarity + * true = INT pin active high, false = active low + */ +void IOExpander::setIntOutput(uint8_t _intPort, bool _mirroring, bool _openDrain, bool _polarity) +{ + setIntOutputInternal(_intPort, _mirroring, _openDrain, _polarity); } /** @@ -206,7 +225,7 @@ void IOExpander::removeIntPin(uint8_t _pin) } /** - * @brief getInt reads interrupt register state. + * @brief getInt reads interrupt register state (INTF - which pins triggered). * * @return returns interrupt registers state */ @@ -215,6 +234,16 @@ uint16_t IOExpander::getInt() return getINTInternal(); } +/** + * @brief getIntState reads pin state captured at the moment interrupt fired (INTCAP). + * + * @return captured GPIO state at interrupt time, both ports + */ +uint16_t IOExpander::getIntState() +{ + return getINTStateInternal(); +} + /** * @brief setPorts sets states on every IO Expander pin at once. * @@ -316,6 +345,9 @@ void IOExpander::digitalWriteInternal(uint8_t _pin, uint8_t _state) uint8_t _port = (_pin / 8) & 1; uint8_t _p = _pin % 8; + if (_ioExpanderRegs[MCP23017_IODIRA + _port] & (1 << _p)) + return; + _state ? (_ioExpanderRegs[MCP23017_GPIOA + _port] |= (1 << _p)) : (_ioExpanderRegs[MCP23017_GPIOA + _port] &= ~(1 << _p)); updateMCPRegister(MCP23017_GPIOA + _port, _ioExpanderRegs[MCP23017_GPIOA + _port]); @@ -341,12 +373,16 @@ uint8_t IOExpander::digitalReadInternal(uint8_t _pin) } /** - * @brief setIntPinInternal enables interrupt on change for selected pin. + * @brief setIntPinInternal enables interrupt for selected pin with configurable mode. * * @param uint8_t _pin * selected pin + * @param uint8_t _mode + * CHANGE: trigger on any change (INTCON compare disabled) + * FALLING: trigger when pin goes low (compare against DEFVAL=1) + * RISING: trigger when pin goes high (compare against DEFVAL=0) */ -void IOExpander::setIntPinInternal(uint8_t _pin) +void IOExpander::setIntPinInternal(uint8_t _pin, uint8_t _mode) { if (_pin > 15) return; @@ -354,11 +390,53 @@ void IOExpander::setIntPinInternal(uint8_t _pin) uint8_t _port = (_pin / 8) & 1; uint8_t _p = _pin % 8; - _ioExpanderRegs[MCP23017_INTCONA + _port] &= ~(1 << _p); + switch (_mode) + { + case CHANGE: + _ioExpanderRegs[MCP23017_INTCONA + _port] &= ~(1 << _p); + break; + + case FALLING: + _ioExpanderRegs[MCP23017_INTCONA + _port] |= (1 << _p); + _ioExpanderRegs[MCP23017_DEFVALA + _port] |= (1 << _p); + break; + + case RISING: + _ioExpanderRegs[MCP23017_INTCONA + _port] |= (1 << _p); + _ioExpanderRegs[MCP23017_DEFVALA + _port] &= ~(1 << _p); + break; + + default: + return; + } + _ioExpanderRegs[MCP23017_GPINTENA + _port] |= (1 << _p); - updateMCPRegister(MCP23017_INTCONA + _port, _ioExpanderRegs[MCP23017_INTCONA + _port]); updateMCPRegister(MCP23017_GPINTENA + _port, _ioExpanderRegs[MCP23017_GPINTENA + _port]); + updateMCPRegister(MCP23017_DEFVALA + _port, _ioExpanderRegs[MCP23017_DEFVALA + _port]); + updateMCPRegister(MCP23017_INTCONA + _port, _ioExpanderRegs[MCP23017_INTCONA + _port]); +} + +/** + * @brief setIntOutputInternal configures IOCON for the interrupt output pin. + * + * @param uint8_t _intPort + * MCP23017_INT_PORTA (0) or MCP23017_INT_PORTB (1) + * @param bool _mirroring + * true = INTA/INTB mirror each other + * @param bool _openDrain + * true = open-drain output (overrides polarity) + * @param bool _polarity + * true = active high, false = active low + */ +void IOExpander::setIntOutputInternal(uint8_t _intPort, bool _mirroring, bool _openDrain, bool _polarity) +{ + _intPort &= 1; + uint8_t &iocon = _ioExpanderRegs[MCP23017_IOCONA + _intPort]; + iocon = (iocon & ~(1 << 6)) | (_mirroring << 6); + iocon = (iocon & ~(1 << 2)) | (_openDrain << 2); + iocon = (iocon & ~(1 << 1)) | (_polarity << 1); + updateMCPRegister(MCP23017_IOCONA + _intPort, iocon); } /** @@ -389,6 +467,17 @@ uint16_t IOExpander::getINTInternal() return ((_ioExpanderRegs[MCP23017_INTFB] << 8) | _ioExpanderRegs[MCP23017_INTFA]); } +/** + * @brief getINTStateInternal reads captured GPIO state at the moment interrupt fired (INTCAP). + * + * @return captured pin state of both ports at interrupt time + */ +uint16_t IOExpander::getINTStateInternal() +{ + readMCPRegisters(MCP23017_INTCAPA, 2); + return ((_ioExpanderRegs[MCP23017_INTCAPB] << 8) | _ioExpanderRegs[MCP23017_INTCAPA]); +} + /** * @brief setPortsInternal sets all pins at once. * diff --git a/src/system/mcpExpander/mcpExpander.h b/src/system/mcpExpander/mcpExpander.h index a96dbb88f..4d8f6eb48 100644 --- a/src/system/mcpExpander/mcpExpander.h +++ b/src/system/mcpExpander/mcpExpander.h @@ -88,10 +88,12 @@ class IOExpander void pinMode(uint8_t _pin, uint8_t _mode, bool _bypassCheck = false); void digitalWrite(uint8_t _pin, uint8_t _state, bool _bypassCheck = false); uint8_t digitalRead(uint8_t _pin, bool _bypassCheck = false); - void setIntPin(uint8_t _pin); + void setIntPin(uint8_t _pin, uint8_t _mode = CHANGE); + void setIntOutput(uint8_t _intPort, bool _mirroring, bool _openDrain, bool _polarity); void setPorts(uint16_t _d); void removeIntPin(uint8_t _pin); uint16_t getInt(); + uint16_t getIntState(); uint16_t getPorts(); void blockPinUsage(uint8_t _pin); void unblockPinUsage(uint8_t _pin); @@ -111,9 +113,11 @@ class IOExpander void pinModeInternal(uint8_t _pin, uint8_t _mode); void digitalWriteInternal(uint8_t _pin, uint8_t _state); uint8_t digitalReadInternal(uint8_t _pin); - void setIntPinInternal(uint8_t _pin); + void setIntPinInternal(uint8_t _pin, uint8_t _mode); + void setIntOutputInternal(uint8_t _intPort, bool _mirroring, bool _openDrain, bool _polarity); void removeIntPinInternal(uint8_t _pin); uint16_t getINTInternal(); + uint16_t getINTStateInternal(); void setPortsInternal(uint16_t _d); uint16_t getPortsInternal(); diff --git a/src/system/pcalExpander/pcalExpander.cpp b/src/system/pcalExpander/pcalExpander.cpp index adf18ef49..c2d5a90f5 100644 --- a/src/system/pcalExpander/pcalExpander.cpp +++ b/src/system/pcalExpander/pcalExpander.cpp @@ -188,14 +188,20 @@ uint8_t IOExpander::digitalRead(uint8_t _pin, bool _bypassCheck) } /** - * @brief setIntPin function enables interrupt on change on IO Expander pin. + * @brief setIntPin enables interrupt on IO Expander pin. * * @param uint8_t _pin - * pin to set interrupt mode to + * pin to set interrupt on + * @param uint8_t _mode + * CHANGE (default): interrupt on any edge, latch disabled. + * FALLING / RISING: interrupt on any edge (hardware limitation — + * PCAL6416A has no edge-select registers), but input latch is + * enabled so the interrupt is held until the input port is read, + * preventing missed events on fast signals. */ -void IOExpander::setIntPin(uint8_t _pin) +void IOExpander::setIntPin(uint8_t _pin, uint8_t _mode) { - setIntPinInternal(_pin); + setIntPinInternal(_pin, _mode); } /** @@ -349,10 +355,13 @@ void IOExpander::digitalWriteInternal(uint8_t _pin, uint8_t _state) _state &= 1; uint8_t _port = _pin / 8; - _pin %= 8; + uint8_t _p = _pin % 8; + + if (_ioExpanderRegs[PCAL6416A_CFGPORT0_ARRAY + _port] & (1 << _p)) + return; - _state ? _ioExpanderRegs[PCAL6416A_OUTPORT0_ARRAY + _port] |= (1 << _pin) - : _ioExpanderRegs[PCAL6416A_OUTPORT0_ARRAY + _port] &= ~(1 << _pin); + _state ? _ioExpanderRegs[PCAL6416A_OUTPORT0_ARRAY + _port] |= (1 << _p) + : _ioExpanderRegs[PCAL6416A_OUTPORT0_ARRAY + _port] &= ~(1 << _p); updatePCALRegister(PCAL6416A_OUTPORT0_ARRAY + _port, _ioExpanderRegs[PCAL6416A_OUTPORT0_ARRAY + _port]); } @@ -378,23 +387,37 @@ uint8_t IOExpander::digitalReadInternal(uint8_t _pin) } /** - * @brief setIntPinInternal function sets Interrupt on selected pin + * @brief setIntPinInternal enables interrupt for selected pin. * - * pointer to array that holds IO Exapnder registers - * @param uint8_t *_pin + * @param uint8_t _pin * selected pin + * @param uint8_t _mode + * CHANGE: unmask interrupt, disable input latch. + * FALLING / RISING: unmask interrupt, enable input latch so the + * interrupt is held until the input port register is read. + * NOTE: PCAL6416A has no hardware edge-select — all modes trigger + * on any input change. FALLING/RISING differ only in latch behavior. */ -void IOExpander::setIntPinInternal(uint8_t _pin) +void IOExpander::setIntPinInternal(uint8_t _pin, uint8_t _mode) { if (_pin > 15) return; uint8_t _port = _pin / 8; - _pin %= 8; - - _ioExpanderRegs[PCAL6416A_INTMSK_REG0_ARRAY + _port] &= ~(1 << _pin); + uint8_t _p = _pin % 8; + // Unmask interrupt for this pin (0 = unmasked) + _ioExpanderRegs[PCAL6416A_INTMSK_REG0_ARRAY + _port] &= ~(1 << _p); updatePCALRegister(PCAL6416A_INTMSK_REG0_ARRAY + _port, _ioExpanderRegs[PCAL6416A_INTMSK_REG0_ARRAY + _port]); + + // For FALLING/RISING enable input latch so interrupt is held until input port read. + // For CHANGE disable latch so interrupt clears when pin returns to original state. + if (_mode == FALLING || _mode == RISING) + _ioExpanderRegs[PCAL6416A_INLAT_REG0_ARRAY + _port] |= (1 << _p); + else + _ioExpanderRegs[PCAL6416A_INLAT_REG0_ARRAY + _port] &= ~(1 << _p); + + updatePCALRegister(PCAL6416A_INLAT_REG0_ARRAY + _port, _ioExpanderRegs[PCAL6416A_INLAT_REG0_ARRAY + _port]); } /** @@ -410,11 +433,15 @@ void IOExpander::removeIntPinInternal(uint8_t _pin) return; uint8_t _port = _pin / 8; - _pin %= 8; - - _ioExpanderRegs[PCAL6416A_INTMSK_REG0_ARRAY + _port] |= (1 << _pin); + uint8_t _p = _pin % 8; + // Mask interrupt (1 = masked) + _ioExpanderRegs[PCAL6416A_INTMSK_REG0_ARRAY + _port] |= (1 << _p); updatePCALRegister(PCAL6416A_INTMSK_REG0_ARRAY + _port, _ioExpanderRegs[PCAL6416A_INTMSK_REG0_ARRAY + _port]); + + // Disable input latch + _ioExpanderRegs[PCAL6416A_INLAT_REG0_ARRAY + _port] &= ~(1 << _p); + updatePCALRegister(PCAL6416A_INLAT_REG0_ARRAY + _port, _ioExpanderRegs[PCAL6416A_INLAT_REG0_ARRAY + _port]); } /** diff --git a/src/system/pcalExpander/pcalExpander.h b/src/system/pcalExpander/pcalExpander.h index 1c330f8bc..dc3b6b5bd 100644 --- a/src/system/pcalExpander/pcalExpander.h +++ b/src/system/pcalExpander/pcalExpander.h @@ -99,7 +99,7 @@ class IOExpander void pinMode(uint8_t _pin, uint8_t _mode, bool _bypassCheck = false); void digitalWrite(uint8_t _pin, uint8_t _state, bool _bypassCheck = false); uint8_t digitalRead(uint8_t _pin, bool _bypassCheck = false); - void setIntPin(uint8_t _pin); + void setIntPin(uint8_t _pin, uint8_t _mode = CHANGE); void setPorts(uint16_t _d); void removeIntPin(uint8_t _pin); uint16_t getInt(); @@ -130,7 +130,7 @@ class IOExpander void digitalWriteInternal(uint8_t _pin, uint8_t _state); uint8_t digitalReadInternal(uint8_t _pin); - void setIntPinInternal(uint8_t _pin); + void setIntPinInternal(uint8_t _pin, uint8_t _mode); void removeIntPinInternal(uint8_t _pin); uint16_t getINTInternal(); void setPortsInternal(uint16_t _d);