Code Monkey home page Code Monkey logo

mqttclient's Introduction

MqttClient

A library implementing a Mqtt client for ESPs that can connect to your home mqtt server. It also handles wifi connection. Configuration, see below.

To use it, in your main cpp file you should have the setup routine call

MqttClient.startWiFi();
MqttClient.setInputCallback(ProgramManager::input);
MqttClient.setFocusCallback(ProgramManager::focus);
MqttClient.setRebootCallback(0);
MqttClient.init();

if you are using my program manager, which this thing is kind of designed to work with

Configuration

You'd obviously want to use your own wifi credentials and mqtt broker. For this, you simply need to create a header file "wificredentials.h" in a /config/ directory in your project root folder. (Note: for this to work, a certain folder structure is required. The library folder should be located at /path/to/your/project/lib/MqttClient)

An example configuration file can be found in MqttClient/include/wificredentials.h Just follow the instructions in the comments there.

Dependencies

This library was built using platform.io and the libraries ESP8266WiFi and PubSubClient

mqttclient's People

Contributors

victoriafoxgirl avatar

Watchers

 avatar

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.