Skip to content

Instantly share code, notes, and snippets.

View VNovytskyi's full-sized avatar
🏠
Working from home

Vladyslav Novytskyi VNovytskyi

🏠
Working from home
  • Kyiv, Ukraine
View GitHub Profile
@gmag11
gmag11 / mqtt_ssl_idf.ino
Last active February 26, 2024 10:13
Secure MQTT connection to broker with ESP32 and internal IDF mqtt client library
#include "Arduino.h"
#include <WiFi.h>
#include "esp_log.h"
#include "esp_system.h"
#include "esp_event.h"
#include "mqtt_client.h"
#define SECURE_MQTT // Comment this line if you are not using MQTT over SSL
#ifdef SECURE_MQTT
@shirish47
shirish47 / Timer_test.c
Created November 8, 2017 10:07
how to use freeRTOS timer API's in ESP32 (basic). Needed it for stoping advertisement after some time as There is not time out functionality.
#include <stdio.h>
#include "freertos/FreeRTOS.h"
#include "esp_log.h"
#include "freertos/timers.h"
#define TAG "TIME"
/* timer calls the function ping after interval time. xTimerCreate() takes interval in TICKs so
pdMS_TO_TICKS() converts ms interval to appropriate TICKS. pdTRUE will set timer to call periodically and if Set pdFALSE,
function is called once only */
@dhess
dhess / strrep.c
Created May 17, 2011 00:10
strrep - substring replacement in C
/*
* strrep.c - C substring replacement.
*
* Written in 2011 by Drew Hess <dhess-src@bothan.net>.
*
* To the extent possible under law, the author(s) have dedicated all
* copyright and related and neighboring rights to this software to
* the public domain worldwide. This software is distributed without
* any warranty.
*