Cov txheej txheem:

Google Tshawb Fawb ntawm ESP32: 7 Cov Kauj Ruam
Google Tshawb Fawb ntawm ESP32: 7 Cov Kauj Ruam

Video: Google Tshawb Fawb ntawm ESP32: 7 Cov Kauj Ruam

Video: Google Tshawb Fawb ntawm ESP32: 7 Cov Kauj Ruam
Video: Hmoob lub npe raug Tshawb fawb txog 100,000,00leej neeg toj /minute hauv Internet & Google 2024, Hlis ntuj nqeg
Anonim
Google Tshawb Nrhiav ntawm ESP32
Google Tshawb Nrhiav ntawm ESP32

Hauv qhov kev qhia no kuv yuav qhia koj yuav ua li cas tshawb hauv google nrog ESP32. Qhov tshwm sim nws tus kheej tsis muaj txiaj ntsig zoo vim tias qhov kev tshawb fawb tshawb pom muaj nyob hauv lub koos pij tawj saib hauv lub computer, tab sis nws yog qhov txias ua thiab qhia lub zog ntawm ESP32. Cov cai tuaj yeem txhim kho los tsim lub vev xaib mini ntawm ESP32 thiab luam tawm ntawm lub vijtsam LCD piv txwv.

Hauv qhov kev qhia no, Kuv yuav siv ESP32 pawg thawj coj nrog 4 MB ntawm PSRAM kom ntseeg tau tias muaj lub cim xeeb txaus. Qhov no tuaj yeem muaj txiaj ntsig los rub tawm html code ntawm cov chaw pom.

Khoom siv

- ESP32 Pawg Thawj Coj nrog sab nraud RAM zoo li uPesy ESP32 Wrover DevKit

- Arduino IDE lossis PlatformIO nrog esp32 txuas txuas ntxiv

- Tus lej Google

Kauj Ruam 1: Rub Cov Ntawv HTML lossis JSON Cov Ntaub Ntawv: Txoj Kev Zoo thiab Qhov Tsis Zoo

Txoj hauv kev yooj yim tshaj plaws los tshawb nrhiav google yog rub tawm nplooj ntawv HTML los ntawm qhov url: https://www.google.com/search?q=esp32, nrog koj cov lus nug tom qab q =

Nov yog txoj hauv kev tsis zoo rau qee qhov laj thawj:

  • Nws nyuaj rau cais (rho tawm cov ntaub ntawv), vim tias tsis muaj HTML parser rau ESP32. Yog li koj yuav tsum nrhiav kom raug HTML cim npe, tshem cov hlua, …: cov cai yuav tsis meej.
  • Nws tsis yog cov ntaub ntawv muaj txiaj ntsig: Koj yuav tsum rub tawm tag nrho nplooj ntawv HTML nrog javascript thiab css cov ntawv tsuas yog rub tawm cov ntawv me me. Qhov loj ntawm nplooj ntawv HTML nyob ib puag ncig 300KB, ESP32 tsis muaj lub cim xeeb txaus los rub tawm nplooj ntawv html ib zaug (ua tau tsuas yog nrog PSRAM sab nraud).
  • Koj tuaj yeem raug blacklisted los ntawm Google: Yog tias koj tshawb fawb ntau dhau sai, Google yuav txiav txim siab koj li tus bot thiab hmoov zoo los daws qhov captcha ntawm ESP32.

Txoj hauv kev zoo yog siv Google tshawb fawb API uas rov ua JSON cov ntaub ntawv. JSON cov ntaub ntawv tuaj yeem yooj yim txheeb xyuas ntawm ESP32 nrog cov tsev qiv ntawv zoo li ArduinoJson. Nws yuav yooj yim heev nrog txoj hauv kev no txhawm rau nthuav tawm cov txiaj ntsig tshawb fawb.

Kauj Ruam 2: Tsim Kev Tshawb Fawb

Tsim Kev Tshawb Fawb
Tsim Kev Tshawb Fawb
Tsim Kev Tshawb Fawb
Tsim Kev Tshawb Fawb

Ua ntej, peb yuav tsum tsim kev cai tshawb fawb cav hauv koj tus lej Google:

  • Mus rau
  • Ntxiv www.google.com rau "Chaw los tshawb nrhiav"
  • Hloov lus yog koj xav tau
  • Npe koj lub cav tshawb fawb thiab nyem rau ntawm "Tsim"

Kauj Ruam 3: Tshawb Nrhiav Tshuab Kho

Nrhiav cav Configuration
Nrhiav cav Configuration
Nrhiav cav Configuration
Nrhiav cav Configuration
Nrhiav cav Configuration
Nrhiav cav Configuration

Mus rau ntawm lub vaj huam sib luag tswj ntawm lub tshuab tshawb nrhiav txhawm rau hloov pauv tsis:

  • Pab kom "Tshawb nrhiav tag nrho lub vev xaib"
  • Koj tuaj yeem hloov cov lus lossis thaj av, pab ua cov duab
  • Tau txais Kev Tshawb Fawb ID, nws yuav muaj txiaj ntsig zoo rau cov kauj ruam tom ntej

Scroll cia kom txog thaum "Programmatic Acces" thiab nyem rau "Pib"

Kauj Ruam 4: Tau API Key

Tau txais API Ntsiab
Tau txais API Ntsiab
Tau txais API Ntsiab
Tau txais API Ntsiab
Tau txais API Ntsiab
Tau txais API Ntsiab

Koj yuav tsum yog tam sim no ntawm https://developers.google.com lub vev xaib:

  • Nyem rau "Tau txais tus yuam sij"
  • Sau lub npe Project
  • Luam koj tus lej API

Kauj Ruam 5: Xeem API

Xeem API
Xeem API

Tam sim no peb tuaj yeem sim API, URL yog raws li hauv qab no:

customsearch.googleapis.com/customsearch/v1?key=YOUR_API_KEY&cx=YOUR_SEARCH_ENGINE_ID&q=esp32

Hloov "YOUR_API_KEY" thiab "YOUR_SEARCH_ENGINE_ID" los ntawm koj li.

Hauv koj lub vev xaib, mus rau qhov url no, koj yuav tsum pom qhov tshwm sim Json cov ntaub ntawv nrog google tshawb pom cov txiaj ntsig zoo li hauv lub screenshot.

Cov npe ntawm txhua qhov tsis muaj nyob ntawm no

Kauj Ruam 6: Nruab ArduinoJson Library

Nruab ArduinoJson Library
Nruab ArduinoJson Library

Txhawm rau cais cov ntaub ntawv JSON, peb yuav siv ArduinoJson lub tsev qiv ntawv.

Mus rau Tus Thawj Saib Xyuas Tsev Qiv Ntawv hauv Arduino IDE, thiab ntaus ArduinoJson. Nruab ib lub tsev qiv ntawv raug cai "ArduinoJson los ntawm Benoit Blanchon".

Nrog koj zoo siab, txhua qhov teeb tsa tau ua tiav.

Kauj Ruam 7: Rub lub Sketch thiab Tshawb hauv Google

Rub tawm Sketch thiab Tshawb hauv Google
Rub tawm Sketch thiab Tshawb hauv Google

Rau cov kauj ruam kawg no:

  • Download tau daim duab.
  • Ntxiv koj li WiFi tsim, koj tus lej API thiab koj tus lej ID cav.
  • Ua ke cov duab kos thiab siv cov npe sib luag los xa koj cov lus nug.

Ntau cov lus qhia ntawm kuv lub vev xaib: upesy.com

Pom zoo: