Cov txheej txheem:

Stemma Hws noo thiab Kub Sensor: 5 Kauj Ruam
Stemma Hws noo thiab Kub Sensor: 5 Kauj Ruam

Video: Stemma Hws noo thiab Kub Sensor: 5 Kauj Ruam

Video: Stemma Hws noo thiab Kub Sensor: 5 Kauj Ruam
Video: Welcome to Cognouza | Critical Role | Campaign 2, Episode 137 2024, Kaum ib hlis
Anonim
Stemma Hws noo thiab Kub Sensor
Stemma Hws noo thiab Kub Sensor

Lub Stemma Av Sensor siv ib qho kev sojntsuam txhawm rau txheeb xyuas cov dej noo hauv cov nroj tsuag. Nws tseem tuaj yeem ntsuas qhov kub ib puag ncig los ntawm lub ntsuas kub sab hauv ntawm lub microcontroller. Cov cuab yeej no tsis xav tau cov laug.

Khoom siv

Stemma Av Sensor

JST PH 4 -Pin rau Txiv Neej Header Cable - I2C STEMMA Cable - 200mm

Arduino Ib

Hwj chim Source

Kauj Ruam 1: Qhov Chaw Yuav Koj Cov Khoom Siv

Qhov Yuav Yuav Koj Cov Khoom Siv
Qhov Yuav Yuav Koj Cov Khoom Siv
Qhov Yuav Yuav Koj Cov Khoom Siv
Qhov Yuav Yuav Koj Cov Khoom Siv
Qhov Yuav Yuav Koj Cov Khoom Siv
Qhov Yuav Yuav Koj Cov Khoom Siv
Qhov Yuav Yuav Koj Cov Khoom Siv
Qhov Yuav Yuav Koj Cov Khoom Siv

Txhawm rau ua haujlwm lub ntsuas dej noo, koj yuav tsum muaj:

