Cov txheej txheem:

Arduino Handheld Fan nrog Capacitive Touch Switch: 6 Cov Kauj Ruam
Arduino Handheld Fan nrog Capacitive Touch Switch: 6 Cov Kauj Ruam

Video: Arduino Handheld Fan nrog Capacitive Touch Switch: 6 Cov Kauj Ruam

Video: Arduino Handheld Fan nrog Capacitive Touch Switch: 6 Cov Kauj Ruam
Video: how do PC fans work? #shorts 2024, Kaum ib hlis
Anonim

Hauv qhov kev qhia no peb yuav kawm paub yuav ua li cas tig Hendheld roj teeb kiv cua ON thiab OFF siv lub peev xwm kov lub ntsej muag, tso tawm cov qauv thiab Visuino.

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
Koj Yuav Tsum Tau Dab Tsi
Koj Yuav Tsum Tau Dab Tsi
  • Arduino UNO (lossis lwm yam Arduino)
  • Jumper xov hlau
  • Capacitive kov sensor
  • Cov hlua nrog cov kais dej aligator
  • Roj teeb kiv cua (lossis qee yam khoom siv roj teeb)
  • Visuino program: Rub tawm Visuino

Kauj ruam 2: Circuit Court

Qhov Circuit
Qhov Circuit
  • Txuas Capacitive kov sensor "Teeb liab" tus pin rau Arduino Digital tus pin [7]
  • Txuas Capacitive kov sensor "VCC" tus pin rau tus pin [5V]
  • Txuas Capacitive kov sensor "GND" tus pin rau tus pin [GND]
  • Txuas Relay "Teeb liab" tus pin rau Arduino Digital tus pin [8]
  • Txuas Txuas "VCC" tus pin rau tus pin [5V]
  • Txuas Txuas "GND" tus pin rau tus pin [GND]
  • Txuas Hendheld "Zoo" tus pin rau tus pin [5V]
  • Txuas Hendheld "Negative" tus pin rau Relay tus pin [NC]
  • Txuas Relay tus pin [C] rau tus pin [GND]

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
  • Ntxiv "Ntug Ntug" tivthaiv thiab teeb tsa hauv qab qhov khoom "Rising" rau "True"
  • Ntxiv "(T) Flip-Flop" tivthaiv
  • Txuas Arduino Digital Out pin [7] rau "DetectEdge1" tiv thaiv tus pin [Hauv]
  • Txuas "DetectEdge1" tiv thaiv tus pin [Tawm] rau "TFlipFlop1" tiv thaiv tus pin [Clock]
  • Txuas "TFlipFlop1" tiv thaiv tus pin [Tawm] rau Arduino Digital IN tus pin [8]

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, tus kiv cua yuav tsum tig yog tias koj kov lub "capacitive touch" sensor lossis tig lub kiv cua OFF.

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 qhov Qhia Qhia no. Koj tuaj yeem rub tawm thiab qhib nws hauv Visuino:

Pom zoo: