Cov txheej txheem:
- Kauj Ruam 1: Yam Peb Xav Tau rau Txoj Haujlwm
- Kauj ruam 2: Tsim Circuit Court
- Kauj ruam 3: Itsybitsy M4 Pinout
- Kauj Ruam 4: Kev Sib Txuas ntawm Stripboard
- Kauj Ruam 5: Txoj Cai: Ntu 1 - Teeb tsa Digital Pins
- Kauj Ruam 6: Code: Ntu 2 - Teeb Cov Pauv Analog thiab Code Tus Zauv Cim
- Kauj Ruam 7: Code: Ntu 3 - Cov txheej txheem
- Kauj Ruam 8: Code: Ntu 4 - Lub Loop Loj
- Kauj Ruam 9: Code: Rub kom Txuag Koj Lub Sijhawm
Video: Dual 7 -ntu Cov Lus Qhia Tswj los ntawm Potentiometer hauv CircuitPython - Qhia tawm ntawm Kev Ua Phem Tsis Pom Kev: 9 Kauj Ruam (nrog Duab)
2024 Tus sau: John Day | [email protected]. Kawg hloov kho: 2024-01-30 09:27
Txoj haujlwm no siv lub zog ntsuas los tswj cov zaub ntawm ob peb ntawm 7-ntu LED qhia (F5161AH). Raws li lub pob qhov ntsuas hluav taws xob tau tig lub teeb pom kev hloov pauv hauv thaj tsam 0 txog 99. Tsuas yog ib qho LED tau teeb nyob rau txhua lub sijhawm, luv luv, tab sis lub qhov muag lossis lub koob yees duab tsis pom qhov flicker. Qhov no yog qhov tsis pom kev.
Nias lub pob kom qeeb qhov kev nqis tes thiab koj tuaj yeem pom tus kheej LEDs tig thiab tua.
Kuv tau pom tias muaj tsawg heev Cov Ntawv Qhia Siv CircuitPython yog li txoj haujlwm no siv Adafruit Itsybitsy M4 txhim kho pawg thawj coj uas ua haujlwm CircuitPython zoo nkauj. Yog tias koj xav siv Raspberry Pi, lossis lwm lub microprocessor kev txhim kho pawg thawj coj koj tsuas yog xav hloov tus pin thiab lawv teeb tsa hauv tsab ntawv.
Kauj Ruam 1: Yam Peb Xav Tau rau Txoj Haujlwm
Kho vajtse:
- Adafruit Itsybitsy M4 - pawg thawj coj loj, muaj zog thiab pheej yig
- microUSB cable - rau kev ua haujlwm los ntawm PC
- breadboard (los yog stripboard thiab soldering hlau)
- breadboard jumper cables (lossis txuas cov hlau thiab cov laug)
- ib khub ntawm F5161AH 7-ntu qhia
- 10K Ohm potentiometer
- khawm hloov
- ib khub ntawm 330 Ohm resistors
Software:
Mu Editor - los sau cov cai thiab teeb tsa lub rooj tsavxwm
Teeb tsa Itsybitsy tau piav qhia ntawm no:
Qhov hloov tshiab kawg ntawm CircuitPython:
Cov tsev qiv ntawv CircuitPython:
Mu Editor:
Kuv ib txwm tsim ib qhov haujlwm nrog kab txaij tom qab kuaj tawm ob peb lub tswv yim tawm ntawm lub khob cij. Qhov no txhais tau tias kuv tuaj yeem khaws cov phiaj xwm tiav npaj rau ua qauv qhia ntawm 'qhia & qhia' cov xwm txheej lossis qhia kuv cov tub ntxhais kawm.
Kauj ruam 2: Tsim Circuit Court
7 ntu qhia txhua tus muaj 10 tus pin. Cov pins nruab nrab ntawm sab saum toj thiab hauv qab tau txuas nrog sab hauv thiab yog cov cathodes. Qhov ntawd txhais tau tias tag nrho 8 LEDs, 7 ntu thiab tus lej zauv, ntawm cov khoom sib koom ib txoj kab rau GND txuas. Qhov no yuav tsum yog ntawm 330 Ohm resistor txhawm rau txwv qhov tam sim no. Txhua ntawm lwm 8 tus pin yog anodes thiab txuas ncaj qha rau cov pins tso tawm ntawm Itsybitsy.
Qhov no txhais tau tias tus pin 13 ntawm Itsybitsy, uas tswj lub hauv paus ntu ntu (A), txuas nrog tus pin 7 ntawm ob qho 7-ntu qhia. Ib yam nkaus, tus pin 12 ntawm Itsybitsy, uas tswj hwm sab saum toj ntu (B), txuas nrog tus pin 6 ntawm ob qho 7-ntu qhia. Tus so ntawm anodes zoo sib xws.
Cov cathodes feem ntau txuas nrog, ntawm cov neeg tawm tsam, rau pins D3 thiab D4 ntawm Itsybitsy. Lawv TSIS YOG txuas nrog GND, yog li peb tuaj yeem xaiv cov zaub ib tus zuj zus los ntawm rub lawv cov cathodes qis los xaiv qhov xav tau.
Kauj ruam 3: Itsybitsy M4 Pinout
Qhov no qhia cov pins ntawm Itsybitsy M4 kom meej dua.
Kauj Ruam 4: Kev Sib Txuas ntawm Stripboard
Qhov no yuav tsum pab koj nkag siab. Sab laug tes thaiv ntawm kev sib txuas (liab… grey) yog cov anodes thiab txuas nrog cov pins: D13, D12, D11, D10, D9, D7, Tx thiab Rx.
Hauv nruab nrab khub kev sib txuas; Pin 8, cathode ntawm sab laug (kaum tawm) cov zaub txuas nrog D4 ntawm tus tiv thaiv. Pin 3, cathode ntawm txoj cai (chav nyob) zaub txuas nrog D3 ntawm tus tiv thaiv. Lawv yog 330 Ohm
Tseem ceeb: Txhua txoj kab hauv qab cov zaub tau raug txiav. Hauv kab 4 los ntawm sab xis muaj kev txiav ntawm kab thib 12 los ntawm hauv qab ntawm pawg thawj coj saib. Nws nyob nruab nrab ntawm koj cov xov hlau dub thiab dawb
Txoj cai sib txuas yog:
- Dawb rau A0 los ntawm sab laug ntawm khawm
- Ntsuab, wiper ntawm lub hwj chim rau A4
- Txiv kab ntxwv rau 3.3v thiab txoj cai tus pin ntawm potentiometer - siab kawg
- Dub rau GND: sab xis ntawm khawm thiab sab laug tus pin ntawm lub hwj chim - qis kawg
Kauj Ruam 5: Txoj Cai: Ntu 1 - Teeb tsa Digital Pins
Qhov teeb tsa cov koob digital - anodes, cathodes thiab khawm. Cov voj no yog ib txoj hauv kev zoo los teeb tsa ntau tus pin zoo sib xws.
Kauj Ruam 6: Code: Ntu 2 - Teeb Cov Pauv Analog thiab Code Tus Zauv Cim
Tsuas yog ib qho ntawm tus pin analog siv ntawm no.
Txhua kab ntawm lub rooj sawv cev rau ib tus cim. 7 tus lej lossis xoom, sab laug mus rau sab xis, sawv cev rau ntu A txog G. A '1' txhais tau tias ntu ntu yog ON thiab 0 uas ntu tsis ua haujlwm.
Thaum koj tau txais txoj haujlwm no ua haujlwm koj yuav xav txuas lub rooj kom suav nrog a, b, c, d, e thiab f thiab hloov kho cov cai rau cov lej hexadecimal (hauv paus 16).
Kauj Ruam 7: Code: Ntu 3 - Cov txheej txheem
Nov yog qhov ua haujlwm tiag. Cov ntu LED yuav tsuas yog teeb yog tias cathode LOW thiab anode HIGH.
Txoj kev:
- faib tus lej rau hauv nws kaum tawm thiab cov khoom sib xyaw
- rub lub cathode qis rau ntawm ib qho zaub kom qhib nws thiab tom qab ntawd nyem qhov ntu ib zaug yog tias xav tau
- rub lub cathode siab kom tua cov zaub ntawd
- rov hais dua rau lwm cov zaub
- Ua qhov no ntau dhau sai heev kom tus neeg soj ntsuam tsis tuaj yeem pom qhov muag.
Qhib yam qeeb yog tias nias lub pob.
Kauj Ruam 8: Code: Ntu 4 - Lub Loop Loj
Hauv lub voj:
- Nyeem lub lauj kaub
- Nplai tus nqi kom ntau li 0 txog 99
- Zaub cov lej
- Yog tias khawm nias nce ntxiv kom pom qhov pom LED
- Halt yog tus nqi xoom THIAB khawm nias
Kauj Ruam 9: Code: Rub kom Txuag Koj Lub Sijhawm
Leej twg xav ntaus txhua qhov ntawd?
Nov yog rub tawm kom txuag koj lub sijhawm thiab kev ua yuam kev.
Pom zoo:
Qhov muag tsis pom kev Nrog ESP8266, Google Tsev thiab Openhab Kev Sib Koom thiab Kev Tswj Xyuas Web: 5 Cov Kauj Ruam (nrog Duab)
Qhov muag tsis pom kev Nrog ESP8266, Google Tsev thiab Openhab Kev Sib Koom thiab Kev Tswj Xyuas Web: Hauv Cov Lus Qhia no kuv qhia koj li cas kuv ntxiv kev siv tshuab rau kuv qhov muag tsis pom. Kuv xav kom muaj peev xwm ntxiv thiab tshem tawm qhov kev siv tshuab nws, yog li txhua qhov kev teeb tsa yog clip ntawm.Qhov tseem ceeb yog: Stepper motor Stepper tsav tswj bij ESP-01 Iav thiab teeb tsa
Yuav Ua Li Cas Thiaj Li Tawm Tawm Tawm Tawm Rau Hauv Kev Hloov Pauv Hloov?: 6 Cov Kauj Ruam
Yuav Ua Li Cas Thiaj Li Ua Tus Tawm Tawm Tawm Rau Hauv Kev Hloov Transformer?: Yog tias koj xav tau tus tswv lub zog hloov pauv, tom qab ntawd koj yuav tsum tau nyeem kab lus no. Peb yuav xav ua kom tus neeg hloov pauv ntawm txhais ceg txav mus, ua haujlwm yooj yim thiab hais ob peb yam, lossis tseem paub yuav ua li cas sawv, zaum thiab yoj tes. Lub zog los ntawm
Kho Ob Chav Tawm Tawm Tawm Tawm Tawm Cov Khoom Siv Hluav Taws Xob: 10 Cov Kauj Ruam (nrog Duab)
Kho Ob Chav Tawm Tawm Tawm Tawm Tawm Tawm Cov Khoom Siv Hluav Taws Xob: Nta: AC-DC Hloov pauv ob npaug tso tawm qhov hluav taws xob (Zoo-Hauv av-Tsis Zoo) Kho txoj kab zoo thiab tsis zoo Tsuas yog Ib Leeg Ib Leeg AC hloov pauv cov suab nrov (20MHz-BWL, tsis muaj thauj khoom): Ib puag ncig 1.12mVpp Tsawg suab nrov thiab cov txiaj ntsig ruaj khov (zoo tagnrho
Pom Qhov Pom Pom Pom Pom Lub Koob Yees Duab (TfCD): 15 Kauj Ruam (nrog Duab)
Pom Qhov Pom Pom Pom Pom Lub Koob Yees Duab (TfCD): Cov kev pabcuam paub uas tuaj yeem paub txog kev xav, ntsej muag ntawm tib neeg lossis cov khoom yooj yim tam sim no tseem nyob rau theem pib ntawm kev txhim kho, tab sis nrog kev kawm tshuab, thev naus laus zis no tau nce zuj zus. Peb tuaj yeem cia siab tias yuav pom ntau ntxiv ntawm cov khawv koob no hauv
Motion Controlled Outlet - Los ntawm Lub Teeb Pom Kev Pom Kev Pom Teeb: 6 Cov Kauj Ruam
Motion Controlled Outlet - Los ntawm Lub Teeb Pom Kev Pom Kev: Xav txog tias koj yog ib tus neeg dag-lossis-coj mus rau lub tsev txaus ntshai tshaj plaws ntawm qhov thaiv. Tom qab dhau mus tag nrho cov dab, dab thiab lub qhov ntxa koj thaum kawg tau mus rau txoj kev kawg. Koj tuaj yeem pom cov khoom qab zib hauv lub tais ua ntej ntawm koj! Tab sis tam sim ntawd gho