Skip to content

Commit

Permalink
esp32 tests
Browse files Browse the repository at this point in the history
  • Loading branch information
BlitzCityDIY committed Jun 24, 2024
1 parent 768256c commit 690f3a0
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 9 deletions.
9 changes: 1 addition & 8 deletions ESP32_S2_WiFi_Tests/JSONdemo/JSONdemo.ino
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ last revision November 2015
*/

#include <WiFi.h>
#include <WiFiClientSecure.h>
#include <ArduinoJson.h>
#include <Wire.h>
Expand Down Expand Up @@ -44,16 +45,9 @@ char ssid[] = "YOUR_SSID"; // your network SSID (name)
char pass[] = "YOUR_SSID_PASSWORD"; // your network password (use for WPA, or use as key for WEP)
int keyIndex = 0; // your network key Index number (needed only for WEP)


int status = WL_IDLE_STATUS;
// if you don't want to use DNS (and reduce your sketch size)
// use the numeric IP instead of the name for the server:
//IPAddress server(74,125,232,128); // numeric IP for Google (no DNS)

#define SERVER "cdn.syndication.twimg.com"
#define PATH "/widgets/followbutton/info.json?screen_names=adafruit"


void setup() {
//Initialize serial and wait for port to open:
Serial.begin(115200);
Expand Down Expand Up @@ -90,7 +84,6 @@ void setup() {
display.display();
#endif


while (WiFi.status() != WL_CONNECTED) {
delay(500);
Serial.print(".");
Expand Down
1 change: 1 addition & 0 deletions ESP32_S2_WiFi_Tests/WiFiSSLClient/WiFiSSLClient.ino
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ last revision November 2015
*/

#include <WiFiClientSecure.h>
#include <WiFi.h>

// Enter your WiFi SSID and password
char ssid[] = "YOUR_SSID"; // your network SSID (name)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@

#include <Adafruit_GFX.h> // Core graphics library
#include <HTTPClient.h>
#include <WiFi.h>
#include <ArduinoJson.h> //https://github.com/bblanchon/ArduinoJson
#include <Adafruit_EPD.h>
#include "secrets.h"
Expand Down Expand Up @@ -212,7 +213,7 @@ String getURLResponse(String url)

void getQuote(String &quote, String &author)
{
StaticJsonDocument<1024> doc;
DynamicJsonDocument doc(1024);
String url = "https://www.adafruit.com/api/quotes.php";
String jsonquote = getURLResponse(url);
if(jsonquote.length() > 0)
Expand Down

0 comments on commit 690f3a0

Please sign in to comment.