Cov txheej txheem:

Lub Hnab Ruaj Ntseg E-textile Hnab: 3 Kauj Ruam
Lub Hnab Ruaj Ntseg E-textile Hnab: 3 Kauj Ruam

Video: Lub Hnab Ruaj Ntseg E-textile Hnab: 3 Kauj Ruam

Video: Lub Hnab Ruaj Ntseg E-textile Hnab: 3 Kauj Ruam
Video: 102 Year Old Lady's Abandoned Home in the USA ~ Power Still ON! 2024, Hlis ntuj nqeg
Anonim
Lub Teeb Ruaj Ntseg E-textile Hnab
Lub Teeb Ruaj Ntseg E-textile Hnab

Hauv qhov kev qhia no koj yuav kawm paub teeb tsa lub hnab e-textile los tsim cov khoom ntse uas ua rau lub teeb pom kev zoo sau los ntawm lub teeb pom kev ib puag ncig.

Kauj Ruam 1: Npaj Arduino Board

Npaj Arduino Board
Npaj Arduino Board
Npaj Arduino Board
Npaj Arduino Board
Npaj Arduino Board
Npaj Arduino Board
Npaj Arduino Board
Npaj Arduino Board

Peb yuav siv S4A los teeb tsa lub rooj tsavxwm. Yog li, peb yuav tsum xub teeb tsa peb Arduino kom txaus.

Rub tawm S4A software los ntawm S4A thiab tom qab ntawv nyem rau "Downloads"> Xaiv qhov tseeb raws li koj lub operating system. Tom qab ntawv, rub tawm S4A firmware los ntawm qhov txuas no> Txoj cai-nyem> Txuag li> Tshem tawm.txt ib feem ntawm lub npe> Txuag raws li hom: Hloov los ntawm "Cov Ntawv Sau" mus rau "Txhua Cov Ntaub Ntawv"> Txuag.

Upload lub S4A firmware

Koj kuj tseem yuav tsum tau siv Arduino IDE rau tus lej thiab xa cov firmware rau koj li Arduino Leonardo pawg thawj coj. Rub tawm lub software los ntawm kev mus xyuas Arduino IDE> Scroll down kom txog thaum koj pom "Rub tawm Arduino IDE" ntu thiab xaiv cov version raws li koj lub operating system (piv txwv li Yog tias koj muaj Windows 7, xaiv "Windows Installer" / yog tias koj muaj Windows 10, xaiv "Windows app")> Ntawm nplooj ntawv tom ntej xaiv "Tsuas yog rub tawm" thiab khiav cov ntaub ntawv teeb tsa. Tua tawm Arduino IDE thiab qhib S4A firmware los ntawm kev mus rau File> Qhib lossis los ntawm nias Ctrl+O thiab tom qab ntawd tshawb rau qhov chaw uas koj yav tas los tau khaws cov firmware rau.

Txuas Arduino rau koj lub khoos phis tawj. Xaiv Arduino Leonardo los ntawm cov cuab yeej ntawv qhia zaub mov> Pawg. Xaiv qhov chaw nres nkoj raug los ntawm cov cuab yeej ntawv qhia zaub mov> Chaw nres nkoj.

Tshaj tawm S4A firmware rau hauv nws los ntawm kev siv lub xub xub (→) khawm nyob rau sab xis saum toj ntawm lub qhov rais, los ntawm kev xaiv Sketch> Upload lossis los ntawm nias Ctrl+U ntawm cov keyboard.

Tua tawm S4A

Yog tias S4A firmware tau ua tiav xa mus rau Arduino pawg thawj coj, "tshawb xyuas pawg thawj coj …" cov lus yuav tsum ploj mus li ob peb feeb.

Kauj ruam 2: Hlau Sensor thiab Actuator

Hlau Sensor thiab Actuator
Hlau Sensor thiab Actuator
Hlau Sensor thiab Actuator
Hlau Sensor thiab Actuator
Hlau Sensor thiab Actuator
Hlau Sensor thiab Actuator

Koj yuav tsum txuas lub teeb pom kev ib puag ncig thiab LED thaj ua rau Arduino board. Lub teeb pom kev zoo ib puag ncig thaj tsam muaj 3 kab txuas los ntawm nws, qhov LED thaj muaj ob txoj kab.

Qhov zoo ntawm lub teeb pom kev ib puag ncig mus rau 5V. Qhov tsis zoo mus rau GND. Koj tuaj yeem siv ib qho ntawm 3 GND pins muaj nyob ntawm pawg thawj coj. Yog tias koj tsis paub meej tias ib qho ntawm lub teeb pom kev zoo ib puag ncig ob txhais ceg zoo, tsuas yog sim txuas ib qho los txhawm rau tus pin 5V thiab lwm qhov rau GND. Yog tias qhov ntawd tsis ua haujlwm, sim rov qab. Thaum kawg txuas kab txuas ntxiv ntawm lub teeb pom kev zoo ib puag ncig thaj rau A0. Qhov tsis zoo ntawm LED mus rau GND thiab qhov zoo rau tus lej digital (piv txwv. 13). Thaum kawg nws yuav tsum zoo li no:

  • dawb kab - A0
  • ntsuab kab - 5V
  • xiav cable - GND
  • txiv kab ntxwv -13
  • dub cable - GND

Kauj ruam 3: Program Arduino

Program Arduino
Program Arduino
Program Arduino
Program Arduino
Program Arduino
Program Arduino

Peb xav ua haujlwm rau Arduino board kom lub teeb pom kev ib puag ncig cuam tshuam nrog LED.

Ua daim ntawv ceeb toom yuav ua li cas tus nqi ntawm A0 hloov pauv raws qhov hloov pauv ntawm qhov pom kev.

Hauv peb qhov piv txwv, A5 (piv txwv li tus lej pin 5, uas yog qhov uas peb txuas nrog lub teeb pom kev ib puag ncig), qhia tus nqi ib puag ncig 30 thaum tsis muaj lub teeb pom kev zoo qhia rau nws.

Whereas yog tias peb taw tes taws teeb lub xov tooj ntawm lub teeb pom kev ib puag ncig, tus nqi poob qis txog 10.

Thaum koj tau nkag siab li cas lub teeb pom kev ib puag ncig zoo li cas rau qhov hloov pauv ntawm qhov pom kev, koj npaj tau npaj qhov program Arduino yog li ntawd, thaum twg lub teeb pom kev ib puag ncig lub teeb sau tus nqi siab dua 15 (hauv peb qhov piv txwv), LED thaj yuav tig rau, txwv tsis pub LED thaj yuav nyob twj ywm.

Pom zoo: