Skip to content
This repository has been archived by the owner on Jan 29, 2023. It is now read-only.

Commit

Permalink
v3.5.0 to use Ethernet_Generic library, etc.
Browse files Browse the repository at this point in the history
### Releases v3.5.0

1. Use new [Ethernet_Generic library](https://github.com/khoih-prog/Ethernet_Generic) as default for W5x00.
2. Rewrite to avoid `multiple-definitions` linker error for multiple-file project
3. Add example [multiFileProject_Ethernet](examples/Generic/Ethernet/multiFileProject_Ethernet) and [multiFileProject_WiFiNINA](examples/Generic/WiFiNINA/multiFileProject_WiFiNINA) to demo how to avoid `multiple-definitions` linker error for multiple-file project
4. Add support to SPI1 for RP2040 using [arduino-pico core](https://github.com/earlephilhower/arduino-pico)
5. Add support SPI2 for ESP32
6. Rewrite all the examples to support new features
7. Update `Packages' Patches`
  • Loading branch information
khoih-prog authored Apr 13, 2022
1 parent 4f6f398 commit 702dd28
Show file tree
Hide file tree
Showing 46 changed files with 1,307 additions and 939 deletions.
18 changes: 9 additions & 9 deletions examples/ESP/PWM_LEDServer_ESP32/PWM_LEDServer_ESP32.ino
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,9 @@ const int delayval = 10;

void onUpdateCallback(const char* oldIP, const char* newIP)
{
(void) oldIP;

Serial.print(F("DDNSGeneric - IP Change Detected: "));
Serial.print(F("DDNSGeneric - IP Change Detected: oldIP = "));
Serial.print(oldIP);
Serial.print(F(", newIP = "));
Serial.println(newIP);
}

Expand All @@ -80,7 +80,7 @@ void setPower(uint32_t percentage)
ledcWrite(ledChannel, pwm_val);
}

void fadeOn(void)
void fadeOn()
{
#if LED_REVERSED
for (int i = 100; i >= 0; i--)
Expand All @@ -93,7 +93,7 @@ void fadeOn(void)
}
}

void fadeOff(void)
void fadeOff()
{
#if LED_REVERSED
for (int i = 0; i < 100; i++)
Expand All @@ -106,7 +106,7 @@ void fadeOff(void)
}
}

void showLED(void)
void showLED()
{
for (int i = 0; i < 2; i++)
{
Expand Down Expand Up @@ -165,10 +165,10 @@ void handleNotFound()
server.send(404, F("text/plain"), message);
}

void setup(void)
void setup()
{
Serial.begin(115200);
while (!Serial);
while (!Serial && millis() < 5000);

#if ( ARDUINO_ESP32S2_DEV || ARDUINO_FEATHERS2 || ARDUINO_ESP32S2_THING_PLUS || ARDUINO_MICROS2 || \
ARDUINO_METRO_ESP32S2 || ARDUINO_MAGTAG29_ESP32S2 || ARDUINO_FUNHOUSE_ESP32S2 || \
Expand Down Expand Up @@ -288,7 +288,7 @@ void setup(void)
Serial.println(WiFi.subnetMask());
}

void loop(void)
void loop()
{
//delay(100);

Expand Down
18 changes: 9 additions & 9 deletions examples/ESP/PWM_LEDServer_ESP8266/PWM_LEDServer_ESP8266.ino
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,9 @@ const int delayval = 10;

void onUpdateCallback(const char* oldIP, const char* newIP)
{
(void) oldIP;

Serial.print(F("DDNSGeneric - IP Change Detected: "));
Serial.print(F("DDNSGeneric - IP Change Detected: oldIP = "));
Serial.print(oldIP);
Serial.print(F(", newIP = "));
Serial.println(newIP);
}

Expand All @@ -75,7 +75,7 @@ void setPower(uint32_t percentage)
analogWrite(LED_PIN, pwm_val);
}

void fadeOn(void)
void fadeOn()
{
#if LED_REVERSED
for (int i = 100; i >= 0; i--)
Expand All @@ -88,7 +88,7 @@ void fadeOn(void)
}
}

void fadeOff(void)
void fadeOff()
{
#if LED_REVERSED
for (int i = 0; i < 100; i++)
Expand All @@ -101,7 +101,7 @@ void fadeOff(void)
}
}

void showLED(void)
void showLED()
{
for (int i = 0; i < 2; i++)
{
Expand Down Expand Up @@ -160,10 +160,10 @@ void handleNotFound()
server.send(404, F("text/plain"), message);
}

void setup(void)
void setup()
{
Serial.begin(115200);
while (!Serial);
while (!Serial && millis() < 5000);

Serial.print("\nStart PWM_LEDServer_ESP8266 on "); Serial.println(ARDUINO_BOARD);
Serial.println(UPNP_GENERIC_VERSION);
Expand Down Expand Up @@ -269,7 +269,7 @@ void setup(void)
Serial.println(WiFi.subnetMask());
}

void loop(void)
void loop()
{
//delay(100);

Expand Down
12 changes: 6 additions & 6 deletions examples/ESP/SimpleServerESP32/SimpleServerESP32.ino
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,9 @@ const int led = 2; // LED_BUILTIN

void onUpdateCallback(const char* oldIP, const char* newIP)
{
(void) oldIP;

Serial.print(F("DDNSGeneric - IP Change Detected: "));
Serial.print(F("DDNSGeneric - IP Change Detected: oldIP = "));
Serial.print(oldIP);
Serial.print(F(", newIP = "));
Serial.println(newIP);
}

Expand Down Expand Up @@ -112,13 +112,13 @@ void handleNotFound()
digitalWrite(led, 0);
}

void setup(void)
void setup()
{
pinMode(led, OUTPUT);
digitalWrite(led, 0);

Serial.begin(115200);
while (!Serial);
while (!Serial && millis() < 5000);

#if ( ARDUINO_ESP32S2_DEV || ARDUINO_FEATHERS2 || ARDUINO_ESP32S2_THING_PLUS || ARDUINO_MICROS2 || \
ARDUINO_METRO_ESP32S2 || ARDUINO_MAGTAG29_ESP32S2 || ARDUINO_FUNHOUSE_ESP32S2 || \
Expand Down Expand Up @@ -228,7 +228,7 @@ void setup(void)
Serial.println(WiFi.subnetMask());
}

void loop(void)
void loop()
{
DDNSGeneric.update(555000);

Expand Down
12 changes: 6 additions & 6 deletions examples/ESP/SimpleServer_ESP8266/SimpleServer_ESP8266.ino
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@ ESP8266WebServer server(LISTEN_PORT);

void onUpdateCallback(const char* oldIP, const char* newIP)
{
(void) oldIP;

Serial.print(F("DDNSGeneric - IP Change Detected: "));
Serial.print(F("DDNSGeneric - IP Change Detected: oldIP = "));
Serial.print(oldIP);
Serial.print(F(", newIP = "));
Serial.println(newIP);
}

Expand Down Expand Up @@ -109,13 +109,13 @@ void handleNotFound()
digitalWrite(LED_BUILTIN, 0);
}

void setup(void)
void setup()
{
pinMode(LED_BUILTIN, OUTPUT);
digitalWrite(LED_BUILTIN, 0);

Serial.begin(115200);
while (!Serial);
while (!Serial && millis() < 5000);

Serial.print("\nStart SimpleServerESP8266 on "); Serial.println(ARDUINO_BOARD);
Serial.println(UPNP_GENERIC_VERSION);
Expand Down Expand Up @@ -217,7 +217,7 @@ void setup(void)
Serial.println(WiFi.subnetMask());
}

void loop(void)
void loop()
{
DDNSGeneric.update(555000);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ void setPower(uint32_t percentage)
analogWrite(LED_PIN, pwm_val);
}

void fadeOn(void)
void fadeOn()
{
#if LED_REVERSED
for (int i = 100; i >= 0; i--)
Expand All @@ -76,7 +76,7 @@ void fadeOn(void)
}
}

void fadeOff(void)
void fadeOff()
{
#if LED_REVERSED
for (int i = 0; i < 100; i++)
Expand All @@ -89,7 +89,7 @@ void fadeOff(void)
}
}

void showLED(void)
void showLED()
{
for (int i = 0; i < 2; i++)
{
Expand Down Expand Up @@ -149,10 +149,10 @@ void handleNotFound()
server.send(404, F("text/plain"), message);
}

void setup(void)
void setup()
{
Serial.begin(115200);
while (!Serial);
while (!Serial && millis() < 5000);

Serial.print("\nStart SAMD_PWM_LEDServer on "); Serial.print(BOARD_NAME);
Serial.print(" using "); Serial.println(SHIELD_TYPE);
Expand Down Expand Up @@ -273,7 +273,7 @@ void setup(void)
Serial.println(LISTEN_PORT);
}

void loop(void)
void loop()
{
DDNSGeneric.update(555000);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,13 +99,13 @@ void handleNotFound()
digitalWrite(led, 0);
}

void setup(void)
void setup()
{
pinMode(led, OUTPUT);
digitalWrite(led, 0);

Serial.begin(115200);
while (!Serial);
while (!Serial && millis() < 5000);

Serial.print("\nStart SAMD_SimpleServer on "); Serial.print(BOARD_NAME);
Serial.print(" using "); Serial.println(SHIELD_TYPE);
Expand Down Expand Up @@ -223,7 +223,7 @@ void setup(void)
Serial.println(LISTEN_PORT);
}

void loop(void)
void loop()
{
DDNSGeneric.update(555000);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ void setPower(uint32_t percentage)
analogWrite(LED_PIN, pwm_val);
}

void fadeOn(void)
void fadeOn()
{
#if LED_REVERSED
for (int i = 100; i >= 0; i--)
Expand All @@ -77,7 +77,7 @@ void fadeOn(void)
}
}

void fadeOff(void)
void fadeOff()
{
#if LED_REVERSED
for (int i = 0; i < 100; i++)
Expand All @@ -90,7 +90,7 @@ void fadeOff(void)
}
}

void showLED(void)
void showLED()
{
for (int i = 0; i < 2; i++)
{
Expand Down Expand Up @@ -150,10 +150,10 @@ void handleNotFound()
server.send(404, F("text/plain"), message);
}

void setup(void)
void setup()
{
Serial.begin(115200);
while (!Serial);
while (!Serial && millis() < 5000);

Serial.print("\nStart STM32_PWM_LEDServer on "); Serial.print(BOARD_NAME);
Serial.print(" using "); Serial.println(SHIELD_TYPE);
Expand Down Expand Up @@ -274,7 +274,7 @@ void setup(void)
Serial.println(LISTEN_PORT);
}

void loop(void)
void loop()
{
DDNSGeneric.update(300000);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,13 +100,13 @@ void handleNotFound()
digitalWrite(led, 0);
}

void setup(void)
void setup()
{
pinMode(led, OUTPUT);
digitalWrite(led, 0);

Serial.begin(115200);
while (!Serial);
while (!Serial && millis() < 5000);

Serial.print("\nStart STM32_SimpleServer on "); Serial.print(BOARD_NAME);
Serial.print(" using "); Serial.println(SHIELD_TYPE);
Expand Down Expand Up @@ -229,7 +229,7 @@ void setup(void)
}
}

void loop(void)
void loop()
{
DDNSGeneric.update(555000);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ void setPower(uint32_t percentage)
analogWrite(LED_PIN, pwm_val);
}

void fadeOn(void)
void fadeOn()
{
#if LED_REVERSED
for (int i = 100; i >= 0; i--)
Expand All @@ -80,7 +80,7 @@ void fadeOn(void)
}
}

void fadeOff(void)
void fadeOff()
{
#if LED_REVERSED
for (int i = 0; i < 100; i++)
Expand All @@ -93,7 +93,7 @@ void fadeOff(void)
}
}

void showLED(void)
void showLED()
{
for (int i = 0; i < 2; i++)
{
Expand Down Expand Up @@ -153,10 +153,10 @@ void handleNotFound()
server.send(404, F("text/plain"), message);
}

void setup(void)
void setup()
{
Serial.begin(115200);
while (!Serial);
while (!Serial && millis() < 5000);

Serial.print("\nStart nRF52_PWM_LEDServer on "); Serial.print(BOARD_NAME);
Serial.print(" using "); Serial.println(SHIELD_TYPE);
Expand Down Expand Up @@ -277,7 +277,7 @@ void setup(void)
Serial.println(LISTEN_PORT);
}

void loop(void)
void loop()
{
DDNSGeneric.update(555000);

Expand Down
Loading

0 comments on commit 702dd28

Please sign in to comment.