This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//you need to connect to wifi first | |
void wifisendfile() | |
{ | |
String host="xxx.xxx.xxx.xxx";//your host name or ip | |
//prepare httpclient | |
Serial.println("Starting connection to server..."); | |
Serial.println(host); | |
WiFiClient client; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'從網址取得要查詢的ISBN | |
Dim isbn As String = Request.QueryString("isbn") | |
'宣告webclient物件 | |
Dim webClient1 As New System.Net.WebClient | |
'將isbn送到博客來查詢,並讀取網頁原始碼到result中 | |
dim result as String = webClient1.DownloadString("https://search.books.com.tw/search/query/key/" & isbn) | |
'找出書籍封面的網址位置 | |
dim PicUrl as String = result.Substring(result.IndexOf("https://im1.book.com.tw"), result.IndexOf("&", result.IndexOf("https://im1.book.com.tw")) - result.IndexOf("https://im1.book.com.tw")) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//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 file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//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 file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//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 file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" |
OlderNewer