Cov txheej txheem:

Nws Pib Cua Txias Siv Servo thiab DHT11 Kub thiab Vaum Sensor Nrog Arduino: 8 Kauj Ruam
Nws Pib Cua Txias Siv Servo thiab DHT11 Kub thiab Vaum Sensor Nrog Arduino: 8 Kauj Ruam

Video: Nws Pib Cua Txias Siv Servo thiab DHT11 Kub thiab Vaum Sensor Nrog Arduino: 8 Kauj Ruam

Video: Nws Pib Cua Txias Siv Servo thiab DHT11 Kub thiab Vaum Sensor Nrog Arduino: 8 Kauj Ruam
Video: ОТКРОЙТЕ ВОЛШЕБНУЮ СТОРОНУ ТЕЛА, СТАНОВЯЮЩУЮСЯ ИЗ-ЗА ЧРЕЗВЫЧАЙНОЙ ТРЕВОГИ НОЧЬЮ 2024, Kaum ib hlis
Anonim
Nws Pib Cua Txias Siv Servo thiab DHT11 Kub thiab Vaum Sensor Nrog Arduino
Nws Pib Cua Txias Siv Servo thiab DHT11 Kub thiab Vaum Sensor Nrog Arduino

Hauv qhov kev qhia no peb yuav kawm paub yuav pib li cas & tig kiv cua thaum qhov kub tau nce siab tshaj ib qib.

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
Koj Yuav Tsum Tau Dab Tsi
Koj Yuav Tsum Tau Dab Tsi
  • DHT11 sensor
  • Arduino UNO (lossis lwm lub rooj tsavxwm)
  • Ntxuam module L9110
  • OLED Zaub
  • Servo tsav
  • Jumper xov hlau
  • Cov qhob cij
  • Visuino program: Rub tawm Visuino

Kauj ruam 2: Circuit Court

Qhov Circuit
Qhov Circuit
  • Txuas Servo motor "Txiv kab ntxwv" (teeb liab) tus pin rau Arduino Digital tus pin [2]
  • Txuas Servo motor "Liab" tus pin rau Arduino tus pin zoo [5V]
  • Txuas Servo motor "Brown" tus pin rau Arduino tus pin tsis zoo [GND]
  • Txuas tus kiv cua module tus pin [VCC] rau arduino tus pin [5V]
  • Txuas tus kiv cua module tus pin [GND] rau arduino tus pin [GND]
  • Txuas tus kiv cua module tus pin [INA] rau arduino tus pin [5]
  • 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]
  • Txuas DHT11 tus lej zoo + (VCC) rau Arduino tus pin + 5V
  • Txuas DHT11 tus lej tsis zoo - (GND) rau Arduino tus pin GND
  • Txuas DHT11 tus pin (Tawm) rau Arduino tus lej digital (4)

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 xav tau kev 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
Hauv Visuino Ntxiv Cheebtsam
Hauv Visuino Ntxiv Cheebtsam
  • Ntxiv "Sine Analog Generator" tivthaiv
  • Ntxiv "Servo" tivthaiv
  • Ntxiv "DHT" tivthaiv
  • Ntxiv "Analog Value" tivthaiv
  • Ntxiv 2X "Sib piv Tus Nqi Analog" tivthaiv
  • Ntxiv "OLED" 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 "SineAnalogGenerator1" thiab hauv cov khoom vaj huam sib luag teeb tsa Amplitude rau 0.30 thiab Zaus rau 0.1, teeb tsa ua kom yuam kev thiab nyem rau ntawm lub cim Pin thiab xaiv Boolean dab dej tus pin
  • Xaiv "CompareValue1" thiab hauv cov khoom vaj khoom tsev teeb tsa Tus nqi rau 24 (qhov kub uas yuav pib kiv cua) thiab Sib piv Hom rau ctBiggerOrEqual
  • Xaiv "CompareValue2" thiab hauv cov khoom vaj khoom tsev teeb tsa Tus Nqi rau 24 (qib kub uas yuav nres tus kiv cua) thiab Sib piv Hom rau ctSmaller
  • Ob npaug nias rau ntawm "AnalogValue1" thiab hauv Elements qhov rai luag "Teeb Tus Nqi" mus rau sab laug
  • Hauv cov khoom vaj khoom tsev teeb Tus Nqi rau 0.5
  • Hauv Elements window luag lwm qhov "Teeb Tus Nqi" mus rau sab laug
  • Hauv cov khoom qhov rai teeb tus nqi rau 1

Ob npaug nias rau ntawm "DisplayOLED1"

Hauv Elements window:

  • Luag "Kos Cov Ntawv" rau sab laug thiab hauv lub qhov rai khoom teeb tsa Cov Ntawv rau "TEMP"
  • Luag "Text Field" mus rau sab laug thiab hauv cov khoom qhov rai teeb tsa Loj rau 2 thiab Y txog 9
  • Luag "Kos Cov Ntawv" rau sab laug thiab hauv lub qhov rai khoom teeb tsa Cov Ntawv rau "HUMIDITY" thiab Y rau 26
  • Luag "Text Field" mus rau sab laug thiab hauv cov khoom qhov rai teeb tsa Loj rau 2 thiab Y rau 36
  • Luag "Kos Cov Ntawv" mus rau sab laug thiab hauv cov khoom vaj huam sib luag teeb Cov Ntawv rau "FAN ACTIVE" thiab Y rau 54 thiab teeb Enabled rau cuav, nyem rau ntawm tus lej cim thiab teeb BooleanSinkPin

Kaw lub Elements window

Kauj Ruam 6: Hauv Visuino Connect Components

Hauv Visuino Connect Components
Hauv Visuino Connect Components
Hauv Visuino Connect Components
Hauv Visuino Connect Components
Hauv Visuino Connect Components
Hauv Visuino Connect Components
  • Txuas SineAnalogGenerator1 tus pin [Tawm] rau Servo1 tus pin [Hauv]
  • Txuas Servo1 tus pin [Tawm] rau Arduino tus lej digital [2]
  • Txuas "HumidityThermometer1" tus pin [Sensor] rau Arduino tus lej digital [4]
  • Txuas "HumidityThermometer1" tus pin [Kub] mus rau DisplayOLED1> TextField1 tus pin [Hauv] thiab CompareValue1 tus pin [Hauv] thiab CompareValue2 tus pin [Hauv]
  • Txuas "HumidityThermometer1" tus pin [Kub] mus rau DisplayOLED1> TextField2 tus pin [Hauv]
  • Txuas "CompareValue1" tus pin [Tawm] rau DisplayOLED1> DrawText3 tus pin [Iclock] thiab tus pin [Enabled]
  • Txuas "CompareValue1" tus pin [Tawm] rau AnalogValue1> Teeb Tus Nqi1 tus pin [Hauv] thiab SineAnalogGenerator1 tus pin [Enabled]
  • Txuas "CompareValue2" tus pin [Tawm] rau AnalogValue1> Teeb Tus Nqi2 tus pin [Hauv]
  • Txuas "DisplayOLED1" tus pin I2C [Tawm] rau Arduino board I2C [Hauv]

Kauj Ruam 7: Tsim, Sau, thiab Tshaj Tawm Txoj Cai

Tsim, Sau, thiab Tshaj Tawm Txoj Cai
Tsim, Sau, thiab Tshaj Tawm Txoj Cai

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 8: Ua si

Yog tias koj ua lub zog Arduino UNO module, OLED Display yuav pib qhia qhov ntsuas kub thiab av noo thiab yog tias tus kiv cua ua haujlwm. Thaum qhov kub nce siab tshaj 24 degrees tus kiv cua yuav pib tig.

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: