Cov txheej txheem:

Kev Ntsuas Kub Nrog DHT11 thiab I2C 20x4 LCD: 6 Kauj Ruam
Kev Ntsuas Kub Nrog DHT11 thiab I2C 20x4 LCD: 6 Kauj Ruam

Video: Kev Ntsuas Kub Nrog DHT11 thiab I2C 20x4 LCD: 6 Kauj Ruam

Video: Kev Ntsuas Kub Nrog DHT11 thiab I2C 20x4 LCD: 6 Kauj Ruam
Video: QHIA QHOV TSEEB - KUB VAJ LOOG TSUA NEW MUSIC VIDEO 2022 2024, Kaum ib hlis
Anonim

Hauv qhov kev qhia no peb yuav kawm paub ua qhov ntsuas kub yooj yim siv DHT11 sensor thiab I2C LCD

Saib cov yees duab!

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
Koj Yuav Tsum Tau Dab Tsi
Koj Yuav Tsum Tau Dab Tsi
  • 20x4 I2C Character LCD zaub
  • Jumper xov hlau
  • Arduino Uno lossis lwm lub Rooj Tswjhwm Saib Arduino
  • DHT11 kub thiab av noo sensor
  • Visuino software: Rub tawm ntawm no

Kauj ruam 2: Circuit Court

Qhov Circuit
Qhov Circuit
  • Txuas LCD Zaub pin [VCC] rau Arduino tus pin [5V]
  • Txuas LCD Zaub pin [GND] rau Arduino tus pin [GND]
  • Txuas LCD Display pin [SDA] rau Arduino tus pin [SDA]
  • Txuas LCD Display pin [SCL] rau Arduino tus pin [SCL]

Nco tseg: Siv lub hwj chim tom qab lub LCD txhawm rau kho qhov ci ci

  • Txuas DHT11 sensor tus pin [GND] rau Arduino tus pin [GND]
  • Txuas DHT11 sensor tus pin [VCC] rau Arduino tus pin [5V]
  • Txuas DHT11 sensor tus pin [OUT] lossis "S" rau Arduino tus lej digital [2]

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

Visuino: https://www.visuino.eu tseem yuav tsum tau teeb tsa. Rub tawm Dawb version lossis sau npe rau Kev Sim Dawb.

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, Teeb & Txuas Txuas

hauv Visuino Ntxiv, Teeb & Txuas Cov Khoom Siv
hauv Visuino Ntxiv, Teeb & Txuas Cov Khoom Siv
hauv Visuino Ntxiv, Teeb & Txuas Cov Khoom Siv
hauv Visuino Ntxiv, Teeb & Txuas Cov Khoom Siv
hauv Visuino Ntxiv, Teeb & Txuas Cov Khoom Siv
hauv Visuino Ntxiv, Teeb & Txuas Cov Khoom Siv
  • Ntxiv "DHT11" tivthaiv
  • Ntxiv "Liquid Crystal Display (LCD) - I2C" tivthaiv Xaiv "LiquidCrystalDisplay1" thiab hauv cov khoom qhov rai teeb tsa Kab rau 4 thiab kab rau 20

Ob npaug nias rau ntawm "LiquidCrystalDisplay1" thiab hauv Elements window:

  • luag "Text Field" mus rau sab laug, tom qab ntawd hauv lub qhov rai khoom teeb tsa cov ntawv rau "TEMP:" thiab dav txog 20
  • luag lwm qhov "Text Field" mus rau sab laug, tom qab ntawd hauv cov khoom vaj khoom tsev teeb tsa kab rau 1 thiab dav txog 20
  • luag lwm qhov "Text Field" mus rau sab laug, tom qab ntawd hauv cov khoom vaj huam sib luag teeb cov ntawv rau "HUMIDITY:" thiab dav txog 20 thiab kab rau 2
  • luag lwm qhov "Text Field" mus rau sab laug, tom qab ntawd hauv cov khoom vaj khoom tsev teeb tsa kab rau 3 thiab dav txog 20

Kaw lub Elements window

  • Txuas "LiquidCrystalDisplay1" tus pin I2C Tawm rau Arduino I2C Hauv
  • Txuas "HumidityThermometer1" tus pin Sensor rau Arduino Digital tus pin 2
  • Txuas "HumidityThermometer1" tus pin Kub rau LiquidCrystalDisplay1> Text Field2 pin In
  • Txuas "HumidityThermometer1" tus pin Vaum rau LiquidCrystalDisplay1> Text Field4 pin In

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

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

Hauv Visuino, hauv qab nyem rau ntawm "Tsim" Tab, xyuas kom tseeb tias qhov chaw nres nkoj raug xaiv, tom qab ntawd nyem rau ntawm "Compile/Build and Upload" khawm.

Kauj ruam 6: Ua si

Yog tias koj siv zog Arduino UNO module, LCD Zaub yuav pib qhia qhov Kub thiab Vaum qhov tseem ceeb. Nyob rau hauv rooj plaub koj tsis pom cov ntawv nyeem kom ntseeg tau tias koj kho qhov ci ci siv lub zog ntsuas.

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

Pom zoo: