Cov txheej txheem:
- Kauj ruam 1: Cov ntaub ntawv
- Kauj Ruam 2: Teeb Cov Khawm
- Kauj Ruam 3: Teeb Teeb RGB LED
- Kauj Ruam 4: Teeb LED
- Kauj Ruam 5: Teeb tsa Cov Tsav Tsheb
- Kauj ruam 6: Code
- Kauj Ruam 7: Tsim Lub Tshuab Xauv
- Kauj Ruam 8: Ua Kom Muaj Kev Nyab Xeeb thiab Txhim Kho Breadboard
- Kauj ruam 9: Tsim Keypad
- Kauj ruam 10: Nruab Keypad
- Kauj Ruam 11: Txhim Kho Xauv Mechanism
- Kauj ruam 12: Ua tiav
Video: Tsim Kev Nyab Xeeb Siv Rpi: 12 Cov Kauj Ruam
2024 Tus sau: John Day | [email protected]. Kawg hloov kho: 2024-01-30 09:25
Xav kawm paub yuav hloov koj li Raspberry pi rau hauv kev nyab xeeb ua haujlwm zoo li cas? Tom qab ntawd ua raws 12 qib qhia no kom paub yuav ua li cas. Kev nyab xeeb yuav muaj lub khawm ua haujlwm tiav thiab lub kaw lus kaw, yog li koj tuaj yeem khaws koj cov khoom kom nyab xeeb.
Kauj ruam 1: Cov ntaub ntawv
Ua ntej pib koj yuav tsum sau cov khoom tsim nyog. Koj yuav xav tau:
- Laub khawm x 9
- RGB coj x1
- Ntsuab LED x3
- DC Motors X 2
- L292D H-choj x1
- 330Ω resistor x 4
- Lub khob cij x2
- T-cobbler x 1
- Lub zog loj tib yam x2
- Assortment ntawm jumperwire
- Glue Gun thiab Glue sticks
- Txiab
- Tes me me pom
- Khau lub thawv/duab los qhia lub thawv x1
- Ntoo Dowel x2
- Ntau daim duab los qhia
- Xim dub thiab nyiaj
- Daim kab xev hluav taws xob
- Cov quav los yog cov cim cim (loj txaus tias cov ntoo ntoo tsuas yog hla dhau)
Kauj Ruam 2: Teeb Cov Khawm
Hauv qib no koj yuav xav tau ib lub thawv ntawv, T-cobbler, cuaj lub khawm khawm, thiab ntau yam ntawm jumperwire's. Thawj qhov T-cobbler rau ntawm qhov kawg ntawm daim ntawv qhia zaub mov, xyuas kom tseeb tias nws tau muab tso rau nruab nrab ntawm lub khob cij. Tom qab ntawd tso lub blackwire nrog ib kawg txuas nrog GND ntawm T-cobbler thiab lwm sab mus rau hauv av tsheb nqaj hlau ntawm lub khob cij. Rov ua cov kauj ruam kawg, tab sis siv xaim liab thiab txuas nws los ntawm 5V ntawm T-cobbler mus rau txoj kab hluav taws xob ntawm lub khob cij. Muab yim ntawm cov nyees khawm tso rau ntawm lub khob cij nyob rau hauv 4 x 2 lub ntsej muag lub ntsej muag tawm ntawm qhov chaw nruab nrab ntawm txhua lub pob, tso ib nrab ntawm cov nyees khawm ntawm txhua sab ntawm lub khob cij. Tom qab ntawd tso lub pob kawg txuas ntxiv rau ntawm lub khob cij ib leeg. 4 x 2 lub duab plaub ntawm cov nyees khawm yog lub khawm rau kev nyab xeeb thiab khawm ib leeg yog khawm rov pib dua. Txhawm rau txuas lub pob (ib qho ntawm cov nyees khawm) siv lub blackwire txuas nws mus rau txoj kev tsheb nqaj hlau hauv av, tso ib qho kawg ntawm txoj kab dub nyob hauv txoj kev tsheb nqaj hlau thiab lwm sab hauv tib kab ib yam li khawm. Tom qab ntawd txuas tus pin ntawm lub pob uas nyob ib sab ib yam li tus pin koj nyuam qhuav txuas rau hauv av mus rau tus pin gpio ntawm T-cobbler. Rov ua qhov no rau tag nrho cuaj lub khawm, yog li txhua lub pob nws muaj nws tus pin gpio thiab txuas rau hauv av.
Kauj Ruam 3: Teeb Teeb RGB LED
Hauv cov kauj ruam no koj yuav xav tau RGB LED, ib qho 330Ω tus tiv thaiv, ntau yam ntawm jumperwire's, thiab lub khob cij los ntawm cov kauj ruam dhau los. Ua ntej tso koj RGB Led ntawm lub xyoo breadboard nyob ib sab ntawm khawm rov pib dua, xyuas kom tseeb tias txhua tus pin tau muab tso rau hauv kab sib cais ntawm lub khob cij. Txuas tus pin ntev tshaj plaws ntawm RGB Coj mus rau txoj kev tsheb nqaj hlau siv 330Ω resistor. Tom qab ntawd siv jumper xov txuas rau txhua tus ntawm peb ceg ntawm RGB LED mus rau tus pin gpio.
Kauj Ruam 4: Teeb LED
Hauv theem no koj yuav xav tau peb lub LED ntsuab, peb 330Ω tus tiv thaiv, ntau yam ntawm jumper cables, lub ncuav ci tshiab, thiab lub khob cij los ntawm cov kauj ruam dhau los. Ua ntej txuas ob daim ntawv sib dhos ua ke, txuas lub khob cij tshiab ntawm sab xis ntawm lub khob cij los ntawm cov kauj ruam dhau los. Ntawm daim ntawv qhia zaub mov tshiab tso lub blackwire nrog ib kawg txuas nrog tus pin hauv av ntawm T-cobbler thiab lwm sab mus rau hauv av tsheb nqaj hlau ntawm lub khob cij. Tom qab ntawd siv cov xaim liab thiab txuas nws los ntawm 5V tus pin ntawm T-cobbler mus rau txoj kev tsheb nqaj hlau ntawm lub khob cij. Muab peb LEDs tso rau hauv kab, xyuas kom txhua ceg ntawm txhua LED muaj nws tus kheej kab thiab muaj qhov chaw nruab nrab ntawm txhua LED. Siv peb lub 330Ω resistors txuas cov ceg luv (cathode) ntawm txhua LED rau hauv av tsheb nqaj hlau. Tom qab ntawd txuas cov ceg ntev (anode) ntawm txhua LED mus rau tus pin gpio ntawm T-cobbler.
Kauj Ruam 5: Teeb tsa Cov Tsav Tsheb
Hauv cov kauj ruam no koj yuav xav tau L292D H-choj, ob lub tshuab DC, ntau yam ntawm cov hlua txuas txuas, thiab ob lub khob cij los ntawm cov kauj ruam dhau los. Siv lub khob cij tsis muaj T-cobbler, tso H-choj hla nruab nrab ntawm lub khob cij nrog lub hav hauv H-choj tig mus rau sab saum toj ntawm lub khob cij, xyuas kom txhua tus pin ntawm H-choj muaj nws tus kheej kab ntawm daim ntawv qhia zaub mov Ua ntej txuas tus pin sab saum toj thiab hauv qab ntawm txhua sab ntawm H-choj mus rau txoj kev tsheb nqaj hlau siv cov xov hlau liab. Tom qab ntawd siv cov xov hlau dub txuas nruab nrab ob tus pin ntawm txhua sab ntawm H-choj rau hauv av tsheb nqaj hlau. Lub sijhawm no yuav tsum muaj plaub tus pin ntawm txhua sab ntawm H-choj uas tsis muaj kev sib txuas. Siv cov xov hlau daj txuas cov pins saum toj/hauv qab kab liab rau txawv gpio pins ntawm T-cobbler, xyuas kom txhua tus pin txuas nrog xaim daj muaj nws tus kheej gpio pin ntawm T-cobbler. Tam sim no txuas cov xaim liab thiab blackwire rau txhua lub cav. Ntawm qhov no koj yuav tsum muaj ob tus pin ntawm txhua sab ntawm H-choj uas tsis muaj kev sib txuas, ntawm txhua sab ntawm H-choj tso cov hlau liab los ntawm ib lub cav nyob rau hauv tus npliag tus pin saum toj no ob nruab nrab blackwires. Thaum kawg ntawm txhua sab tso cov xaim dub los ntawm lub cav hauv tus pin khoob.
Kauj ruam 6: Code
Tam sim no koj tau tsim koj txoj kev hla, khau raj koj li Raspberry pi thiab qhib nab hab sej (Ua Ntej) 3. Siv tus lej no txhawm rau ua kom koj tsim los rau lub neej, nco ntsoov hloov pauv gpio pins kom qhia meej rau koj cov circut tshwj xeeb.
los ntawm gpiozero ntshuam LED, Khawm, RGBLED, Tsav
los ntawm lub sijhawm ntshuam pw
zaj sawv = RGBLED (liab = 16, ntsuab = 25, xiav = 6)
coj 1 = LED (23)
coj 2 = LED (18)
coj 3 = LED (22)
resetbutton = Khawm (27)
khawm 1 = Khawm (26)
khawm 2 = Khawm (19)
khawm 3 = Khawm (5)
button4 = Khawm (13)
button5 = Khawm (20)
khawm 6 = Khawm (21)
khawm 7 = Khawm (12)
khawm 8 = Khawm (24)
lub cev muaj zog = Lub cev muaj zog (rau pem hauv ntej = 4, rov qab = 17)
motor2 = Motor (rau pem hauv ntej = 8, rov qab = 7)
def pib dua ():
coj1.off ()
coj2.off ()
coj 3..off ()
rainbow.color = (0, 1, 0)
motor.stop ()
motor2.stop ()
xauv ()
keypad ()
def qhib ():
motor2.forward ()
tsaug zog (0.5)
motor2.stop ()
motor.forward ()
tsaug zog (0.5)
motor.stop ()
def xauv ():
motor2.backward ()
tsaug zog (0.5)
motor2.stop ()
motor.backward ()
tsaug zog (0.5)
motor.stop ()
def wrongpin ():
coj1.off ()
coj2.off ()
coj 3..off ()
rainbow.color = (0, 1, 0)
def cov keyboard ():
thaum Muaj Tseeb:
yog tias khawm 1.
tsis ncaj ncees lawm ()
yog tias button2.is_pressed:
coj1.on ()
yog tias button7.is_pressed thiab led1.is_lit:
coj2.on ()
yog tias button5.is_pressed thiab led1.is_lit thiab led2.is_lit:
coj 3.on ()
yog led1.is_lit thiab led2.is_lit thiab led3.is_lit:
rainbow.color = (1, 0, 1)
qhib ()
so
thaum Muaj Tseeb:
yog tias resetbutton.is_pressed:
pib dua ()
Kauj Ruam 7: Tsim Lub Tshuab Xauv
Hauv cov kauj ruam no koj yuav xav tau tes pom, rab phom nplaum, ib lub taub ntoo, ob lub zog (zoo ib yam), ob lub cim khij lossis hlua, ob lub tshuab DC, kab xev hluav taws xob, duab los qhia, thiab xim dub. Ua ntej tau txais 5cm x 5cm daim ntawv los xij thiab pleev xim rau xim dub, tom qab ntawd siv lub tes pom ua zawj hauv cov ntoo uas txuas nrog cov ntoo hauv lub zog. Tsim 7 txog 10 cov ntoo hauv cov ntoo ntoo, nco ntsoov tso tseg li 1.5cm ntawm tus laum uas tsis zoo nyob tom hauv ntej thiab li 0.7cm nyob tom qab. Tam sim no tab tom siv cov txiav txiav ob daim ntawm straw kwv yees li 0.7cm hauv qhov ntev, yog tias siv lub cim cim lub hau siv tes pom los txiav 0.7cm daim ntawm lub hau. Tam sim no xa cov iav mus rau lub cev muaj zog, koj tuaj yeem ua kua nplaum kub iav mus rau qhov kawg ntawm lub cav lossis siv cov kab hluav taws xob (cov kua nplaum ua haujlwm zoo tshaj). Tam sim no tso thiab kub kua nplaum daim ntawm cov quav/ cov cim cim rau ntawm ntug ntawm daim ntawv los xij, nco ntsoov tias ob daim ntawm cov quav/ cov npav cim yog ib lub zog ntev sib nrug thiab lawv tau sib dhos kom cov ntoo tuaj yeem hla tau lawv. Tom qab ntawd txiav cov ntawv los xij rau hauv 5cm x 3cm, xyuas kom tseeb tias cov quav quav/cov cim cim lub hau nyob ntawm ntug ntawm 5cm sab. Tam sim no txiav 1 - 2cm daim ntawm lub duav thiab tso thiab kub kua nplaum nws ntxhib 1cm tom qab ob lub straw/ tus cim cim lub hau, lub duav no ua raws li tus nres. Tam sim no tso lub dowel nrog cov iav ntoo hauv cov hlua/cov cim cim. Tam sim no txiav ib lub xwmfab rau hauv cov duab los qhia nruab nrab ntawm ob daim ntawm cov quav/cov cim cim, kom ntseeg tau tias koj tsis txhob txiav daim duab los ntawm hauv qab lub duav. Tam sim no tso lub cav rau hauv lub xwmfab zoo li lub qhov uas koj nyuam qhuav ua hauv cov duab los qhia, ua kom cov iav sib dhos nrog cov uas nyob ntawm lub duav, daim kab xev lossis cov kua nplaum kub rau lub tshuab rau ntawm daim duab. Tam sim no rov ua cov kauj ruam no los tsim lub tshuab xauv thib ob, ua kom ntseeg tau tias lub tshuab xauv thib ob tau ua kom lub duav tig mus rau txoj kev rov qab thaum lub cav ntawm txhua lub tshuab tig mus rau tib txoj kev.
Kauj Ruam 8: Ua Kom Muaj Kev Nyab Xeeb thiab Txhim Kho Breadboard
Hauv cov kauj ruam no koj yuav xav tau rab yaj phom, ob lub khob cij los ntawm cov kauj ruam dhau los, lub thawv rau khoom/lub thawv, duab los qhia, kab xev hluav taws xob, thiab xim dub. Txhawm rau pib pleev xim rau tag nrho lub thawv dub thiab txiav lwm daim duab los qhia uas ntev tib yam li lub thawv ntawv thiab qhov siab tib yam li sab hauv ntawm lub npov, pleev xim daim thij duab dub no ib yam. Tom ntej tso koj lub khob cij rau sab hauv lub thawv rau khaub ncaws nyob rau hauv lub hauv ntej txoj cai, kom ntseeg tau tias T-cobbler tab tom tig mus rau sab nraud ntawm lub npov thiab tsis tawm tsam phab ntsa ntawm lub thawv. Qhov chaw tom ntej thiab cov kua nplaum kub ntawm daim duab los qhia koj tsuas yog pleev xim rau sab nraum qab ntawm lub khob cij. Tam sim no txiav thiab pleev ib daim duab los uas yog qhov me me xav tau npog los ntawm daim ntawv duab los qhia koj tsuas yog lo rau ntawm lub hauv ntej ntawm lub thawv rau khoom, qhov no yog txhawm rau npog lub khob cij hauv lub thawv. Thaum pleev xim ntxiv daim tshiab ntawm cov duab los qhia los ntawm nws coj mus rau lwm daim ntawv los uas twb muaj lawm hauv lub thawv, yog li ntawd daim ntawv qhia zaub mov tseem tuaj yeem nkag tau thaum cov ntawv nthuav tawm raug tshem tawm.
Kauj ruam 9: Tsim Keypad
Hauv cov kauj ruam no koj yuav xav tau lub thawv ntoo los ntawm cov kauj ruam dhau los, duab los qhia, txiab, thiab xim nyiaj. Thawj txiav tsib daim ntawv sib txawv. Txiav ob daim 11cm x 4cm, ob daim 6cm x 4cm, thiab ib daim 11cm x 6cm. Hauv daim ntawv 11cm x 4cm thiab daim 6cm x 4cm kos ib lub cim nyob hauv nruab nrab ntawm txhua daim, tom qab ntawd kos kab ib kab los ntawm tus lej nrog 1cm ntawm ob sab ntawm tus ntawv. Tom ntej txiav mus rau cov kab ntawm kab los ntawm ob lub kaum hauv qab ntawm daim thiab tom qab ntawd kab rov tav los ntawm cov ntug ntawm daim duab los qhia. Tam sim no txhua daim tsuas yog 11cm x 6cm daim yuav tsum zoo li lub duab plaub nrog daim duab peb sab txuas rau hauv qab ntawm nws. Tom ntej pleev xim rau txhua daim nyiaj, tom qab ntawd txhuam txhua daim ntawm no ua ke los tsim cov duab plaub uas tsis muaj sab nraub qaum, daim duab peb sab ntawm txhua sab yuav tsum tig mus. Tam sim no siv lub txiab txua 4 x 2 daim phiaj kom haum rau 8 lub khawm thawb uas nyob ntawm koj lub rooj mov ci, tom qab ntawd txiav qhov rau khawm rov pib dua, RGB LED, thiab peb lub LED ntsuab. Tom ntej tshem tawm cuaj lub pob nyem, ther RGB LED, thiab peb lub ntsuab LED los ntawm koj lub khob cij thiab muab tso rau hauv lub qhov uas koj nyuam qhuav ua rau lawv hauv cov keyboard.
Kauj ruam 10: Nruab Keypad
Hauv cov kauj ruam no koj yuav xav tau cov keyboard, lub thawv rau khoom, ntau yam ntawm cov xov hlau jumper, thiab txiab. Ua ntej siv txiab txiav plaub qhov nyob ntawm xub ntiag ntawm lub thawv rau khoom ntawm ib sab uas lub khob cij yog. Cov qhov hlais yuav tsum sib phim rau daim duab peb sab ntawm lub keyboard, tab sis qhov txiav ntawm lub thawv rau khau yuav tsum luv dua li qhov ntev ntawm daim duab peb sab. Tom ntej no ua ib lub qhov nyob nruab nrab ntawm txhua qhov hlais ntawm lub khau khiab. Tam sim no siv cov xov hlau txuas txuas cov nyees khawm thiab LEDs rau lub khob cij yog lawv tau ua yav dhau los, Pub cov xov hlau los ntawm cov nyees khawm thiab LEDs los ntawm lub qhov nyob hauv lub thawv rau khoom rau lub khob cij. Tom qab ntawd muab cov keyboard rau ntawm lub khau raj los ntawm kev ntxig cov voos peb sab ntawm cov keyboard rau hauv qhov txiav ntawm lub thawv rau khoom.
Kauj Ruam 11: Txhim Kho Xauv Mechanism
Thaum kawg txhawm rau txhim kho lub tshuab xauv koj yuav xav tau rab phom nplaum, lub tshuab xauv, thiab txiab. Ntawm txhua lub tshuab xauv yuav tsum muaj dai daim duab los qhia, siv qhov no los lo rau ib lub tshuab ntawm txhua sab ntawm lub thawv rau khoom, saum daim duab los npog lub khob cij. Tom qab ntawd ua lub qhov nyob rau txhua sab ntawm lub thawv xa ntawv thiab lub hau ntawm lub thawv xa ntawv, lub qhov yuav tsum tau kab nrog cov ntoo rub tawm ntawm lub tshuab xauv. Tam sim no ua qhov me me hauv daim duab los npog lub khob cij, los ntawm lub qhov no txuas lub tshuab mus rau lub khob cij uas siv cov hlua txuas. Txuas lub cav mus rau H-choj uas lawv tau xub muab tso rau hauv qib tsib.
Kauj ruam 12: Ua tiav
Tam sim no koj muaj lub luag haujlwm muaj kev nyab xeeb uas koj tuaj yeem siv siv koj li Raspberry pi, yog tias koj xav kom muaj kev nyab xeeb kom txav tau deb ntawm koj lub monitor siv VCN tus saib kom txuas rau koj lub pi. Thaum siv VCN tus saib Raspberry pi tuaj yeem muab tso rau hauv tib qhov chaw raws li lub thawv ntawv. Tam sim no koj tuaj yeem nres txhawj xeeb txog koj cov khoom thiab ua kom lawv nyab xeeb. =)
Pom zoo:
Covid Kev Nyab Xeeb Kev Nyab Xeeb Ntu 1: Intro rau Tinkercad Circuits !: 20 Cov Kauj Ruam (nrog Duab)
Covid Kev Nyab Xeeb Kev Nyab Xeeb Ntu 1: Intro rau Tinkercad Circuits!: Nyob zoo, phooj ywg! Hauv ob ntu ntu no, peb yuav kawm paub siv Tinkercad Cov Kev Siv Hluav Taws Xob - lom zem, muaj zog, thiab cov cuab yeej siv rau kev kawm paub txog kev ua haujlwm li cas! Ib txoj hauv kev zoo tshaj los kawm, yog ua. Yog li, peb yuav xub tsim peb tus kheej txoj haujlwm: th
Yuav Ua Li Cas Hloov Kev Nyab Xeeb Kev Nyab Xeeb rau K40 Laser Cutter: 4 Cov Kauj Ruam (nrog Duab)
Yuav Ua Li Cas Hloov Kev Nyab Xeeb Kev Nyab Xeeb rau K40 Laser Cutter: Qhov tseem ceeb kho! Thov tsis txhob xaim koj cov kev sib txuas mus rau lub ntsiab ntawm lub tshuab. Hloov chaw xaim rau PG pins ntawm PSU. Yuav ua qhov hloov tshiab tag nrho sai. -Tony 7/30-19What yog ib qho ntawm thawj cov lus qhia hauv is taws nem rau thaum koj lub npe tshiab, (ma
Kev Nyab Xeeb Zoo dua: Ua Cov Tsheb ciav hlau Kev Nyab Xeeb: 7 Cov Kauj Ruam
Kev Nyab Xeeb Zoo dua: Ua Cov Chaw Tsheb Ciav Hlau Muaj Kev Nyab Xeeb: Ntau lub chaw tsheb ciav hlau niaj hnub no tsis nyab xeeb vim tsis muaj kev nyab xeeb, teeb meem, thiab ceeb toom ntawm lub tsheb ciav hlau los rau hauv. Peb pom qhov xav tau uas yuav tsum tau kho. Txhawm rau daws qhov teeb meem no peb tsim Kev Nyab Xeeb Zoo. Peb tau siv cov ntsuas kev co, cov cim txav txav, thiab
DIY Kev Nyab Xeeb Kev Nyab Xeeb Siv Arduino: 5 Cov Kauj Ruam
DIY Kev Nyab Xeeb Kev Nyab Xeeb Siv Arduino: Kawm paub yuav ua li cas kom koj lub tsev nyab xeeb los ntawm kev ua tub sab hauv txoj kev yooj yim
Rov Qab Pab Chaw Nres Tsheb Hauv Lub Nkoj Siv Kev Nyab Xeeb Muaj Kev Nyab Xeeb Zoo thiab Cov Cim Hluav Taws Xob: 5 Cov Kauj Ruam
Tsheb Rov Qab Pab Hauv Qhov Chaw Nkag Siv Kev Nyab Xeeb Uas Muaj Kev Nyab Xeeb Zoo thiab Cov Hluav Taws Xob Hluav Taws Xob: Kuv xav tias ntau qhov kev tsim tawm hauv keeb kwm ntawm noob neej tau ua vim kev yws yws poj niam. Tshuab ntxhua khaub ncaws thiab tub yees yeej zoo li zoo li cov neeg sib tw siv tau. Kuv me me " invention " piav qhia hauv Cov Lus Qhia no yog hluav taws xob