Skip to content

Instantly share code, notes, and snippets.

bool checkUnreadMessage(bool changeStatusToRead = true, SMSARRAY {Takes a pointer to array of SMS structs} , uint8_t skip = 0,uint8_t limit = 10 ){
sendAT(GF("+CMGL=\"REC UNREAD\","), static_cast<const uint8_t>(!changeStatusToRead));
if (waitResponse(5000L, GF(GSM_NL "+CMGL: \"")) != 1) {
stream.readString();
return {};
}
// read Messages from this
use skip and limit to control what messages to be filled in the sms pointer
// SMSARRAY.push(SMS)
const char HTTPSERVER_GET_REQUEST_TEMPLATE[] PROGMEM =
"GET %s HTTP/1.1\r\n"
"Host: %s\r\n"
"User-Agent: KIOTDevice\r\n"
"Connection: keep-alive\r\n"
"Content-Type: application/json\r\n"
"\r\n";
void _httpGetRaw(String path) {
if (_http_client == NULL) {