Cov txheej txheem:

Tshawb Pom Thaum Ib Tus Neeg Nkag Mus Hauv Chav Siv Radar Sensor Xyc-wb-dc: 7 Kauj Ruam
Tshawb Pom Thaum Ib Tus Neeg Nkag Mus Hauv Chav Siv Radar Sensor Xyc-wb-dc: 7 Kauj Ruam

Video: Tshawb Pom Thaum Ib Tus Neeg Nkag Mus Hauv Chav Siv Radar Sensor Xyc-wb-dc: 7 Kauj Ruam

Video: Tshawb Pom Thaum Ib Tus Neeg Nkag Mus Hauv Chav Siv Radar Sensor Xyc-wb-dc: 7 Kauj Ruam
Video: 8 yam tsis txhob ua thaum sib deev tag tsis li yuav phom sij txog lub neej txoj sia. 2024, Hlis ntuj nqeg
Anonim

Hauv qhov kev qhia no peb yuav kawm paub yuav nrhiav li cas thaum ib tus neeg nkag mus hauv chav siv RTC module, radar sensor xyc-wb-dc, OLED zaub thiab arduino.

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
Koj Yuav Tsum Tau Dab Tsi
Koj Yuav Tsum Tau Dab Tsi
  • Arduino UNO (lossis lwm yam Arduino)
  • xyc-wb-dc Radar Sensor
  • RTC DS1307 Lub Sijhawm Sijhawm Sijhawm Tiag
  • OLED zaubJumper xov hlau
  • Visuino program: Rub tawm Visuino

Kauj ruam 2: Circuit Court

Qhov Circuit
Qhov Circuit
  • Txuas XYC-WB-DC tus pin [O] rau Arduino tus pin [8]
  • Txuas XYC-WB-DC tus pin [-] rau Arduino tus lej tsis zoo [GND]
  • Txuas XYC-WB-DC tus pin [+] rau Arduino tus pin zoo [3.3V] Nco tseg: qee lub radar sensors muaj txoj haujlwm tus pin sib txawv yog li ua kom koj txuas nws raug
  • Txuas RTC module tus pin [GND] rau Arduino tus pin [GND]
  • Txuas RTC module tus pin [VCC] rau Arduino tus pin [5V]
  • Txuas RTC module tus pin [SDA] rau Arduino tus pin [SDA]
  • Txuas RTC module tus pin [SCL] rau Arduino tus pin [SCL]
  • Txuas OLED Display pin [GND] rau Arduino tus pin [GND]
  • Txuas OLED Display pin [VCC] rau Arduino tus pin [5V]
  • 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

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
Hauv Visuino Ntxiv Cheebtsam
Hauv Visuino Ntxiv Cheebtsam
  • Ntxiv "Real Time Clock (RTC) DS1307" componentAdd "SSD1306/SH1106 OLED Display (I2C)" tivthaiv
  • Ntxiv "Digital (Boolean) Hloov Xwb" componentAdd "Detect Edge" componentAdd "Clock On/Off Switch" component
  • Ntxiv "Timer" tivthaiv
  • Hauv cov khoom vaj khoom tsev teeb tsa "Interval (uS)" rau 10000000
  • Qhov no txhais tau tias lub ntsuas cua yuav "tsaug zog" rau 10s (10000000uS) tom qab txhua qhov kev tshawb pom, qhov no yuav tiv thaiv ntau lub sijhawm ua ke ib zaug, Qhov zoo tshaj koj yuav teeb tsa qhov no rau qee yam zoo li 5min
  • Ntxiv "Inverter" tivthaiv

Kauj Ruam 5: Hauv Visuino Connect Components

Hauv Visuino Connect Components
Hauv Visuino Connect Components
  • Txuas Arduino digital Out pin [8] rau "ChangeOnly1" tus pin [Hauv]
  • Txuas "ChangeOnly1" tus pin [Tawm] rau "DetectEdge1" tus pin [Hauv]
  • Txuas "DetectEdge1" tus pin [Tawm] rau "ClockSwitch1" tus pin [Hauv]
  • Txuas "ClockSwitch1" tus pin [Tawm] rau "RealTimeClock1" tus pin [Clock] thiab "Timer1" tus pin [Pib]
  • Txuas "Timer1" tus pin [Tawm] rau "Inverter1" tus pin [Hauv]
  • Txuas "Inverter1" tus pin [Tawm] rau "ClockSwitch1" tus pin [Pab kom]
  • Txuas "RealTimeClock1" tus pin [Tswj] mus rau Arduino I2C [Hauv]
  • Txuas "RealTimeClock1" tus pin [Tawm] rau "DisplayOLED1" tus pin [Hauv]
  • Txuas "DisplayOLED1" tus pin [Tswj] mus rau Arduino I2C [Hauv]

Kauj Ruam 6: 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 7: Ua si

Yog tias koj ua lub zog Arduino UNO tus qauv, thiab ua kom txav lub Radar sensor yuav tsum ntsuas nws ntawm txhua qhov kev txav pom hauv lub vojvoog ntawm +-5m nyob ib ncig ntawm lub radar sensor thiab ua lub sijhawm teev tseg ntawm OLED Zaub. Nyob ntawm lub caij nyoog uas koj teeb tsa hauv Timer tivthaiv nws yuav tsum txheeb xyuas lwm qhov kev txav chaw tom qab lub sijhawm dhau mus.

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: