Cov txheej txheem:

Yooj Yim DIY Chaw Nres Tsheb Huab Cua Nrog DHT11 thiab OLED Zaub: 8 Kauj Ruam
Yooj Yim DIY Chaw Nres Tsheb Huab Cua Nrog DHT11 thiab OLED Zaub: 8 Kauj Ruam

Video: Yooj Yim DIY Chaw Nres Tsheb Huab Cua Nrog DHT11 thiab OLED Zaub: 8 Kauj Ruam

Video: Yooj Yim DIY Chaw Nres Tsheb Huab Cua Nrog DHT11 thiab OLED Zaub: 8 Kauj Ruam
Video: Saib Mis paub Poj niam (hluas nkauj) tus yam ntxwv lub siab 2024, Hlis ntuj nqeg
Anonim
Image
Image

Hauv qhov kev qhia no peb yuav kawm tsim lub chaw nres tsheb huab cua yooj yim siv Arduino, DHT11 sensor, OLED Display thiab Visuino kom tso saib Kub thiab Vaum.

Saib daim vis dis aus.

Kauj ruam 1: Yam Koj Yuav Tsum Tau

Koj Yuav Tsum Tau Dab Tsi
Koj Yuav Tsum Tau Dab Tsi
Koj Yuav Tsum Tau Dab Tsi
Koj Yuav Tsum Tau Dab Tsi
  1. Arduino UNO (lossis lwm yam Arduino)
  2. OLED Zaub
  3. DHT11 kub/av noo sensor
  4. Jumper xov hlau
  5. Visuino program: Rub tawm Visuino

Kauj ruam 2: Circuit Court

Qhov Circuit
Qhov Circuit
  1. Txuas DHT11 sensor tus pin (VCC lossis +) rau Arduino tus pin (5V)
  2. Txuas DHT11 sensor tus pin (GND lossis -) rau Arduino tus pin (GND)
  3. Txuas DHT11 sensor tus pin (S) rau Arduino tus lej digital (7)
  4. Txuas OLED Display pin (VCC) rau Arduino tus pin (5V)
  5. Txuas OLED Display pin (GND) rau Arduino tus pin (GND)
  6. Txuas OLED Display pin (SCL) rau Arduino tus pin (SCL)
  7. Txuas OLED Display pin (SDA) rau Arduino tus pin (SDA)

Kauj Ruam 3: Pib Visuino, thiab Xaiv Arduino UNO Board Type

Pib Visuino, thiab Xaiv Arduino UNO Board Type
Pib Visuino, thiab Xaiv Arduino UNO Board Type
Pib Visuino, thiab Xaiv Arduino UNO Board Type
Pib Visuino, thiab Xaiv Arduino UNO Board Type

Txhawm rau pib ua haujlwm rau Arduino, koj yuav tsum muaj Arduino IDE teeb tsa los ntawm no:

Thov nco ntsoov tias muaj qee qhov teeb meem tseem ceeb hauv Arduino IDE 1.6.6. Nco ntsoov tias koj nruab 1.6.7 lossis siab dua, txwv tsis pub Cov Lus Qhia no yuav tsis ua haujlwm! Yog tias koj tsis tau ua raws cov kauj ruam hauv Phau Ntawv Qhia no teeb tsa Arduino IDE rau program Arduino UNO! Visuino: https://www.visuino.eu tseem yuav tsum tau teeb tsa. Pib Visuino raws li pom hauv thawj daim duab Nyem rau ntawm "Cov cuab yeej" khawm ntawm Arduino tivthaiv (Daim Duab 1) hauv Visuino Thaum qhov kev sib tham tshwm, xaiv "Arduino UNO" raws li qhia hauv daim duab 2

Kauj Ruam 4: Hauv Visuino Ntxiv Cheebtsam

Hauv Visuino Ntxiv Cheebtsam
Hauv Visuino Ntxiv Cheebtsam
Hauv Visuino Ntxiv Cheebtsam
Hauv Visuino Ntxiv Cheebtsam
  1. Ntxiv "SSD1306/SH1106 OLED Display (I2C)" tivthaiv
  2. Ntxiv 2X "Analog To Text" tivthaiv
  3. Ntxiv "Vaum thiab Ntsuas Kub DHT11/21/22/AM2301" tivthaiv

Kauj Ruam 5: Hauv Visuino Teeb Cov Khoom

Hauv Visuino Teeb Cov Txheej Txheem
Hauv Visuino Teeb Cov Txheej Txheem
Hauv Visuino Teeb Cov Txheej Txheem
Hauv Visuino Teeb Cov Txheej Txheem
Hauv Visuino Teeb Cov Txheej Txheem
Hauv Visuino Teeb Cov Txheej Txheem
  • Xaiv "AnalogToText1" tivthaiv thiab hauv cov khoom qhov rai teeb tsa "Precision" rau 0 (Duab 1)
  • Xaiv "AnalogToText2" tivthaiv thiab hauv cov khoom qhov rai teeb tsa "Precision" rau 0 (Duab 1)
  • Xaiv "DisplayOLED1" tivthaiv thiab ob npaug nias rau nws. (Duab 2)
  • Hauv lub qhov rai ntu 2X "Kos Bitmap" mus rau sab laug (Duab 2)
  • Hauv lub qhov rai ntu 2X "Text Field" mus rau sab laug (Duab 2)
  • Hauv Elements window Xaiv "Kos Bitmap1" ntawm sab laug thiab hauv cov khoom qhov rai teeb tsa "Y" txog 30 thiab xaiv "Bitmap" thiab nyem rau ntawm 3 dots.
  • Hauv "Transparency Bitmap Editor" nyem rau ntawm lub pob "Load" thiab thauj "Cloud" bitmap los ntawm cov ntawv. Note: "Cloud" Bitmap muaj nyob ntawm no txhawm rau rub tawm lossis koj tuaj yeem tshawb nrhiav ntau ntxiv ntawm no,
  • Kaw "Transparency Bitmap Editor"
  • Hauv Elements window Xaiv "Kos Bitmap2" ntawm sab laug thiab hauv cov khoom qhov rai teeb tsa "X" rau 75 thiab xaiv "Bitmap" thiab nyem rau ntawm 3 dots.
  • Hauv "Transparency Bitmap Editor" nyem rau lub pob "Load" thiab Thauj "Drop" bitmap los ntawm cov ntawv. Note: "Drop" Bitmap muaj nyob ntawm no txhawm rau rub tawm lossis koj tuaj yeem tshawb nrhiav ntau ntxiv ntawm no,
  • Kaw "Transparency Bitmap Editor"
  • Hauv Elements window xaiv "TextField1" thiab hauv cov khoom qhov rai teeb tsa "loj" rau 4, "X" txog 5, "Y" txog 5
  • Hauv Elements window xaiv "TextField2" thiab hauv cov khoom qhov rai teeb tsa "loj" rau 2, "X" txog 105, "Y" txog 5

Kauj Ruam 6: Hauv Visuino Connect Components

Hauv Visuino Connect Components
Hauv Visuino Connect Components
Hauv Visuino Connect Components
Hauv Visuino Connect Components
  1. Txuas "DisplayOLED1" tiv thaiv tus pin [Tawm] rau Arduino I2C tus pin [Hauv]
  2. Txuas "HumidityThermometer1" tiv thaiv tus pin [Sensor] rau Arduino tus lej digital [7]
  3. Txuas "HumidityThermometer1" tiv thaiv tus pin [Kub] mus rau AnalogToText1 tus pin [Hauv]
  4. Txuas "HumidityThermometer1" tiv thaiv tus pin [Vaum] rau AnalogToText2 tus pin [Hauv]
  5. Txuas "AnalogToText1" tus pin [Tawm] rau "DisplayOLED1"> TextField1 tivthaiv tus pin [Hauv]
  6. Txuas "AnalogToText2" tus pin [Tawm] rau "DisplayOLED1"> TextField2 tivthaiv tus pin [Hauv]

Kauj Ruam 7: Tsim, Ua Ke, thiab Tshaj Tawm Arduino Code

Tsim, Sau, thiab Tso Tawm Arduino Code
Tsim, Sau, thiab Tso Tawm Arduino Code
Tsim, Sau, thiab Tso Tawm Arduino Code
Tsim, Sau, thiab Tso Tawm Arduino Code

Hauv Visuino, Nias F9 lossis nyem rau ntawm lub pob uas qhia ntawm daim duab 1 los tsim Arduino code, thiab qhib Arduino IDE

Hauv Arduino IDE, nyem rau ntawm Upload khawm, txhawm rau sau thiab xa cov cai (Daim duab 2)

Kauj ruam 8: Ua si

Yog tias koj ua lub zog Arduino UNO tus qauv, chav sov thiab qib av noo yuav tsum tshwm ntawm OLED zaub.

Nrog koj zoo siab! Koj tau ua tiav koj txoj haujlwm nrog Visuino. Kuj txuas nrog yog Visuino project, uas kuv tau tsim rau Cov Lus Qhia no, koj tuaj yeem rub tawm nws ntawm no thiab qhib nws hauv Visuino:

Pom zoo: