Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [callbacks]

This refer to the call back procedure in computer programming.

1
vote
0answers
53 views

Passing non-static member function using bind

I'm using the GxEPD2 library to communicate with an E-Paper display. I now wanted to use the drawPaged method of this library with an object display. I also have written my own class from which I ...
0
votes
1answer
50 views

Using timer classes within classes

I am trying to develop a class for a pump that works on a stepper motor, it should be simple but its not working the way I thought it would. Once I move the timer object into the class the code wont ...
3
votes
2answers
2k views

How to pass variables to custom callback functions

I want to use the Ticker library of the ESP8266 Arduino core to (asynchronously) delay the switch of a pin to a desired state like below. I am note sure about the "here is" function definitions and I ...
0
votes
1answer
521 views

ESP8266 ASyncTCP class example

I am new to ESP programming on Arduino, as before I was developing on eLua. There were some memory problems in Lua, so I decided to move to Arduino. After looking at some examples, I found a library ...
0
votes
1answer
217 views

Typedef Function Pointer Invoking Issue

I'm having an issue trying to use a normal non-member function of my main sketch file as a callback. I can't get the function pointer to invoke from a function other than it was saved. More info ...
4
votes
2answers
6k views

User callback functions

I want to write a class that allows the user to attach his own function to a member function that listens for messages coming from a wireless module, so that the user's function can be called ...
3
votes
1answer
3k views

What are the parameters of the browseUrl() callback in the Ethercard library?

I'm reading a code that uses Arduino as a webclient and when he tries to catch the info from the site, he uses a callback with the following parameters: static void response_callback (byte status, ...
2
votes
0answers
1k views

Non-blocking MQTT library

Are there any MQTT libraries that do not block while connecting? I'm currently using PubSubClient, and the connection part contains this code: https://github.com/knolleary/pubsubclient/blob/master/...
1
vote
1answer
2k views

Pass class's public function as an argument to external command

I am trying to write a library for encoders. main.ino: #include <./Encoders.h> Encoders encoders(); void setup(){ Serial.begin(9600); } void loop(){ Serial.print(""); ...
0
votes
4answers
600 views

Array of Strings and Callbacks

I am trying to create an array of structs that contain pairs of Strings and Callbacks the problem I am having is assigning the callback function. I have the following code: #define UI_ROUTINE_ITEMS ...