Giter Site home page Giter Site logo

arduinopubsubclienttools's Issues

MqttWildcard

Hey Simon,
I find your implementation really really helpful.
The callbacks for subscribe and publish was exactly I was looking for.
So thanks a lot for this.

I have a small question though.
Could you provide an example for the MqttWildcard class you also have in here?
Thanks

Lennart

dont work

A sketch is published to the broker only once ("Hello World! - No. 1") and there are no more publications.
Although the serial monitor is full that the void publisher () function is executed cyclically with an interval of 2 seconds

Compilation error: 'function' in namespace 'std' does not name a template type

Hello,

I'm trying to use the library but I got:

In file included from /Users/xxx/Desktop/testar/src/main.cpp:1:0: /Users/xxx/Documents/Arduino/libraries/PubSubClientTools/PubSubClientTools.h:41:14: error: 'function' in namespace 'std' does not name a template type std::function<void(PUBSUBCLIENT_CALLBACK_PARAMETERS)> mqtt_callback = std::bind(&PubSubClientTools::callback, this, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3);

the compilation command:

/Applications/Arduino.app/Contents/Java/hardware/tools/avr/bin/avr-g++ -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -f data-sections -fno-threadsafe-statics -Wno-error=narrowing -MMD -flto -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10810 -DARDUINO_AVR_NANO -DARDUINO_ARCH_AVR -I/Application s/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino -I/Applications/Arduino.app/Contents/Java/hardware/arduino/avr/variants/eightanaloginputs -I/Users/xxx/Docume nts/Arduino/libraries/PubSubClientTools -I/Users/xxx/Documents/Arduino/libraries/PubSubClient/src /Users/xxx/Desktop/testar/build/sketch/main.cpp.cpp -o /Users/xxx/Deskto p/testar/build/sketch/main.cpp.cpp.o

Can you help, please?

Thanks.

How I can call funtions callback into a Class

I am trying to call the function "callback" into a Class, but it not work.

PubSubClientTools *clientMQTT;

......
clientMQTT->subscribe(TOPICO_SUBSCRIBE_CM_LAMP, MQTTClass::subscriber);//the problem is here
//clientMQTT->subscribe(TOPICO_SUBSCRIBE_CM_LAMP, std::bind(&MQTTClass::subscriber, this);//not work too
..........
void MQTTClass::subscriber(String topic, String message) {
MQTT_Call_buttonPress(bool(message), MQTT_S);
}
Does anyone know how I do 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.