Skip to content

Instantly share code, notes, and snippets.

View me-no-dev's full-sized avatar
🎯
Focusing

Me No Dev me-no-dev

🎯
Focusing
View GitHub Profile
#include "Arduino.h"
#include "esp_camera.h"
#include "ESPAsyncWebServer.h"
typedef struct {
camera_fb_t * fb;
size_t index;
} camera_frame_t;
#define PART_BOUNDARY "123456789000000000000987654321"
#define TRIAC_PIN 5
#define ZERO_CROSS_PIN 4
#define DEBOUNCE_TIME 9000 //9ms - 10ms is the pulse period
static uint32_t lastPulse = 0;
static uint16_t period = 5000; //5ms - 50% for each half wave
void ICACHE_RAM_ATTR onTimerISR(){
if(GPIP(TRIAC_PIN)){//OUTPUT is HIGH
GPOC = (1 << TRIAC_PIN);//low
@me-no-dev
me-no-dev / SIM900_Chatscript
Created March 15, 2016 08:00
PPP connection settings for Linux and SIM900
#save as /etc/chatscripts/sim900
ABORT "BUSY"
ABORT "VOICE"
ABORT "NO CARRIER"
ABORT "NO DIALTONE"
ABORT "NO DIAL TONE"
ABORT "NO ANSWER"
ABORT "DELAYED"
REPORT "CONNECT"
TIMEOUT 6
/*
ffmpeg -i "$file" -f s32be -acodec pcm_s32be -ar 44100 -af "volume=0.5" tcp://espip:5522
*/
#include "i2s.h"
#include <ESP8266WiFi.h>
const char* ssid = "***********";
const char* password = "**********";
WiFiServer pcmServer(5522);
static WiFiClient pcmClient;
@me-no-dev
me-no-dev / IP5306.ino
Last active September 4, 2023 08:22
Sketch with IP5306 integration
#include "Arduino.h"
#include "Wire.h"
/*
** IP5306 Power Module
*/
/* M5 Defaults
KeyOff: Enabled
BoostOutput: Disabled
#include <stdio.h>
#include <stdarg.h>
#include <stdlib.h>
#include <string.h>
int main(int argc, char *argv[]){
FILE * fp;
char *buffer;
long flen;
char *fname;
#include "WiFi.h"
#include "esp_wpa2.h"
#include "esp_wifi.h"
const char * ca_pem = "-----BEGIN CERTIFICATE-----\n"
"MIID3DCCA0WgAwIBAgIJANe5ZSCKoB8fMA0GCSqGSIb3DQEBCwUAMIGTMQswCQYD\n"
"VQQGEwJGUjEPMA0GA1UECAwGUmFkaXVzMRIwEAYDVQQHDAlTb21ld2hlcmUxFTAT\n"
"BgNVBAoMDEV4YW1wbGUgSW5jLjEgMB4GCSqGSIb3DQEJARYRYWRtaW5AZXhhbXBs\n"
"ZS5jb20xJjAkBgNVBAMMHUV4YW1wbGUgQ2VydGlmaWNhdGUgQXV0aG9yaXR5MB4X\n"
"DTE2MTEyMzAyNTUwN1oXDTE3MDEyMjAyNTUwN1owgZMxCzAJBgNVBAYTAkZSMQ8w\n"
#include <ESPAsyncWebServer.h>
#include "SPI.h"
#include "SD.h"
bool SD_exists(String path){
bool exists = false;
sd::File test = SD.open(path);
if(test){
test.close();
// Copyright 2015-2016 Espressif Systems (Shanghai) PTE LTD
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
#include <ESP8266WiFi.h>
#include <ESP8266mDNS.h>
#include <ArduinoOTA.h>
#include <FS.h>
#include <ESPAsyncTCP.h>
#include <ESPAsyncWebServer.h>
#include "SPI.h"
#include "SD.h"