Giter Site home page Giter Site logo

esputils's Introduction

ESPUtils

A library to make developing on ESP32 devices easy. Includes BLE Communitcation, LoRa Communication, OTA Updates, WiFi Management, a Salesforce connector** and other general Utilities. The library allows you to pick and choose functionality without having to include all the source thus saving memory on your device. The ESPUtils library resides in the include directory, you will find the source folder is empty.

** The SFManager could be absrtracted to be an OAuth bearer connector at a later date

Examples (WIP)

All Examples are inteded for use in PlatformIO. You can see the collection of examples to help get you started in the examples folder

Library

ESPUtils

This file is the heart of the library. By leveraging this class correctly, you will have all the features of this library at your fingertiips. All you need to do is call ESPUtils::loop() inside your main loop. By doing so, ESPUtils will call the XXXManager::loop() functions of the managers which have been selected for use.

Config

This file contains selectors to include library managers as well as stubbed out versions of the parameters those managers require to operate correctly. If you require functionality outside the utilities provided by ESPUtils.h, copy Config.h from the lib directory to the root of your project. The two files should be included in this order.

#include <ESPUtils.h>
#include <Config.h>

At the top or Config.h you will find the following set of #define statements. By uncommenting these lines, the corresponding manager will be activated and a global instance variable will be made availabe with the exception of the WiFiManager which is a static class.

//#define USE_BLE   // BLEMan   - Bluetooth advertising, connections and communication
//#define USE_LORA  // LoRaMan  - LoRa communication
//#define USE_OTA   // OTAMan   - Over the Air updates
//#define USE_SFRA  // SFMan    - Salesforce Auth and Remote Access
//#define USE_WIFI  // Static   - Non blocking stable WiFi access

BLEManager

LoRaManager

OTAanager

SFManager

The Salesforce manager is your simple connector to getting and maintaining an OAuth token. As mentioned at the top of the page, this class could be absrtracted to an OAuth bearer connector

WiFiManager

Helpers

UtilCommon

UtilMessage

Partition Tables

An ESP32โ€™s flash can contain multiple apps, as well as many different kinds of data (calibration data, filesystems, parameter storage, etc). How much memory is devoted to which use is configuraable through the use of partition tables.

A set of alternative partition tables as well as additional infomration can be found in the ESPUtils/partitions/README.md.

esputils's People

Contributors

jandolina avatar phando avatar

Stargazers

Joao Pinheiro avatar  avatar  avatar

Watchers

 avatar James Cloos avatar  avatar  avatar

esputils's Issues

Feature suggestion - configTime

Nice features and elegant implementation. The SalesForce functionality seems out of place for a library suggesting a utility purpose, but maybe this is useful for some.

One feature I consider almost essential, is the configuration of the clock by using NTP servers. Usually this is configured after the WiFi is connected. This code snippet would be nice to be able to include along with possibly a #define list of the timezone configurations as shown in the zones.csv linked below:

//Configure time
configTime(0, 3600, "pool.ntp.org", "time.nist.gov");

// See https://github.com/nayarsystems/posix_tz_db/blob/master/zones.csv for Timezone codes for your region
setenv("TZ", "GMT0BST,M3.5.0/01,M10.5.0/02", 1);
tzset();

It would be nice to have a bit more detail in the documentation, it is not obvious how to use the features. Overall though a very nice library. Thank you for sharing it!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.