Skip to content
Zheng-Bote edited this page Mar 20, 2022 · 6 revisions

ESP32 libraries

(Arduino) libraries for ESP32 which maybe are usefull)

Note that master is generally a work in progress, and you probably want to use a tagged release version.


TITLE:

rz_action.h

BRIEF:

header only library

DESC:

Arduino library for ESP32, just provides some (LOra) functions

  • don't use, deprecated

SOURCE:

https://github.com/Zheng-Bote/esp32_libs

SYNTAX:

#include "rz_action.h"

RETURN:

void

HISTORY:

Version Date Developer Comments
0.0.1 2019-10-05 RZheng created
0.0.2 2019-10-06 RZheng added: rz_action_msg_rcv()

TITLE:

rz_aes.h

BRIEF:

header only library

DESC:

Arduino library for ESP32, encrypt AES128

  • don't use, deprecated

SOURCE:

https://github.com/Zheng-Bote/esp32_libs

SYNTAX:

#include "rz_aes.h"

RETURN:

void

HISTORY:

Version Date Developer Comments
0.0.1 2018-11-02 RZheng created

TITLE:

rz_asyncwebserver.h

BRIEF:

header only library

DESC:

Arduino library for ESP32, async webserver

  • don't use, deprecated

SOURCE:

https://github.com/Zheng-Bote/esp32_libs

SYNTAX:

#include "rz_asyncwebserver.h"

RETURN:

void

HISTORY:

Version Date Developer Comments
0.0.1 2018-10-13 RZheng created

TITLE:

rz_bme680.h

BRIEF:

Arduino lib for ESP32 BME680 sensor

DESC:

Arduino ESP32 library for BME680 sensor (temperature, humidity, pressure, gas)

SOURCE:

https://github.com/Zheng-Bote/ESP32_libs

SYNTAX:

#include "rz_bme680.h" | #include "ESP32/rz_bme680.h"

RZ_BME680 *bme680sensor = new RZ_BME680();
bme680sensor->readData();
if(bme680sensor->getSensorStatus()) {
    Serial.println("\n-- BME680 sensor failed.\n");
}
else {
    Serial.print("-- Temperature: "); Serial.println(bme680sensor->getTemperature());
    Serial.print("-- Humidity: "); Serial.println(bme680sensor->getHumidity());
    Serial.print("-- Pressure: "); Serial.println(bme680sensor->getPressure());
    Serial.print("-- Gas: "); Serial.println(bme680sensor->getGas());
}

RETURN:

void readData();
String getTemperature();
String getHumidity();
String getPressure();
String getGas();
bool getSensorStatus();

HISTORY:

Version Date Developer Comments
1.0.0 2022-02-27 RZheng created

TITLE:

rz_dht.h

BRIEF:

library

DESC:

Arduino lib for ESP32 DHT11, DHT22 (AM2302), DHT21 (AM2301) Sensors

SOURCE:

https://github.com/Zheng-Bote/esp32_libs

SYNTAX:

#include "rz_dht.h"
RZ_DHT *dhtsensor = new RZ_DHT();

void readData();
String getTemperature();
String getHumidity();
bool getSensorStatus();

RETURN:

void // read current sensor data
String temperature // 23.15 // °C
String humidity // 45.55 // %
bool error // true = sensor error, false = sensor reading ok

HISTORY:

Version Date Developer Comments
1.0.0 2022-02-26 RZheng created
1.1.0 2022-02-27 RZheng fixed: some low quality DHT sensors needs 1 second pause

TITLE:

rz_http.h

BRIEF:

library

DESC:

Arduino lib for ESP32 http client. Gets the current firmware version on Github

SOURCE:

https://github.com/Zheng-Bote/ESP32_libs

SYNTAX:

#include "rz_http.h"
#include "rz_version.h"

RZ_HTTP *httpclient = new RZ_HTTP();
RZ_Version *versions = new RZ_Version();

checkVersion(versions->checkVersions(appVersion, httpclient->checkFirmware()));  

RETURN:

std::string checkFirmware();
std::string getUpdVersion();

HISTORY:

Version Date Developer Comments
1.0.0 2022-02-26 RZheng created

TITLE:

rz_http.h

BRIEF:

header only library

DESC:

Arduino lib for ESP32 Lora

  • don't use, deprecated

SOURCE:

https://github.com/Zheng-Bote/ESP32_libs

SYNTAX:

--

RETURN:

--

Version Date Developer Comments
0.0.3 2019-10-06 RZheng created

TITLE:

rz_mqtt.h

BRIEF:

header only library

DESC:

Arduino library for ESP32, with some MQTT client functionalities (publish, subscribe)
DEPENDENCIES:
- PubSubClient

Topic begins allways with ESP32/ESP32-<Chip-ID> where "Chip-ID" = Mac-Address

publishing:
- ESP32/ESP32-<Chip-ID>/status  // NTP time during boot/setup
- ESP32/ESP32-<Chip-ID>/temperature
- ESP32/ESP32-<Chip-ID>/humidity

subscribing:
- ESP32/ESP32-<Chip-ID>/get_temperature
- ESP32/ESP32-<Chip-ID>/get_humidity

SOURCE:

https://github.com/Zheng-Bote/ESP32_libs

SYNTAX:

#include "rz_mqtt.h"

