如果已註冊過,想查詢本身的公私鑰:
https://www.google.com/recaptcha/admin#list
還沒註冊過的,下面三步驟建立Google reCAPTCHA~
zahinjtsog256 發表在 痞客邦 留言(0) 人氣()

展示網址:點我旁觀

zahinjtsog256 發表在 痞客邦 留言(0) 人氣()
影片
伺服馬達接線圖


黃線 接 GPIO27 、 紅線 接 5V 、 黑線 接 GND
ESP32 電力只能鞭策一個馬達,若是要鞭策兩個馬達就要外接電源了
程式碼
- #include <Servo.h>
- Servo myservo; // 確立伺服馬達節制
-
- // 伺服馬達的毗鄰 GPIO
- static const int servoPin = 27;
- int pos = 0;
- void setup() {
- // put your setup code here, to run once:
- myservo.attach(servoPin); // 將伺服馬達毗鄰的GPIO pin連接伺服物件
- Serial.begin(115200);//序列阜連線速率
- }
-
- void loop() {
- // put your main code here, to run repeatedly:
- if(Serial.available()){ //
- int num = Serial.parseInt(); // case 前置 num(數字鍵)
-
- switch(num) { //
-
- case 1 : //1~9
- for(pos = 0; pos < 180; pos += 1) // 一度一度由 0 度扭轉到 180 度
- myservo.write(pos);
- delay(200);
- break;
-
- case 2 : // 1~9
- for(pos = 180; pos>=1; pos-=1) // 一度一度由 180 度旋轉到 0 度
- myservo.write(pos);
- delay(200);
- break;
- }
- }
- }
zahinjtsog256 發表在 痞客邦 留言(0) 人氣()
測試框架
昨天有寫出一些陽春的測試程式。固然夠用,但如果要做進階的測試方法或是闡發測試進程,顯然要實作出更多功能才能符合需求。但不消擔憂,開源的世界裡有異常多前輩,實作出專為測試利用的框架,讓我們寫測試可以輕鬆許多。
zahinjtsog256 發表在 痞客邦 留言(0) 人氣()
記實一下批量抓取 Google 搜索效果裡的保持的方法。
若是還沒有安裝以下,要先下載安裝:
- pip install beautifulsoup4
- pip install google
zahinjtsog256 發表在 痞客邦 留言(0) 人氣()
zahinjtsog256 發表在 痞客邦 留言(0) 人氣()
以下有兩個大項目需要設定,依序為:
若何申請Google Maps API金鑰?
如何啟用Google Maps API辦事?
zahinjtsog256 發表在 痞客邦 留言(0) 人氣()
為了將圖片數據轉換為合適 AI練習的格局,哄騙 OpenCV先對臉部進行辨識,然後將面部數據另存為同一的花樣。
- import cv2
-
- face_cascade = cv2.CascadeClassifier('./cascades/haarcascade_frontalface_default.xml')
- eye_cascade = cv2.CascadeClassifier('./cascades/haarcascade_eye.xml')
-
- def detect(filename):
- img = cv2.imread(filename)
- gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)
- faces = face_cascade.detectMultiScale(gray,
- scaleFactor=1.2,
- minNeighbors=3,)
- for (x,y,w,h) in faces:
- roi_gray = gray[y:y+h, x:x+w]
- eyes = eye_cascade.detectMultiScale(roi_gray,
- scaleFactor=1.02,
- minNeighbors=3,
- minSize=(40,40),)
- img = cv2.rectangle(img,(x,y),(x+w,y+h),(255,0,0),2)
- for (ex,ey,ew,eh) in eyes:
- img = cv2.rectangle(img,(x+ex,y+ey),(x+ex+ew,y+ey+eh),(0,255,0),2)
- cv2.imwrite('./tzuyu_face.jpg', img)
-
- detect('tzuyu.jpg')
zahinjtsog256 發表在 痞客邦 留言(0) 人氣()
進入OUTLOOK->帳戶設定
1.新增帳戶

zahinjtsog256 發表在 痞客邦 留言(0) 人氣()
用ESP32 PWM實現LED漸漸亮起。網頁設計
程式的部分首要分成三個:1.設定頻道LEDchannel、2.附加到PIN腳、3.決議輸出大小。
1.設定頻道LEDchannel屬性
ledcSetup(LEDChannel, freq, resolution);
//LEDChannel設定為0,分歧輸出要設定到不同頻道,例如RGB LED就要開三個頻道別離辦理R、G、B
//freq輸出頻率,建議值5000 Hz
//resolution代表輸出解析度,例如8代表0-255,10代表0-1023
2.附加到PIN腳
ledcAttachPin(ledPin, LEDChannel);
//ledPin代表腳位,看你把裝備接在哪個腳位上面
//LEDchannel代表步驟1所宣告的LEDchannel,也就是說把設定好的LEDchannel屬性附加到某個腳位上
3.決定輸出大小。
ledcWrite(LEDChannel, dutyCycle);
//將LEDchannel輸出dutyCycle的值。網頁設計
範例程式將使接在Pin16的LED逐步亮起並熄滅,典範複製於 https://randomnerdtutorials.com/esp32-pwm-arduino-ide/


- // the number of the LED pin
- const int ledPin = 16; // 16 corresponds to GPIO16
-
- // setting PWM properties
- const int freq = 5000;
- const int ledChannel = 0;
- const int resolution = 8;
-
- void setup(){
- // configure LED PWM functionalitites
- ledcSetup(ledChannel, freq, resolution);
-
- // attach the channel to the GPIO to be controlled
- ledcAttachPin(ledPin, ledChannel);
- }
-
- void loop(){
- // increase the LED brightness
- for(int dutyCycle = 0; dutyCycle <= 255; dutyCycle++){
- // changing the LED brightness with PWM
- ledcWrite(ledChannel, dutyCycle);
- delay(15);
- }
-
- // decrease the LED brightness
- for(int dutyCycle = 255; dutyCycle >= 0; dutyCycle--){
- // changing the LED brightness with PWM
- ledcWrite(ledChannel, dutyCycle);
- delay(15);
- }
- }
zahinjtsog256 發表在 痞客邦 留言(0) 人氣()