-->
Page 1 of 1

SIM800 LIBRARY WITH FUNCTION POINTERS FOR NEWLY RECEIVED ?

PostPosted: Tue May 19, 2020 7:05 am
by DylanMateo
Does anyone know of a library that uses Function Pointers, sorry I don't know the correct term but something like an event, similar to the .on("/url",[](){}); in the Webserver library.

I don't want to have to be querying the device constantly to know if a new SMS has come in using the AT+CMGL but instead to poll the hardware Serial for unsolicited data such as +CMTI to call a function with data like phone number and text passed in as parameters. This should reduce power consumption and keep performance high if I'm not querying the modem constantly.

I just can't find a library that does this.

I've started writing my own but would rather use a library for it as it's a complicated topic and I'm bound to make some mistakes along the way.