Stemma Av Sensor (https://www.adafruit.com/product/4026)

Arduino (Kuv xaiv siv Uno tab sis qhov no tuaj yeem sib pauv tau) (https://www.mouser.com/ProductDetail/Arduino/A0000…)

JST PH 4 -Pin rau Txiv Neej Header Cable - I2C STEMMA Cable - 200mm (https://www.adafruit.com/product/3955)

Cov cuab yeej ua kom muaj zog (Kuv siv Macbook Pro tab sis qhov no tuaj yeem sib pauv nrog txhua lub zog ntaus ntawv) (https://www.apple.com/macbook-pro/?afid=p238%7Cskx…)

Kauj Ruam 2: Lub Stemma Sensor

Lub Stemma Sensor
Lub Stemma Sensor
Lub Stemma Sensor
Lub Stemma Sensor
Lub Stemma Sensor
Lub Stemma Sensor

Thaum koj pib txuas cov khoom, pib nrog Stemma Sensor thiab JST PH 4-Pin rau Txiv Neej Header Cable. Txuas cov no ua ke ua ntej koj txuas ib lub xov hlau rau Arduino.

Kauj ruam 1:

Txuas cov xaim liab mus rau lub hwj chim. Nco ntsoov tias koj siv tib qhov hluav taws xob uas lub microcontroller logic ua raws. Rau feem ntau ntawm Arduino, uas yog 5V. Yog tias koj muaj 3.3V cov laj thawj, siv 3V.

Kauj ruam 2:

Txuas cov xaim dub mus rau lub zog/cov ntaub ntawv hauv av.

Kauj ruam 3:

Txuas cov xaim ntsuab rau A5.

Kauj ruam 4:

Txuas cov xaim dawb rau A4.

Kauj Ruam 3: Teeb Arduino

Teeb tsa Arduino
Teeb tsa Arduino
Teeb tsa Arduino
Teeb tsa Arduino
Teeb tsa Arduino
Teeb tsa Arduino
Teeb tsa Arduino
Teeb tsa Arduino

Nws yog qhov tseem ceeb kom muaj kev nkag mus rau Arduino software. Yog tias koj tsis muaj nws hauv koj lub computer, kuv tau txuas qhov txuas rau rub tawm (https://www.arduino.cc/en/main/software).

Tom qab koj tau ua tiav rub tawm lub software, koj yuav tsum tau kho koj cov chaw raws li koj Arduino.

Kauj ruam 1:

Xaiv cov cuab yeej ntawv qhia zaub mov thiab xaiv chaw nres nkoj. Nco ntsoov tias Arduino/Gunuino Uno raug xaiv (Yog tias qhov no yog Arduino koj siv).

Kauj ruam 2:

Nyob hauv cov cuab yeej ntawv qhia zaub mov thiab xaiv pawg thawj coj. Arduino. Genuino Uno yuav tsum raug tshuaj xyuas.

Kauj Ruam 4: Ntxiv thiab Siv Cov Tsev Qiv Ntawv Tshiab

Ntxiv thiab Siv Cov Tsev Qiv Ntawv Tshiab
Ntxiv thiab Siv Cov Tsev Qiv Ntawv Tshiab
Ntxiv thiab Siv Cov Tsev Qiv Ntawv Tshiab
Ntxiv thiab Siv Cov Tsev Qiv Ntawv Tshiab
Ntxiv thiab Siv Cov Tsev Qiv Ntawv Tshiab
Ntxiv thiab Siv Cov Tsev Qiv Ntawv Tshiab
Ntxiv thiab Siv Cov Tsev Qiv Ntawv Tshiab
Ntxiv thiab Siv Cov Tsev Qiv Ntawv Tshiab

Txhawm rau ntsuas Stemma Moisture Sensor, koj yuav tsum muaj Adafruit sawaw Library.

Kauj ruam 1:

Xaiv Sketch tab ntawm cov ntawv qhia zaub mov. Scroll cia kom suav nrog Lub Tsev Qiv Ntawv thiab xaiv Tswj Cov Tsev Qiv Ntawv.

Kauj ruam 2:

Ntaus hauv Adafruit pom tsev qiv ntawv. Tsuas yog ib yam khoom yuav tsum tshwm sim. Rub tawm qhov tseeb version.

Kauj ruam 3:

Thaum qhov rub tawm tiav, Xaiv cov ntawv tab ntawm cov ntawv qhia zaub mov. Txav mus rau Piv Txwv. Xaiv Adafruit sawaw Library. Tom qab ntawd xaiv av_sensor. Thaum kawg, xaiv av sensor_example.

Qhov no yuav qhib qhov chaws uas koj tuaj yeem siv los ntsuas koj lub sensor.

Kauj ruam 5: Xeem

Kev Xeem
Kev Xeem
Kev Xeem
Kev Xeem
Kev Xeem
Kev Xeem

Thaum koj tau ua tiav tag nrho cov kauj ruam dhau los, tam sim no koj tuaj yeem sim koj li Stemma Moisture Sensor nrog Arduino thiab Arduino software.

Txhawm rau kom ua tiav koj cov haujlwm, koj yuav tsum txuas rau Arduino rau koj lub khoos phis tawj.

Koj yuav tsum muaj koj tus lej piv txwv nkag mus rau Arduino software.

Xaiv lub pov thawj khawm. Thaum qhov no ua tiav, xaiv lub pob upload. Tom qab koj tau rub tawm Arduino, xaiv lub iav tsom iav nyob rau sab saum toj sab xis. Qhov no yuav qhib cov ntaub ntawv xov xwm.

Txhawm rau ntsuas yog tias cov ntaub ntawv hloov pauv raug, muab koj txhais tes tso rau ntawm lub ntsuas. Yog tias nws ua haujlwm raug, cov ntaub ntawv ntawm lub vijtsam yuav hloov.

Koj tau ua tiav teeb tsa thiab sim koj lub sensor.

Pom zoo: