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

Commit

Permalink
v1.5.0 adds Portenta_H7
Browse files Browse the repository at this point in the history
### Major Release v1.5.0

1. Add support to **Portenta_H7**, using either WiFi or Vision-shield Ethernet
2. Add examples with new features
  • Loading branch information
khoih-prog committed Sep 17, 2021
1 parent 403de0c commit 2bfd39d
Show file tree
Hide file tree
Showing 19 changed files with 459 additions and 550 deletions.
6 changes: 3 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ If you don't find anything, please [open a new issue](https://github.com/khoih-p

Please ensure to specify the following:

* Arduino IDE version (e.g. 1.8.15) or Platform.io version
* Arduino IDE version (e.g. 1.8.16) or Platform.io version
* Board Core Version (e.g. Arduino SAMDUE core v1.6.12, ESP8266 core v3.0.2, ArduinoCore-mbed v2.4.1, etc.)
* Contextual information (e.g. what you were trying to achieve)
* Simplest possible steps to reproduce
Expand All @@ -26,11 +26,11 @@ Please ensure to specify the following:
### Example

```
Arduino IDE version: 1.8.15
Arduino IDE version: 1.8.16
RASPBERRY_PI_PICO board
ArduinoCore-mbed v2.4.1
OS: Ubuntu 20.04 LTS
Linux xy-Inspiron-3593 5.4.0-81-generic #91-Ubuntu SMP Thu Jul 15 19:09:17 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
Linux xy-Inspiron-3593 5.4.0-84-generic #94-Ubuntu SMP Thu Aug 26 20:27:37 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
Context:
I encountered a crash while trying to use the Timer Interrupt.
Expand Down
741 changes: 254 additions & 487 deletions README.md

Large diffs are not rendered by default.

105 changes: 105 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
## MySQL_MariaDB_Generic

[![arduino-library-badge](https://www.ardu-badge.com/badge/MySQL_MariaDB_Generic.svg?)](https://www.ardu-badge.com/MySQL_MariaDB_Generic)
[![GitHub release](https://img.shields.io/github/release/khoih-prog/MySQL_MariaDB_Generic.svg)](https://github.com/khoih-prog/MySQL_MariaDB_Generic/releases)
[![GitHub](https://img.shields.io/github/license/mashape/apistatus.svg)](https://github.com/khoih-prog/MySQL_MariaDB_Generic/blob/master/LICENSE)
[![contributions welcome](https://img.shields.io/badge/contributions-welcome-brightgreen.svg?style=flat)](#Contributing)
[![GitHub issues](https://img.shields.io/github/issues/khoih-prog/MySQL_MariaDB_Generic.svg)](http://github.com/khoih-prog/MySQL_MariaDB_Generic/issues)

---
---

## Table of Contents

* [Changelog](#changelog)
* [Major Release v1.5.0](#major-release-v150)
* [Major Release v1.4.0](#major-release-v140)
* [Release v1.3.1](#release-v131)
* [Release v1.3.0](#release-v130)
* [Release v1.2.0](#release-v120)
* [Major Release v1.1.0](#major-release-v110)
* [Release v1.0.3](#release-v103)
* [Release v1.0.2](#release-v102)
* [Release v1.0.1](#release-v101)
* [Release v1.0.0](#release-v100)

---
---

## Changelog

### Major Release v1.5.0

1. Add support to **Portenta_H7**, using either WiFi or Vision-shield Ethernet
2. Add examples with new features

### Major Release v1.4.0

1. Add support to [QNEthernet Library](https://github.com/ssilverman/QNEthernet) for Teensy 4.1 built-in Ethernet
2. Fix bug in non-blocking connection
3. Add new feature to permit using either server's hostname, such as `your_account.duckdns.org`, or server's IPAddress, such as IPAddress(192,168,2,112)
4. Update examples with new features, bug-fixes, etc.

### Release v1.3.1

1. Remove unnecessary SPI-bus code in NativeEthernet examples

### Release v1.3.0

1. Add support to **Teensy 4.1 using NativeEthernet**

### Release v1.2.0

1. Add support to WT32_ETH01 (ESP32 + LAN8720A)

### Major Release v1.1.0

1. Add support to RP2040-based boards, such as **RASPBERRY_PI_PICO, ADAFRUIT_FEATHER_RP2040 and GENERIC_RP2040**, using [**Earle Philhower's arduino-pico** v1.8.0+ core](https://github.com/earlephilhower/arduino-pico).
2. Add support to RP2040-based boards, such as **Nano_RP2040_Connect, RASPBERRY_PI_PICO, ADAFRUIT_FEATHER_RP2040 and GENERIC_RP2040**, using [**Arduino-mbed RP2040** v2.1.0+ core](https://github.com/arduino/ArduinoCore-mbed).
3. Add support to new **ESP32-S2** boards (**Arduino ESP32C3_DEV**). Check [HOWTO Install esp32 core for ESP32-S2 (Saola, AI-Thinker ESP-12K) and ESP32-C3 boards into Arduino IDE](#howto-install-esp32-core-for-esp32-s2-saola-ai-thinker-esp-12k-and-esp32-c3-boards-into-arduino-ide).
4. Verify working with new ESP8266 core v3.0.0 and new ESP32 core v1.0.6
5. Suppress all warnings possible.
6. Add Table of Contents and Version String

### Release v1.0.3

1. Add support to ENC28J60 Ethernet module/shield using new **EthernetENC** library.
2. Update Platform.ini to support PlatformIO 5.x owner-based dependency declaration.
3. Enhance examples

#### Release v1.0.2

1. Fix crashing bug when Client timeout.
2. Make code more error-proof.
3. Drop support to ESP8266_AT_Webserver.
4. Enhance examples

#### Release v1.0.1

1. Add support to ENC28J60 Ethernet module/shield using **UIPEthernet** library.
2. Fix bugs
3. Optimize code
4. Enhance examples
5. Add UIPEthernet Library Patches for SAMD21/SAMD51

#### Release v1.0.0

1. Add support to **nRF52** boards, such as **AdaFruit Feather nRF52832, nRF52840 Express, BlueFruit Sense, Itsy-Bitsy nRF52840 Express, Metro nRF52840 Express, NINA_B302_ublox, NINA_B112_ublox, etc.**
2. Add support to **Adafruit SAMD51 (Itsy-Bitsy M4, Metro M4, Grand Central M4, Feather M4 Express, etc.)**
3. Add support to **Adafruit SAMD21 Itsy-Bitsy M0, Feathr M0, Metro M0, AdaFruit CIRCUITPLAYGROUND_EXPRESS, etc.)**
4. Add support to **Arduino SAMD21 (ZERO, MKR, NANO_33_IOT, etc.)**
5. Add support to all **STM32F/L/H/G/WB/MP1 (Nucleo-144 NUCLEO_F767ZI, Nucleo-64 NUCLEO_L053R8, etc.)**
6. Add support to **Seeeduino SAMD21/SAMD51 boards (SEEED_WIO_TERMINAL, SEEED_FEMTO_M0, SEEED_XIAO_M0, Wio_Lite_MG126, WIO_GPS_BOARD, SEEEDUINO_ZERO, SEEEDUINO_LORAWAN, SEEED_GROVE_UI_WIRELESS, etc.)**
7. Add support to **SAM DUE and AVR Mega** boards.
8. Add support to **ESP32/ESP8266** boards.
9. Add connectNonBlocking() function to use in loop() to avoid being blocked running other tasks.
10. Add support to WiFiNINA using [**WiFiNINA_Generic library**](https://github.com/khoih-prog/WiFiNINA_Generic) or WiFiNINA library.
11. Add support to W5x00 Ethernet module/shield using Ethernet, EthernetLarge, Ethernet2 or Ethernet3 library.
12. Add support to LAN8742A Ethernet module/shield using STM32Ethernet library.
13. Add support to ESP8266/ESP32-AT-command module/shield using [`WiFiEspAT library`](https://github.com/jandrassy/WiFiEspAT) or [`ESP8266_AT_WebServer library`](https://github.com/khoih-prog/ESP8266_AT_WebServer).
14. Add Packages' Patches.
15. Add sample Packages_Patches for **STM32F/L/H/G/WB/MP1** (Nucleo-144 NUCLEO_F767ZI, Nucleo-64 NUCLEO_L053R8)
16. Add Ethernet Library Patches
17. Add many examples


6 changes: 3 additions & 3 deletions library.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"name": "MySQL_MariaDB_Generic",
"version": "1.4.0",
"keywords": "Communication, Database, Storage, MySQL, MariaDB, wt32-eth01, Teensy, SAMD, SAM DUE, nRF52, W5x00, ENC28J60, Ethernet, wifi, wifinina, lan8720, rp2040, nano-33-iot, nano-rp2040-connect, QNEthernet, native-ethernet, rpi-pico, Arduino, AVR",
"description": "Connects to MySQL or MariaDB using ESP8266/ESP32, WT32_ETH01 (ESP32 + LAN8720A), nRF52, SAMD21/SAMD51, STM32F/L/H/G/WB/MP1, Teensy, SAM DUE, Mega, RP2040-based boards, etc. with W5x00, ENC28J60 Ethernet, Teensy 4.1 NativeEthernet/QNEthernet or WiFiNINA modules/shields. W5x00 can use Ethernet, EthernetLarge, Ethernet2 or Ethernet3 library. ENC28J60 can use either EthernetENC or UIPEthernet Library. Now accepting server's hostname, besides IPAddress",
"version": "1.5.0",
"keywords": "Communication, Database, Storage, MySQL, MariaDB, wt32-eth01, Teensy, SAMD, nRF52, W5x00, Ethernet, wifi, wifinina, lan8720, rp2040, nano-33-iot, nano-rp2040-connect, QNEthernet, native-ethernet, Portenta-H7, SAM DUE, ENC28J60, rpi-pico, Arduino, AVR",
"description": "Connects to MySQL or MariaDB using ESP8266/ESP32, WT32_ETH01 (ESP32 + LAN8720A), nRF52, SAMD21/SAMD51, STM32F/L/H/G/WB/MP1, Teensy, SAM DUE, Mega, RP2040-based boards, Portenta_H7, etc. with W5x00, ENC28J60 Ethernet, Teensy 4.1 NativeEthernet/QNEthernet, WiFiNINA modules/shields or Portenta_H7 WiFi/Ethernet. W5x00 can use Ethernet, EthernetLarge, Ethernet2 or Ethernet3 library. ENC28J60 can use either EthernetENC or UIPEthernet Library. Now accepting server's hostname, besides IPAddress",
"authors": [
{
"name": "Dr. Charles Bell",
Expand Down
4 changes: 2 additions & 2 deletions library.properties
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
name=MySQL_MariaDB_Generic
version=1.4.0
version=1.5.0
author=Dr. Charles Bell <chuck.bell@oracle.com>, Khoi Hoang <khoih.prog@gmail.com>
maintainer=Khoi Hoang <khoih.prog@gmail.com>
sentence=Connects to MySQL or MariaDB using ESP8266/ESP32, WT32_ETH01 (ESP32 + LAN8720A), nRF52, SAMD21/SAMD51, STM32F/L/H/G/WB/MP1, Teensy, SAM DUE, Mega, RP2040-based boards, etc. with W5x00 or ENC28J60 Ethernet, Teensy 4.1 NativeEthernet/QNEthernet or WiFiNINA modules/shields. W5x00 can use Ethernet, EthernetLarge, Ethernet2 or Ethernet3 library. ENC28J60 can use either EthernetENC or UIPEthernet Library
sentence=Connects to MySQL or MariaDB using ESP8266/ESP32, WT32_ETH01 (ESP32 + LAN8720A), nRF52, SAMD21/SAMD51, STM32F/L/H/G/WB/MP1, Teensy, SAM DUE, Mega, RP2040-based boards, Portenta_H7, etc. with W5x00, ENC28J60 Ethernet, Teensy 4.1 NativeEthernet/QNEthernet, WiFiNINA modules/shields or Portenta_H7 WiFi/Ethernet. W5x00 can use Ethernet, EthernetLarge, Ethernet2 or Ethernet3 library. ENC28J60 can use either EthernetENC or UIPEthernet Library.
paragraph=You can use this library to connect your Arduino project directly to a MySQL / MariaDB server without using an intermediate computer or a web-based or cloud-based service. Having direct access to a database server means you can store data acquired from your project as well as check values stored in tables on the server. This also means you can setup your own, local MySQL / MariaDB server to store your data further removing the need for Internet connectivity. If that is not an issue, you can still connect to and store data on a MySQL / MariaDB server via your network, Internet, or even in the cloud! Now accepting server hostname, besides IPAddress
category=Communication
url=https://github.com/khoih-prog/MySQL_MariaDB_Generic
Expand Down
19 changes: 17 additions & 2 deletions platformio/platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@
default_envs = SAMD
;default_envs = NRF52
;default_envs = STM32
;default_envs = portenta_h7_m7
;default_envs = portenta_h7_m4

[env]
; ============================================================
Expand All @@ -33,9 +35,12 @@ upload_speed = 921600
;monitor_speed = 9600
;monitor_port = COM11

; Checks for the compatibility with frameworks and dev/platforms
lib_compat_mode = strict

lib_deps =
; PlatformIO 4.x
WiFiNINA_Generic@~1.8.12
WiFiNINA_Generic@~1.8.13
WebServer_WT32_ETH01@~1.2.0
Ethernet@~2.0.0
EthernetLarge@~2.0.0
Expand All @@ -49,7 +54,7 @@ lib_deps =
; STM32duino LwIP@~2.1.2
;
; PlatformIO 5.x
; khoih.prog/WiFiNINA_Generic@~1.8.12
; khoih.prog/WiFiNINA_Generic@~1.8.13
; khoih.prog/WebServer_WT32_ETH01@~1.2.0
; PaulStoffregen/Ethernet@~2.0.0
; PaulStoffregen/EthernetLarge@~2.0.0
Expand All @@ -69,6 +74,16 @@ build_flags =
; comment the folowing line to enable WiFi debugging
; -D NDEBUG

[env:portenta_h7_m7]
platform = ststm32
board = portenta_h7_m7
framework = arduino

[env:portenta_h7_m4]
platform = ststm32
board = portenta_h7_m4
framework = arduino

[env:ESP8266]
platform = espressif8266
framework = arduino
Expand Down
11 changes: 6 additions & 5 deletions src/MySQL_Generic.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@
Library for communicating with a MySQL or MariaDB Server
Based on and modified from Dr. Charles A. Bell's MySQL_Connector_Arduino Library https://github.com/ChuckBell/MySQL_Connector_Arduino
to support nRF52, SAMD21/SAMD51, SAM DUE, STM32F/L/H/G/WB/MP1, ESP8266, ESP32, etc. boards using W5x00, ENC28J60, LAM8742A Ethernet,
WiFiNINA, ESP-AT, built-in ESP8266/ESP32 WiFi.
to support nRF52, SAMD21/SAMD51, SAM DUE, STM32F/L/H/G/WB/MP1, ESP8266, ESP32, WT32_ETH01, Teensy, Portenta_H7, etc. boards
using W5x00, ENC28J60, LAM8742A Ethernet, WiFiNINA, ESP-AT, built-in ESP8266/ESP32 WiFi, Portenta Ethernet/WiFi
The library provides simple and easy Client interface to MySQL or MariaDB Server.
Built by Khoi Hoang https://github.com/khoih-prog/MySQL_MariaDB_Generic
Licensed under MIT license
Version: 1.4.0
Version: 1.5.0
Version Modified By Date Comments
------- ----------- ---------- -----------
Expand All @@ -25,13 +25,14 @@
1.3.0 K Hoang 30/08/2021 Add support to Teensy 4.1 using NativeEthernet
1.3.1 K Hoang 31/08/2021 Remove unnecessary SPI-bus code in NativeEthernet examples
1.4.0 K Hoang 05/09/2021 Add support to Teensy 4.1 using QNEthernet
1.5.0 K Hoang 17/09/2021 Add support to Portenta_H7, using either WiFi or Vision-shield Ethernet
**********************************************************************************************************************************/

#ifndef MYSQL_GENERIC_H
#define MYSQL_GENERIC_H

#if ( USE_ETHERNET || USE_ETHERNET_LARGE || USE_ETHERNET2 || USE_ETHERNET3 || USE_ETHERNET_ENC || USE_ETHERNET_ESP8266 || \
USE_UIP_ETHERNET || USE_NATIVE_ETHERNET || USE_QN_ETHERNET || USE_CUSTOM_ETHERNET )
USE_UIP_ETHERNET || USE_NATIVE_ETHERNET || USE_QN_ETHERNET || USE_CUSTOM_ETHERNET || USE_ETHERNET_PORTENTA_H7 )

#include "MySQL_Generic_Ethernet.h"

Expand All @@ -40,7 +41,7 @@
#include "MySQL_Generic_WiFiNINA.h"

#elif ( ESP8266 || ESP32 || USING_WIFI_ESP8266_AT || USING_WIFININA_GENERIC || USING_WIFININA || USING_WIFIESPAT_LIB || \
USING_WIFI_CUSTOM )
USING_WIFI_CUSTOM || USE_WIFI_PORTENTA_H7 )

#include "MySQL_Generic_WiFi.h"

Expand Down
9 changes: 4 additions & 5 deletions src/MySQL_Generic_Connection.h
Original file line number Diff line number Diff line change
@@ -1,19 +1,17 @@
/*********************************************************************************************************************************
MySQL_Generic_Connection.h
This header file defines a connection class for connecting to a MySQL/MariaDB server.
Library for communicating with a MySQL or MariaDB Server
Based on and modified from Dr. Charles A. Bell's MySQL_Connector_Arduino Library https://github.com/ChuckBell/MySQL_Connector_Arduino
to support nRF52, SAMD21/SAMD51, SAM DUE, STM32F/L/H/G/WB/MP1, ESP8266, ESP32, etc. boards using W5x00, ENC28J60, LAM8742A Ethernet,
WiFiNINA, ESP-AT, built-in ESP8266/ESP32 WiFi.
to support nRF52, SAMD21/SAMD51, SAM DUE, STM32F/L/H/G/WB/MP1, ESP8266, ESP32, WT32_ETH01, Teensy, Portenta_H7, etc. boards
using W5x00, ENC28J60, LAM8742A Ethernet, WiFiNINA, ESP-AT, built-in ESP8266/ESP32 WiFi, Portenta Ethernet/WiFi
The library provides simple and easy Client interface to MySQL or MariaDB Server.
Built by Khoi Hoang https://github.com/khoih-prog/MySQL_MariaDB_Generic
Licensed under MIT license
Version: 1.4.0
Version: 1.5.0
Version Modified By Date Comments
------- ----------- ---------- -----------
Expand All @@ -27,6 +25,7 @@
1.3.0 K Hoang 30/08/2021 Add support to Teensy 4.1 using NativeEthernet
1.3.1 K Hoang 31/08/2021 Remove unnecessary SPI-bus code in NativeEthernet examples
1.4.0 K Hoang 05/09/2021 Add support to Teensy 4.1 using QNEthernet
1.5.0 K Hoang 17/09/2021 Add support to Portenta_H7, using either WiFi or Vision-shield Ethernet
**********************************************************************************************************************************/

/*********************************************************************************************************************************
Expand Down
13 changes: 6 additions & 7 deletions src/MySQL_Generic_Connection_Impl.h
Original file line number Diff line number Diff line change
@@ -1,19 +1,17 @@
/*********************************************************************************************************************************
MySQL_Generic_Connection_Impl.h
This file defines a connection class for connecting to a MySQL/MariaDB server.
Library for communicating with a MySQL or MariaDB Server
Based on and modified from Dr. Charles A. Bell's MySQL_Connector_Arduino Library https://github.com/ChuckBell/MySQL_Connector_Arduino
to support nRF52, SAMD21/SAMD51, SAM DUE, STM32F/L/H/G/WB/MP1, ESP8266, ESP32, etc. boards using W5x00, ENC28J60, LAM8742A Ethernet,
WiFiNINA, ESP-AT, built-in ESP8266/ESP32 WiFi.
to support nRF52, SAMD21/SAMD51, SAM DUE, STM32F/L/H/G/WB/MP1, ESP8266, ESP32, WT32_ETH01, Teensy, Portenta_H7, etc. boards
using W5x00, ENC28J60, LAM8742A Ethernet, WiFiNINA, ESP-AT, built-in ESP8266/ESP32 WiFi, Portenta Ethernet/WiFi
The library provides simple and easy Client interface to MySQL or MariaDB Server.
Built by Khoi Hoang https://github.com/khoih-prog/MySQL_MariaDB_Generic
Licensed under MIT license
Version: 1.4.0
Version: 1.5.0
Version Modified By Date Comments
------- ----------- ---------- -----------
Expand All @@ -27,6 +25,7 @@
1.3.0 K Hoang 30/08/2021 Add support to Teensy 4.1 using NativeEthernet
1.3.1 K Hoang 31/08/2021 Remove unnecessary SPI-bus code in NativeEthernet examples
1.4.0 K Hoang 05/09/2021 Add support to Teensy 4.1 using QNEthernet
1.5.0 K Hoang 17/09/2021 Add support to Portenta_H7, using either WiFi or Vision-shield Ethernet
**********************************************************************************************************************************/

/*********************************************************************************************************************************
Expand All @@ -50,8 +49,8 @@

#include <MySQL_Generic_Encrypt_Sha1.h>

#define MAX_CONNECT_ATTEMPTS 10 //5 //3
#define CONNECT_DELAY_MS 1000 //500
#define MAX_CONNECT_ATTEMPTS 10
#define CONNECT_DELAY_MS 1000
#define SUCCESS 1

/*
Expand Down
9 changes: 4 additions & 5 deletions src/MySQL_Generic_Debug.h
Original file line number Diff line number Diff line change
@@ -1,19 +1,17 @@
/*********************************************************************************************************************************
MySQL_Generic_Debug.h
This file defines debug functions for connecting to a MySQL/MariaDB server.
Library for communicating with a MySQL or MariaDB Server
Based on and modified from Dr. Charles A. Bell's MySQL_Connector_Arduino Library https://github.com/ChuckBell/MySQL_Connector_Arduino
to support nRF52, SAMD21/SAMD51, SAM DUE, STM32F/L/H/G/WB/MP1, ESP8266, ESP32, etc. boards using W5x00, ENC28J60, LAM8742A Ethernet,
WiFiNINA, ESP-AT, built-in ESP8266/ESP32 WiFi.
to support nRF52, SAMD21/SAMD51, SAM DUE, STM32F/L/H/G/WB/MP1, ESP8266, ESP32, WT32_ETH01, Teensy, Portenta_H7, etc. boards
using W5x00, ENC28J60, LAM8742A Ethernet, WiFiNINA, ESP-AT, built-in ESP8266/ESP32 WiFi, Portenta Ethernet/WiFi
The library provides simple and easy Client interface to MySQL or MariaDB Server.
Built by Khoi Hoang https://github.com/khoih-prog/MySQL_MariaDB_Generic
Licensed under MIT license
Version: 1.4.0
Version: 1.5.0
Version Modified By Date Comments
------- ----------- ---------- -----------
Expand All @@ -27,6 +25,7 @@
1.3.0 K Hoang 30/08/2021 Add support to Teensy 4.1 using NativeEthernet
1.3.1 K Hoang 31/08/2021 Remove unnecessary SPI-bus code in NativeEthernet examples
1.4.0 K Hoang 05/09/2021 Add support to Teensy 4.1 using QNEthernet
1.5.0 K Hoang 17/09/2021 Add support to Portenta_H7, using either WiFi or Vision-shield Ethernet
**********************************************************************************************************************************/

/*********************************************************************************************************************************
Expand Down
Loading

0 comments on commit 2bfd39d

Please sign in to comment.