Skip to content

Instantly share code, notes, and snippets.

/*======= ========= ========= ========= ========= ========= ========= =========
Project : ESProMatrix-USBPP
File : ESProMatrix-USBPP.ino
Date : 2019/05/01
Version : 0.0.1
Author : Samui Young
Company : Chipfans Technology Co.,Ltd.
MCU : NodeMCU ESP32-S
Details : Demo of USB power port
--------- --------- --------- --------- --------- --------- --------- ---------
# This code is written at BigVision LLC. It is based on the OpenCV project. It is subject to the license terms in the LICENSE file found in this distribution and at http://opencv.org/license.html
# Usage example: python3 object_detection_yolo.py --video=run.mp4
# python3 object_detection_yolo.py --image=bird.jpg
import cv2 as cv
import argparse
import sys
import numpy as np
from urllib.request import urlopen
import os
import cv2 as cv
import numpy as np
from urllib.request import urlopen
import os
import datetime
import time
import sys
#change to your ESP32-CAM ip
url="http://192.168.1.149:9601/stream"
@youjunjer
youjunjer / ESP32-CAM LineNotify
Created July 15, 2019 00:02
ESP32-CAM Send LineNotify
//Change Tools/Partition/Scheme to Minimal SPIFFS (Large APPS with OTA)
//IR sensor set at GPIO13
//Must Insert SD card
#include "esp_camera.h"
#include <WiFi.h>
#include "esp_timer.h"
#include "img_converters.h"
#include "Arduino.h"
#include "fb_gfx.h"
@youjunjer
youjunjer / gist:c2068b70f124ee657ef5561cc01902e6
Last active March 4, 2024 19:10
ESP32-CAM take pictures and HTTP POST file to server
//Change Tools/Partition/Scheme to Minimal SPIFFS (Large APPS with OTA)
//IR sensor set at GPIO13
//Must Insert SD card
#include "esp_camera.h"
#include <WiFi.h>
#include "esp_timer.h"
#include "img_converters.h"
#include "Arduino.h"
#include "fb_gfx.h"
@youjunjer
youjunjer / gist:b20f63fcf909862c7943dd955583916e
Last active September 5, 2020 19:48
ESP32-CAM Stream server, auto takepic and OTA
//Change Tools/Partition/Scheme to Minimal SPIFFS (Large APPS with OTA)
//IR sensor set at GPIO13
//Must Insert SD card
#include "esp_camera.h"
#include <WiFi.h>
#include "esp_timer.h"
#include "img_converters.h"
#include "Arduino.h"
#include "fb_gfx.h"
// This post referred to this git. I just trimmed cam and wifi part.
// https://github.com/v12345vtm/CameraWebserver2SD/blob/master/CameraWebserver2SD/CameraWebserver2SD.ino
#include "FS.h"
#include "SD_MMC.h"
//List dir in SD card
void listDir(fs::FS &fs, const char * dirname, uint8_t levels){
Serial.printf("Listing directory: %s\n", dirname);
@youjunjer
youjunjer / gist:1d3a9f22605d2c30b3e1abfde79f1a01
Last active May 6, 2020 08:52
Arduino ESP32 save DHT11 to Google Sheet by IFTTT
#include <WiFi.h>
#include <WiFiMulti.h>
#include <HTTPClient.h>
//pls use sketch/include library/manage library find simpledht by winlin
//or you can use another library
#include <SimpleDHT.h>
int pinDHT11 = 2; //set dht11 at pin2
SimpleDHT11 dht11(pinDHT11);
WiFiMulti wifiMulti;
@youjunjer
youjunjer / ESP32BeaconScan
Last active April 25, 2019 16:48
ArduinoBluetoothControl
#include <BluetoothSerial.h>
BluetoothSerial SerialBT;//宣告藍芽物件=SerialBT
void setup() {
// put your setup code here, to run once:
Serial.begin(9600);//序列視窗
SerialBT.begin("BLETEST");//<<藍芽廣播名稱,請自己記得
pinMode(4,OUTPUT);//風扇relay
pinMode(16,OUTPUT);//電燈relay
#include <BLEDevice.h>
#include <BLEUtils.h>
#include <BLEScan.h>
#include <BLEUUID.h>
#include <BLEAdvertisedDevice.h>
#include <BLEBeacon.h>
BLEScan* pBLEScan;
BLEBeacon id;
int scanTime = 3; //In seconds
String reverse(String str) {