Cov txheej txheem:

Yuav Ua Li Cas Siv DHT22 Vaum thiab Kub Sensor Nrog Arduino: 6 Kauj Ruam
Yuav Ua Li Cas Siv DHT22 Vaum thiab Kub Sensor Nrog Arduino: 6 Kauj Ruam

Video: Yuav Ua Li Cas Siv DHT22 Vaum thiab Kub Sensor Nrog Arduino: 6 Kauj Ruam

Video: Yuav Ua Li Cas Siv DHT22 Vaum thiab Kub Sensor Nrog Arduino: 6 Kauj Ruam
Video: Tsis Paub Yuav Ua Li Cas 2024, Hlis ntuj nqeg
Anonim
Image
Image

Hauv qhov kev qhia no peb yuav kawm paub siv DHT22 Vaum thiab Kub Sensor nrog Arduino thiab tso tawm qhov txiaj ntsig ntawm OLED Zaub.

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
  • Arduino Uno lossis lwm lub Rooj Tswjhwm Saib Arduino
  • DHT22 sensor
  • Cov qhob cij
  • Jumper xov hlau
  • OLED Zaub
  • Visuino software: Rub tawm ntawm no

Kauj ruam 2: Circuit Court

Qhov Circuit
Qhov Circuit
  • Txuas DHT22 tus lej zoo + (VCC) rau Arduino tus pin + 5V
  • Txuas DHT22 tus lej tsis zoo - (GND) rau Arduino tus pin GND
  • Txuas DHT22 tus pin (Tawm) rau Arduino tus lej digital (7)
  • Txuas OLED Display pin [VCC] rau Arduino tus pin [5V]
  • Txuas OLED Display pin [GND] rau Arduino tus pin [GND]
  • Txuas OLED Display pin [SDA] rau Arduino tus pin [SDA]
  • Txuas OLED Display pin [SCL] rau Arduino tus pin [SCL]

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 Cheeb Tsam

Hauv Visuino Ntxiv, Teeb & Txuas Cheeb Tsam
Hauv Visuino Ntxiv, Teeb & Txuas Cheeb Tsam
Hauv Visuino Ntxiv, Teeb & Txuas Cheeb Tsam
Hauv Visuino Ntxiv, Teeb & Txuas Cheeb Tsam
Hauv Visuino Ntxiv, Teeb & Txuas Cheeb Tsam
Hauv Visuino Ntxiv, Teeb & Txuas Cheeb Tsam
Hauv Visuino Ntxiv, Teeb & Txuas Cheeb Tsam
Hauv Visuino Ntxiv, Teeb & Txuas Cheeb Tsam
  • Ntxiv "DHT" tivthaiv
  • Xaiv "HumidityThermometer1" thiab hauv cov khoom qhov rai teeb tsa hom rau DHT22
  • Ntxiv "OLED" zaub tivthaiv
  • Ob npaug nias rau ntawm "DisplayOLED1" Hauv cov ntsiab lus qhov rai luag "Text Field" mus rau sab laug
  • Hauv cov khoom qhov rai teeb tsa me me rau 2
  • Hauv lub qhov rai ntsiab lus rub lwm qhov "Text Field" mus rau sab laug
  • Hauv cov khoom vaj khoom tsev teeb tsa qhov loj me rau 2 thiab Y txog 20
  • Kaw lub Elements window
  • Txuas "HumidityThermometer1" tus pin Kub rau "DisplayOLED1"> "Text Field1"
  • Txuas "HumidityThermometer1" tus pin Vaum rau "DisplayOLED1"> "Text Field2"
  • Txuas "HumidityThermometer1" tus pin Sensor mus rau Arduino board DIGITAL tus pin 7
  • Txuas "DisplayOLED1" tus pin I2C Tawm rau Arduino board tus pin I2C Hauv

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 ua lub zog Arduino UNO module, OLED Display yuav pib qhia qhov ntsuas kub thiab av noo.

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: