mirror of
https://github.com/esp8266/Arduino.git
synced 2025-06-12 01:53:07 +03:00
Deprecate axTLS, update examples (#5366)
* update examples * fix serial<->tcp example, use STASSID instead of SSID (name collision) * fix HTTPSRequest.ino * update AxTLS HTTPS examples, update AxTLS API to deprecated * fixes * fixes + fix astyle (no preproc directives) + restyling script * fix HTTPClient library * fixes * common.sh: do not reload arduino when already present (for locally CI testing) * common.sh: do not reload ArduinoJson when already present (for locally CI testing) * fix * fix * fix deprecated example * fix WiFiHTTPSServer.ino * reduce footprint * wipfix * fix led builtin * fix example * finished updating APSSID on all examples * style * restyle examples * helper to run CI test locally * local CI runner more verbose * +const * deprecation deprecation * deprecation * Update NTPClient.ino const char[] => const char * * Update interactive.ino const char[] => const char *
This commit is contained in:
committed by
Earle F. Philhower, III
parent
8f28c88f9c
commit
92373a9837
@ -25,9 +25,9 @@ void setup() {
|
||||
void loop() {
|
||||
// Call Espressif SDK functionality - wrapped in ifdef so that it still
|
||||
// compiles on other platforms
|
||||
#ifdef ESP8266
|
||||
#ifdef ESP8266
|
||||
Serial.print("wifi_station_get_hostname: ");
|
||||
Serial.println(wifi_station_get_hostname());
|
||||
#endif
|
||||
#endif
|
||||
delay(1000);
|
||||
}
|
||||
|
@ -12,9 +12,14 @@
|
||||
#include <WiFiUdp.h>
|
||||
#include <i2s.h>
|
||||
|
||||
#ifndef STASSID
|
||||
#define STASSID "your-ssid"
|
||||
#define STAPSK "your-password"
|
||||
#endif
|
||||
|
||||
// Set your network here
|
||||
const char *SSID = "....";
|
||||
const char *PASS = "....";
|
||||
const char *SSID = STASSID;
|
||||
const char *PASS = STAPSK;
|
||||
|
||||
WiFiUDP udp;
|
||||
// Set your listener PC's IP here:
|
||||
|
@ -22,8 +22,8 @@
|
||||
#include <lwip/dns.h>
|
||||
|
||||
#ifndef STASSID
|
||||
#define STASSID "your-ssid"
|
||||
#define STAPSK "your-password"
|
||||
#define STASSID "your-ssid"
|
||||
#define STAPSK "your-password"
|
||||
#endif
|
||||
|
||||
#define FQDN F("www.google.com") // with both IPv4 & IPv6 addresses
|
||||
@ -101,7 +101,7 @@ void setup() {
|
||||
|
||||
status(Serial);
|
||||
|
||||
#if 0
|
||||
#if 0
|
||||
|
||||
// legacy loop (still valid with IPv4 only)
|
||||
|
||||
@ -110,7 +110,7 @@ void setup() {
|
||||
delay(500);
|
||||
}
|
||||
|
||||
#else
|
||||
#else
|
||||
|
||||
// Use this loop instead to wait for an IPv6 routable address
|
||||
|
||||
@ -131,7 +131,7 @@ void setup() {
|
||||
delay(500);
|
||||
}
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
Serial.println(F("connected: "));
|
||||
|
||||
|
@ -19,8 +19,13 @@
|
||||
|
||||
////////////////////////////////////////////////////////
|
||||
|
||||
#define SSID "open"
|
||||
#define SSIDPWD ""
|
||||
#ifndef STASSID
|
||||
#define STASSID "your-ssid"
|
||||
#define STAPSK "your-password"
|
||||
#endif
|
||||
|
||||
#define SSID STASSID
|
||||
#define SSIDPWD STAPSK
|
||||
#define TZ 1 // (utc+) TZ in hours
|
||||
#define DST_MN 60 // use 60mn for summer time in some countries
|
||||
|
||||
@ -46,7 +51,7 @@ void setup() {
|
||||
Serial.begin(115200);
|
||||
settimeofday_cb(time_is_set);
|
||||
|
||||
#if NTP0_OR_LOCAL1
|
||||
#if NTP0_OR_LOCAL1
|
||||
// local
|
||||
|
||||
ESP.eraseConfig();
|
||||
@ -55,14 +60,14 @@ void setup() {
|
||||
timezone tz = { TZ_MN + DST_MN, 0 };
|
||||
settimeofday(&tv, &tz);
|
||||
|
||||
#else // ntp
|
||||
#else // ntp
|
||||
|
||||
configTime(TZ_SEC, DST_SEC, "pool.ntp.org");
|
||||
WiFi.mode(WIFI_STA);
|
||||
WiFi.begin(SSID, SSIDPWD);
|
||||
// don't wait, observe time changing when ntp timestamp is received
|
||||
|
||||
#endif // ntp
|
||||
#endif // ntp
|
||||
}
|
||||
|
||||
// for testing purpose:
|
||||
|
@ -10,8 +10,13 @@
|
||||
#include "ESP8266WiFi.h"
|
||||
#include "user_interface.h"
|
||||
|
||||
const char SSID[] = "open";
|
||||
const char PSK[] = "";
|
||||
#ifndef STASSID
|
||||
#define STASSID "your-ssid"
|
||||
#define STAPSK "your-password"
|
||||
#endif
|
||||
|
||||
const char * SSID = STASSID;
|
||||
const char * PSK = STAPSK;
|
||||
|
||||
IPAddress staticip(192, 168, 1, 123);
|
||||
IPAddress gateway(192, 168, 1, 254);
|
||||
|
Reference in New Issue
Block a user