File tree Expand file tree Collapse file tree 3 files changed +11
-9
lines changed Expand file tree Collapse file tree 3 files changed +11
-9
lines changed Original file line number Diff line number Diff line change @@ -35,14 +35,10 @@ int status = WL_IDLE_STATUS;
3535#define SERVER " cdn.syndication.twimg.com"
3636#define PATH " /widgets/followbutton/info.json?screen_names=adafruit"
3737
38- // Initialize the SSL client library
39- // with the IP address and port of the server
40- // that you want to connect to (port 443 is default for HTTPS):
41- WiFiClientSecure client;
4238
4339void setup () {
4440 // Initialize serial and wait for port to open:
45- Serial.begin (9600 );
41+ Serial.begin (115200 );
4642
4743 #if defined(USE_OLED)
4844 if (!display.begin (SSD1306_SWITCHCAPVCC, 0x3C )) { // Address 0x3C for 128x32
@@ -85,12 +81,14 @@ void setup() {
8581 #endif
8682
8783 printWifiStatus ();
88-
8984}
9085
9186uint32_t bytes = 0 ;
9287
9388void loop () {
89+ WiFiClientSecure client;
90+ client.setInsecure (); // don't use a root cert
91+
9492 Serial.println (" \n Starting connection to server..." );
9593 #if defined(USE_OLED)
9694 display.clearDisplay (); display.setCursor (0 ,0 );
Original file line number Diff line number Diff line change @@ -32,7 +32,7 @@ WiFiClientSecure client;
3232
3333void setup () {
3434 // Initialize serial and wait for port to open:
35- Serial.begin (9600 );
35+ Serial.begin (115200 );
3636 while (!Serial) {
3737 ; // wait for serial port to connect. Needed for native USB port only
3838 }
@@ -51,6 +51,8 @@ void setup() {
5151 Serial.println (" Connected to WiFi" );
5252 printWifiStatus ();
5353
54+ client.setInsecure (); // don't use a root cert
55+
5456 Serial.println (" \n Starting connection to server..." );
5557 // if you get a connection, report back via serial:
5658 if (client.connect (SERVER, 443 )) {
Original file line number Diff line number Diff line change @@ -39,7 +39,7 @@ WiFiClient client;
3939
4040void setup () {
4141 // Initialize serial and wait for port to open:
42- Serial.begin (9600 );
42+ Serial.begin (115200 );
4343 while (!Serial) {
4444 ; // wait for serial port to connect. Needed for native USB port only
4545 }
@@ -85,7 +85,9 @@ void loop() {
8585 client.stop ();
8686
8787 // do nothing forevermore:
88- while (true );
88+ while (true ) {
89+ delay (100 );
90+ }
8991 }
9092}
9193
You can’t perform that action at this time.
0 commit comments