int rz_mqttclient_start(std::string hostId)
bool rz_mqtt_sendMsg(std::string mqtt_topic, char mqtt_msg[])

HISTORY:

Version Date Developer Comments
0.1.0 2019-10-27 RZheng created
0.4.0 2022-03-26 RZheng baseMac removed
1.0.0 2022-02-27 RZheng some small corrections and code updates; finalized

TITLE:

rz_ota.h

BRIEF:

header only library

DESC:

Arduino library for ESP32 OTA firmware update
Dependencies:
#include <HTTPClient.h>
#include <WiFi.h>
#include <Update.h>
#include "credentials.h" // see ESP32_libs/credentials.h

SOURCE:

https://github.com/Zheng-Bote/esp32_libs

SYNTAX:

#include "rz_ota.h"
rz_EspFwUpd();

RETURN:

void

HISTORY:

Version Date Developer Comments
0.0.2 2018-10-14 RZheng created
0.1.0 2022-03-19 RZheng added, cleared: custom vals to credentials.h, dirty code a little bit cleared

TITLE:

rz_sim808.h

BRIEF:

header only library

DESC:

Arduino library for ESP32 send / receive SMS

  • don't use, deprecated

SOURCE:

https://github.com/Zheng-Bote/esp32_libs

SYNTAX:

#include "rz_sim808.h"

RETURN:

void

HISTORY:

Version Date Developer Comments
0.0.1 2018-10-28 RZheng created

TITLE:

rz_snippets.h

BRIEF:

header only library

DESC:

Arduino library for ESP32 with some system related functions

  • don't use, deprecated

SOURCE:

https://github.com/Zheng-Bote/esp32_libs

SYNTAX:

#include "rz_snippets.h"

RETURN:

void

HISTORY:

Version Date Developer Comments
0.0.1 2018-10-13 RZheng created

TITLE:

rz_system.h

BRIEF:

library

DESC:

Arduino library for ESP32 systems

SOURCE:

https://github.com/Zheng-Bote/ESP32_libs

SYNTAX:

#include "ESP32/rz_system.h"
RZ_System *esp32System = new RZ_System();

RETURN:

void doRestart();
void doReset();
uint8_t getChipRevision();
uint8_t getCpuFreqMHz();
uint32_t getFlashChipSize();
std::string getHostId();
std::string getHostName();
uint64_t getChipId();
uint16_t getChip();
void doStartDeepSleep(unsigned long long TIME_TO_SLEEP);
void ntpLocalTime(char *ntpServer, long gmtOffset_sec, int daylightOffset_sec);
std::string getDateTimeString();

HISTORY:

Version Date Developer Comments
1.0.0 2022-02-26 RZheng created
1.1.0 2022-02-27 RZheng changed: deep sleep TIME_TO_SLEEP changed from int to unsigned long long
1.1.1 2022-02-27 RZheng fixed: hostname / MAC-Address

TITLE:

rz_version.h

BRIEF:

header only library

DESC:

Arduino library, compares two semantic version strings
- based on a function developed by Pankaj Choudhary. Unfortunately I've lost the contact and his website. Please contact me 

SOURCE:

https://github.com/Zheng-Bote/ESP32_libs

SYNTAX:

#include "rz_version.h"
RZ_Version *versions = new RZ_Version();
int ret = versions->checkVersions("1.0.0", "1.1.0");

RETURN:

int
0: version 1 is equal version 2 (ok)
1: version 1 is greater than version 2 (older version)
2: version 1 is smaller than version 2 (update available)

HISTORY:

Version Date Developer Comments
    |            | Pankaj Choudhary | main function developed

1.0.0 | 2022-02-26 | RZheng | lib created


TITLE:

rz_webserver.h

BRIEF:

header only library

DESC:

Arduino library for ESP32, just provides the html content

SOURCE:

https://github.com/Zheng-Bote/esp32_libs

SYNTAX:

#include "ESP32/rz_webserver.h"
webServer.on("/", handleRoot);

RETURN:

void

HISTORY:

Version Date Developer Comments
0.1.0 2022-02-26 RZheng created
1.0.0 2022-02-27 RZheng lib created

TITLE:

rz_websocket.h

BRIEF:

header only library

DESC:

Arduino library for ESP32, just provides the html content
* don't use, deprecated

SOURCE:

https://github.com/Zheng-Bote/esp32_libs

SYNTAX:

#include "rz_websocket.h"
void rz_webserver_start()

RETURN:

void

HISTORY:

Version Date Developer Comments
0.0.2 2018-10-14 RZheng created

TITLE:

rz_wifi.h

BRIEF:

library

DESC:

Arduino library for ESP32 for etablsihing WiFi network

SOURCE:

https://github.com/Zheng-Bote/ESP32_libs

SYNTAX:

#include "ESP32/rz_wifi.h" RZ_WiFi *wifi = new RZ_WiFi(char *ssid, char *password);

bool wifi->startWiFi(); IPAddress wifi->getIpAddr(); bool wifi->startMDNS(std::string hostId);

RETURN:

void

HISTORY:

Version Date Developer Comments
0.1.0 2019-10-27 RZheng created
0.3.0 2022-02-26 RZheng modified
1.0.0 2022-02-27 RZheng finalized
1.1.0 2022-03-19 RZheng Constructor for manual WiFi or WiFiManager
Clone this wiki locally