Cov txheej txheem:

WW2 Xov Tooj Cua Tshaj Tawm Lub Sijhawm Tshuab: 13 Kauj Ruam (nrog Duab)
WW2 Xov Tooj Cua Tshaj Tawm Lub Sijhawm Tshuab: 13 Kauj Ruam (nrog Duab)

Video: WW2 Xov Tooj Cua Tshaj Tawm Lub Sijhawm Tshuab: 13 Kauj Ruam (nrog Duab)

Video: WW2 Xov Tooj Cua Tshaj Tawm Lub Sijhawm Tshuab: 13 Kauj Ruam (nrog Duab)
Video: Lis Lwm - Lee Lue - Phaj Ej T-28 nyob rau hmoob keeb kwm - Hmong Hero of T-28 in Vietnam war 2024, Hlis ntuj nqeg
Anonim
Image
Image
WW2 Xov Tooj Cua Tshaj Tawm Lub Sijhawm Tshuab
WW2 Xov Tooj Cua Tshaj Tawm Lub Sijhawm Tshuab

Lub tswv yim tom qab qhov no yog siv qee qhov kuv tau dag ib puag ncig thiab tsim lub suab jukebox ua qauv hauv xov tooj cua qub. Txhawm rau muab qee lub hom phiaj ntxiv tom qab nws kuv kuj tau txiav txim siab sau nws nrog cov xov tooj cua qub tshaj tawm los ntawm WW2 thiab tom qab ntawd txhawm rau rov ua dua lub xov tooj kom xaiv ib tus neeg xyoo ntawm kev ua tsov ua rog thiab cov kev cuam tshuam tshaj tawm tom qab ntawd yuav ua si. Kuv tau pom ob peb sau ntawm MP3 kaw cia kom txhua yam tau npaj mus.

Hais txog kho vajtse kuv nyiam yog arduino lossis raspberry pi xoom, thiab rau qhov no kuv yuav siv raspberry pi xoom. Txawm li cas los nws muaj nws qhov tsis zoo thiab hauv qhov no nws yog qhov tsis muaj qhov yooj yim siv lub suab thiab tsis muaj cov lus sib piv yooj yim. Txhawm rau kov yeej qhov no kuv zoo li siv Adafruit I2S 3W Class D Amplifier Breakout - MAX98357A uas yog txoj hauv kev yooj yim ntxiv cov suab rau Pi thiab rau cov lus sib cav sib tham MCP 3002 uas yog ob channel rau SPI hloov pauv. Feem ntau tib neeg nyiam siv MCP 3008 uas muaj 4 lub tswv yim tab sis kuv xav tias nws yuav yooj yim dhau, hmoov zoo kuv tswj tau nrhiav qee cov software uas ua haujlwm nrog cov no thaum kawg.

Ib qho ntawm lwm cov teeb meem nrog kev siv PI yog tias nws zoo li raug kev txom nyem yog tias koj tsuas yog kaw nws yam tsis ua haujlwm kaw, Kuv tau ntsib lub sijhawm no suav tsis txheeb thiab nws ib txwm zoo li tsis zoo rau lub network teeb tsa cov ntaub ntawv. Nrog qhov no tau pom los ua ib leeg ib leeg yooj yim uas yuav muaj teeb meem yog li kuv kuj tau ntxiv Pimoroni On/Off Shim uas ua ob qho tib si zoo kaw thaum nias lub pob, tab sis kuj tso cai rau khau raj nrog tib lub khawm.

Kauj Ruam 1: WW2 Sijhawm Tshuab Xov Tooj Tshooj

Qhov xav tau

  1. Laus xov tooj cua
  2. Fabkis Polish
  3. SandPaper
  4. Lexan rau tus xov tooj
  5. Heatshrink
  6. Raspberry Pi Zero
  7. I2S AW
  8. ON/OFF Shim
  9. Hais lus
  10. Fais fab cib
  11. YWB 3002
  12. LED
  13. Resistor 270R
  14. 2x10k qab
  15. Nyem rau kom Hloov
  16. USB Ua

Kauj Ruam 2: Nrhiav Xov Tooj Cua Qub

Nrhiav Lub Xov Tooj Cua Qub
Nrhiav Lub Xov Tooj Cua Qub
Nrhiav Lub Xov Tooj Cua Qub
Nrhiav Lub Xov Tooj Cua Qub
Nrhiav Lub Xov Tooj Cua Qub
Nrhiav Lub Xov Tooj Cua Qub

Thawj kauj ruam ntawm chav kawm yog txhawm rau nrhiav lub xov tooj cua qub uas tsim nyog thiab kuv tswj hwm kom pom qhov no ntawm ebay rau £ 15. Muaj qhov kev ntxias kom nws khiav thaum xub thawj, tab sis thaum lub chassis tawm los thiab tag nrho cov array ntawm resistors thiab capacitors tau ntawm cov yeeb yam uas yuav tsum tau hloov pauv Kuv tsis xav tias phem heev txog kev coj nws sib nrug. Txawm hais tias nruj me ntsis nws tsis yog 1940's teeb tsa, muaj qee qhov khoom tsim hauv tsev los ntawm lub sijhawm ntawd uas zoo ib yam.

Kauj Ruam 3: Tshem Tawm Lub Xov Tooj Cua Qub thiab Tsim Lub Chassis Tshiab

Tshem Tawm Lub Xov Tooj Cua Qub thiab Tsim Lub Chassis Tshiab
Tshem Tawm Lub Xov Tooj Cua Qub thiab Tsim Lub Chassis Tshiab
Tshem Tawm Lub Xov Tooj Cua Qub thiab Tsim Lub Chassis Tshiab
Tshem Tawm Lub Xov Tooj Cua Qub thiab Tsim Lub Chassis Tshiab
Tshem Tawm Lub Xov Tooj Cua Qub thiab Tsim Lub Chassis Tshiab
Tshem Tawm Lub Xov Tooj Cua Qub thiab Tsim Lub Chassis Tshiab

Nws yooj yim yooj yim coj ib qho ntawm qhov sib nrug, feem ntau nws zoo li lub chassis tau teeb tsa rau hauv rooj plaub thiab ntawm txhua yam tau teeb tsa. Yog li thaum nws tsis tau ntsia hlau thiab cov pob qhov rooj tso nws tsuas yog swb tawm. Feem ntau yog ua tiav ntawm lub chassis sub. Kuv thawj lub hom phiaj yog siv tus hais lus los ntawm lub ripped sib nrug bluetooth hais lus lub thawv, tab sis kuv xav paub yog tias tus qub yuav ua haujlwm. Nws yog qhov xav tsis thoob uas pom tias tsis tsuas yog nws ua haujlwm, tab sis nws zoo li zoo heev thiab. Yog li cov kauj ruam tom ntej no yog txhawm rau ntsuas txhua yam thiab tsim lub chassis tshiab hauv Tinkercad. Kuv rov txhais dua thaj tsam hu xov tooj thiab khaws tus hais lus nyob hauv ib qho. Tsis tas li ntawd, tau muab phaj txuas rau pi xoom ntxiv. Kuv luam tawm nws hauv PETG uas kuv pom tias tsis muaj zog tiv taus kev ua rog thiab kev sim ua kom haum ntawm txhua feem zoo li qhia tias nws yuav ua haujlwm. Kuv yuav tsum tau ua si ib puag ncig me ntsis nrog ntim ntim kom lub lauj kaub tshiab yuav zoo haum thiab tseem nce los ntawm rooj plaub.

Koj tuaj yeem rub tawm 3D Chassis ntawm no yog tias koj xav tinker nrog nws

www.thingiverse.com/thing:3174818

Kauj Ruam 4: Rov Kho Cov Ntaub Ntawv

Rov Kho Cov Ntaub Ntawv
Rov Kho Cov Ntaub Ntawv
Rov Kho Cov Ntaub Ntawv
Rov Kho Cov Ntaub Ntawv
Rov Kho Cov Ntaub Ntawv
Rov Kho Cov Ntaub Ntawv

Tam sim no thawj qhov uas yuav tsum ua thaum rooj plaub raug tshem tawm yog txiav txim siab yuav ua li cas nrog qhov ua tiav. Txawm hais tias rooj plaub tsis phem heev kuv xub xav txog tsuas yog muab nws ua kom huv huv kom ua rau lub ntsej muag zoo nkauj. Feem ntau so nrog cov kua txiv hmab txiv ntoo yuav ua rau rooj plaub qub dua qub, tab sis muaj qee qhov chaw uas cov kua roj vanish tau tawg dhau los kuv thiaj txiav txim siab muab nws rov qab. Nrog cov ntoo qub qub lawv ib txwm tau them rau hauv cov ntoo veneer nyias, tab sis nws tsis yog li nyias uas koj tsis tuaj yeem tau xuab zeb zoo rau nws. Ua ntej tshaj plaws cov lus grille daim ntaub tau raug tshem tawm, uas yog qhov qias neeg qias neeg nrog li 50 xyoo ntawm hmoov av thiab hmoov av hauv nws thiab muab tso rau ib sab. Tom qab ntawd ob peb lub tsho loj ntawm Nitromors, pleev xim pleev xim, thiab cov kua roj vanish qub thaum kawg tawm los. Qhov no yuav tsum tau ua ob zaug vim tias nws tej zaum tau hloov pauv ntawm qee kis dhau qhov ua tiav thawj zaug. Txhawm rau tshem qee qhov khawb thiab muab nws ua kom zoo dua nws tau xuab zeb nrog qee cov ntawv 100 grit thiab tom qab ntawd txhuam zaum kawg nrog txhuam txhuam nruab nrab. Ua txhua yam no nyob rau hauv kab nrog cov nplej thiab tom qab ntawd so nrog lub siab dawb los ntxuav tawm cov hmoov av. Nyob rau tib lub sijhawm lub thawv kuj tau teeb tsa nrog qee cov kua nplaum ntoo uas qhov veneer tau rub me ntsis. Cov pas nrig ntoo kuj tseem tau tawg me ntsis, yog li cov kua nplaum ntau dua thiab muab cov ntoo thim rov qab. Thaum qhov no tau qhuav, Kuv tsuas yog siv lub taub hau los ntxuav cov npoo ntawm cov ntoo thiab pleev xim rau xim av nrog qee cov Tamiya acrylic xim.

Kuv thawj qhov kev xav tsuas yog hloov daim ntaub ntawm tus neeg hais lus, tab sis tus nqi ntawm cov ntaub ntawv pov thawj saib yog zoo nkauj ntxhab raws li nws tended kom muag tau ntev. Tom qab me ntsis tshawb nrhiav cov rooj sib tham hauv xov tooj cua vintage, nws zoo li yog tias koj tuaj yeem nqa daim ntaub qub nrog tsau. Yog li siv dej txias thiab ntau ntxuav cov kua Kuv tau tsau nws hmo ntuj thiab xav tsis thoob thaum nws qhuav tawm dua nws tuaj huv si.

Tam sim no kuv tab tom daws qhov ua tiav thiab thawj zaug txiav txim siab muab nws cov kua roj vanish kom meej, tom qab ntawd xav txog kev siv tshuaj tsuag txau thiab thaum nyob hauv cov kua roj vanish/xim tsev ntawm lub khw DIY hauv zos pom lub raj mis ntawm cov tshuaj txhuam hniav. Xav tias yuav yog qhov txiaj ntsig zoo tiav kuv txiav txim siab sim nws. Yog li tam sim no koj yuav tsum paub tias kev txhuam hniav hauv Fab Kis zoo nkauj npaum li kev kos duab/txuj ci uas siv ntau qhov kev coj ua kom raug. Koj tuaj yeem tshawb nrhiav cov lus qhia hauv YouTube thiab txawm hais tias nws zoo nkaus li yooj yim nws yog qhov haujlwm tsis zoo nkauj. Lub ntsej muag zoo li tau txais cov tshuaj txhuam hauv cov ntaub so ntub hauv cov paj rwb kom koj tuaj yeem nyem tawm txhuam rau ntoo thaum koj ua haujlwm. Yog tias koj tsuas yog sim nws nrog cov khaub ncaws, kwv yees li 3/4 ntawm txoj kev txhuam tau pib ziab tawm thaum cov tshuaj ethanol evaporates thiab cov khaub ncaws pib rub. Yog li thaum kawg ntau dua li tau txais qhov ua tiav siab kawg Kuv tau tswj kom thov ob peb lub tsho loj, xuab zeb maj mam nrog ntawv 1500 qib, tom qab ntawv thov ob peb ntxiv thiab nws xaus rau qhov pom zoo. Kuv tseem muaj cov tshuaj txhuam hniav Fabkis tab sis ntawm kuv cov rau tes.

Kev tu lwm qhov yog yooj yim dua nrog txhua qhov kho vajtse mus rau hauv lub tshuab nqus tsev ultrasonic thiab lub xov tooj tau txhuam nrog qee qhov Silvo Polish. Brasso yuav muaj kev xaiv, tab sis Silvo thiab lub luj tshib me ntsis ntxiv yog txaus los ntxuav lub ntsuas qhov ntsuas.

Qhov kawg ntawm qhov no kuv muaj lub thawv ntoo zoo nkauj zoo nkauj npaj rau lub sijhawm tshuab nws tus kheej.

Cov kauj ruam hauv ntu no1. Tshem tawm txhua qhov ntsia hlau/xov tooj thiab daim ntaub.

2. Ntoo txua rooj plaub nrog nitromors

3. Sanding lub veneer

4. Rov kho cov hniav

5. Txhua tus neeg hais lus daim ntaub

6. French polishing rooj plaub

7. Ultrasonic tu cov ntsia hlau thiab pob qhov rooj

8. Polishing lub ntsuas taw qhia

Kauj Ruam 5: Raspberry Pi Zero thiab Amplifier

Raspberry Pi Zero thiab Amplifier
Raspberry Pi Zero thiab Amplifier
Raspberry Pi Zero thiab Amplifier
Raspberry Pi Zero thiab Amplifier
Raspberry Pi Zero thiab Amplifier
Raspberry Pi Zero thiab Amplifier

Nrog ib txwm Raspberry PI lub suab tso tawm tau yooj yim heev vim nws muaj lub tso suab tso tawm, tab sis rau Pi Zero tsis muaj kev xaiv haiv neeg tiag. Muaj qee qhov kev daws teeb meem uas kuv tau sim qhov twg koj tuaj yeem rov ua dua GPIO pins thiab tom qab ntawd siv lub lim qis dhau tab sis kuv yeej tsis tau muaj peev xwm tau txais qee yam suab zoo, thiab tau kawg koj xav tau lub suab nrov ntxiv kom tau qee yam siv tau. Muaj ntau ntau ntawm DAC Kaus mom, tab sis cov no yog rau cov tib neeg tab tom nrhiav lub suab zoo tiag tiag thiab ua rau ntau yam rau cov haujlwm no. Tseem muaj qee qhov zoo nkauj pheej yig Lub kaus mom nrog ua hauv tus hais lus, tab sis tsuas yog tsis nrov txaus rau qhov no. Yog li kuv txiav txim tam sim no ntawm i2S lub tshuab hluav taws xob tawg ntawm pawg thawj coj los ntawm Adafruit uas daws txhua yam teeb meem hauv ib qho. Tsuas yog nco ntsoov tias nws yog i2S thiab tsis yog i2C.

Koj tsuas yog xav tau ob peb lub xov hlau kom tau txais qhov no thiab ua haujlwm thiab nrog tus hais lus zoo txaus koj tuaj yeem tau txais qee qhov zoo, nrov mono suab.

Kauj Ruam 6: Ua Tus Dial Tshiab

Ua Tus Dial Tshiab
Ua Tus Dial Tshiab
Ua Tus Dial Tshiab
Ua Tus Dial Tshiab
Ua Tus Dial Tshiab
Ua Tus Dial Tshiab

Lub tswv yim ntawm no yog tau hloov lub xov tooj uas twb muaj lawm thiab iav nrog ib qho uas qhia xyoo tsis siv ntau zaus. Hmoov zoo qhov uas twb muaj lawm tsuas yog cov ntawv luam tawm thiaj li tso rau hauv lub tshuab luam ntawv thiab theej nws mus rau Xim Khw Pro, siv lub cuab yeej clone thiab tshem tawm cov lej qub thiab tom qab ntawd tsuas yog ntaus qee qhov tshiab rau txhua xyoo. Nrog iav ib qho hauv xov tooj cua tau khawb thiab tawg thiab zoo li nws hloov tawm los ntawm yas ib yam nkaus. Kuv tau luam tawm tsuas yog lub bezel puag ncig los ua qhov ntsuas haum yooj yim thiab thawj zaug tau sim ua ib qho ntawm acrylic. Kuv feem ntau tsis tau txais kev ua siab ntev txaus nrog acrylic thiab xaus rau qhov tawg thaum sim txhawm rau txhawm rau qhov chaw nruab nrab. Yog li kuv tau siv 1.5 hli polycarbonate uas yooj yim dua rau hacksaw thiab laum. Koj tuaj yeem pom nws tseem hu ua Lexan lossis Macrolon nyob ntawm seb koj nyob qhov twg thiab nws tseem siv cov ntaub ntawv ib yam nkaus yog li kuv tsis ntev muaj lub bezel thiab hu uas haum. Qhov txaus siab ib yam nkaus yog tias daim ntawv qub muaj cov hlau me me tso rau hauv nws, Kuv tsuas tuaj yeem xav tias nws yog ib tus neeg cuam tshuam los ntawm tus xub tooj dag pointer, tej zaum qee qhov txheej txheem laus?

Kauj Ruam 7: Volume thiab Selector Controls

Volume thiab Selector Controls
Volume thiab Selector Controls

Ib qho ntawm qhov tsis zoo ntawm Raspberry pi rau tinkering yog tias nws tsis muaj ib txwm muaj cov lus sib piv hauv haiv neeg. Tsis muaj teeb meem ntau dhau yog tias koj ntxiv ADC yooj yim (Analog rau Digital Converter) thiab MPC3002 haum rau daim nqi ntawm no thiab nws hloov cov lus sib piv rau hauv 10 tus nqi uas tuaj yeem nyeem ntawm SPI npav.

Yuav luag txhua qhov piv txwv koj pom yog rau MPC3008 uas yog 4 channel ntaus ntawv thiab cov cai rau qhov uas yeej tsis ua haujlwm nrog MPC3002. Kuj tseem zoo li muaj ntau tus piv txwv nyob ib puag ncig uas tsis ua haujlwm ib yam, tab sis muaj ib qho uas kuv tuaj yeem lees paub ua haujlwm thiab nws cov lej tuaj yeem pom ntawm no.

github.com/CaptainStouf/Adafruit-raspi-pyt…

Nrog cov cai no koj tuaj yeem nyeem ob txoj hauv kev yooj yim hauv thiab siv cov txiaj ntsig. Kuv tus piv txwv yuav siv ib qho rau Ntim thiab lwm qhov xaiv hnub tim. Kuv tau ua ntawm ib lub ntsiab lus tseem muaj cov ntsuas kab rov tav uas tau teeb tsa tab sis ib zaug tig lub ntim tau haum dua thiab nrog tus xaiv zaus nws kuj txhais tau tias kuv tuaj yeem sib sau ua ke tag nrho thiab tom qab ntawd tsuas yog qhib qhov chaw ntawm lub xyoo cim nrog cov ntaub ntawv loj loj. Ib yam li pyhon tsis txhawb cov ntaub ntawv nqe lus ntev li yog tias yog lwm qhov yog tias nqe lus yuav ua txoj haujlwm.

Daim duab qhia pom MCP3002 zaum ntawm lub rooj tsav xwm me me thiab 10K lauj kaub

Kauj Ruam 8: Lub Hwj Huam thiab Kev Tswj

Hwj chim Mov thiab Tswj
Hwj chim Mov thiab Tswj
Hwj chim Mov thiab Tswj
Hwj chim Mov thiab Tswj
Hwj chim Mov thiab Tswj
Hwj chim Mov thiab Tswj

Tus Pi tsuas yog siv lub zog USB thiaj yooj yim heev rau mus, txawm li cas los xij koj yuav xaus rau kev ua phem rau daim npav SD yog tias koj tsuas yog yank lub zog. Muaj ntau txoj hauv kev los tshuaj xyuas lub pob nyem thiab pib kaw, tab sis tom qab ntawd koj zoo li yuav tsum muaj lub zog hloov pauv kom tau rov qab los. Kom tau txais qhov no thiab ua kom yooj yim siv txoj haujlwm kuv siv Pimoroni ON/OFF shim qhov no tso cai rau koj nias ib zaug thiab nws muaj zog thiab tom qab ntawd nias ntev thiab nws yuav ua haujlwm kaw kom huv. Ua kom nws me me nqa tau zoo ib yam Kuv siv lub txhab nyiaj qub uas saib xyuas lub roj teeb kom zoo ib yam. Powerbanks muaj nyiaj txaus txaus thiab muaj peev xwm khiav Pi rau qhov ncaj ncees.

Kuv teeb tsa lub laub kom khawm khawm kom haum rau qhov chaw uas lub hauv paus lub hwj chim tseem ceeb tau tawm sab nraum qab. Raws li muaj qhov ncua sijhawm thaum Pi khau looj plab hlaub kuv tawv xaim LED mus rau hauv 3v3 txoj kev tsheb nqaj hlau uas los txog thiab sai li sai tau thaum PI tau txais lub zog thiab muab qhov zoo tiag tiag ci ci ntawm lub xov tooj. Kuv muab 270R resistor hauv kab thiab lwm qhov kawg tsuas yog rau hauv av. Koj kuj tseem tuaj yeem ntxiv lwm tus rau GPIO tus pin yog tias koj xav muab cov txiaj ntsig ntxiv xws li flickering, tab sis tam sim no qhov no txaus los qhia tias lub zog ua haujlwm.

Kauj Ruam 9: Ntsuas Qhov Case

Ntsuas Qhov Case
Ntsuas Qhov Case
Ntsuas Qhov Case
Ntsuas Qhov Case
Ntsuas Qhov Case
Ntsuas Qhov Case

Nrog cov ntaub ntawv thiab cov chassis txhua qhov npaj tau thiab kuaj nws tsuas yog ob peb 4mm ntsia liaj qhov rooj thiab Nyloc ceev kom nws nyob hauv.

Lub Hwj Chim Lub Pob kuj tseem ua tau zoo rau hauv lub qhov hluav taws xob qub ua lub qhov.

Kuv kuj xav rov siv cov pob qhov qub thiab lawv tau tsim thaum xub thawj nws zoo li mus rau cov pas nrig tooj dag thiab loj me me rau lub lauj kaub. Raws li qhov no yuav tsis tau txais kev tuav ntxhib, Kuv tsuas yog plam qee qhov cua sov-ntsws hla lub lauj kaub thiab tom qab ntawd kaw cov pob qhov rooj mus rau qhov ntawd. Nws tuav zoo thiab nruj thiab koj tseem tuaj yeem cais nws yog tias tsim nyog.

Kauj ruam 10: Rub tawm Cov Ntaub Ntawv Suab

Image
Image

Kuv tab tom siv MP3 cov ntaub ntawv thiab muaj kev xaiv zoo los ntawm Archive.org, koj tuaj yeem pom cov pab pawg tshaj tawm ntawm kev ua tsov rog nyob rau lub sijhawm tsov rog thiab feem ntau yog ob qhov kev xaiv los xaiv.

Kuv pib nrog cov xov xwm feem ntau xaiv thiab cov no yog tom qab ntawd tau theej rau hauv phau ntawv teev npe ntawm PI. Koj tseem tuaj yeem pom qhov kev xaiv loj dua, hu ua Big one ntawm qhov txuas hauv qab no. Muaj ntau pua qhov kev tshaj tawm rau txhua xyoo thiab nws yog qhov zoo heev qhov nyiaj thiab ntau ntawm cov no.

archive.org/details/1939Radio Xov Xwm

archive.org/details/1940Radio Xov Xwm

archive.org/details/1941Radio Xov Xwm

archive.org/details/1942Radio Xov Xwm

archive.org/details/1943Radio Xov Xwm

archive.org/details/1944Radio Xov Xwm

archive.org/details/1945Radio Xov Xwm

Loj sau

archive.org/details/WWII_News_1939

archive.org/details/WWII_News_1940

archive.org/details/WWII_News_1941

archive.org/details/WWII_News_1942

archive.org/details/WWII_News_1943

archive.org/details/WWII_News_1944

archive.org/details/WWII_News_1945

Kuv siv Filezilla ua txoj hauv kev yooj yim los hloov cov no rau Pi vim nws tuaj yeem nkag mus thiab hloov pauv siv SSH, yog li tsis tas yuav teeb tsa SAMBA tsav lossis FTP server.

Kauj Ruam 11: Circuit thiab Software los Ua Si Cov Ntaub Ntawv

Dab Tsi Ntxiv?
Dab Tsi Ntxiv?

Thaum koj muaj lub amp ua haujlwm thiab koj tuaj yeem ua raws qhov teeb tsa txuas hauv qab no rau qhov uas koj tseem yuav xav tau teeb tsa mpg123 player, zoo nkauj ncaj nraim rau google tshawb nrhiav rau tus lej nab npawb hauv qab no. Tsuas yog xyuas kom koj muaj i2s thiab SPI qhib rau hauv koj li Raspi Config. Kuv tau muab cov ntawv no tso rau hauv phau ntawv teev npe/tsev/pi/ntim/kom kuv tuaj yeem khiav nws ntawm bootup tom qab.

#!/usr/bin/env nab hab sej

# WW2 Xov Tooj Cua- software los nyeem MCP3002 ADC thiab hloov mus rau qhov ntim thiab xyoo hloov kho # Ouput ntawm i2S amplifier 2018-10-20- Ajax Jones # Code fragments muab los ntawm https://learn.adafruit.com/adafruit-max98357-i2s- class-d-mono-amp/raspberry-pi-usage # MCP 3002 Python https://github.com/CaptainStouf/Adafruit-raspi-python/blob/master/Adafruit_MCP3002/MCP3002.py import RPi. GPIO li GPIO, sijhawm, os los ntawm os import listdir ntshuam cov txheej txheem los ntawm lub sijhawm ntshuam ntshuam ntshuam random GPIO.setmode (GPIO. BCM) # nyeem SPI cov ntaub ntawv los ntawm MCP3002 nti, 2 tau adc's (0 thiab 1) def readadc (adcnum, clockpin, mosipin, misopin, cspin): yog ((adcnum> 1) lossis (adcnum <0)): rov qab -1 GPIO.output (cspin, Tseeb) GPIO.output (clockpin, Cuav) # pib moos qis GPIO.output (cspin, Tsis tseeb) # nqa CS qis commandout = adcnum << 1; commandout | = 0x0D # pib ntsis + ib leeg-ntsis ntsis + MSBF ntsis commandout << = 4 # peb tsuas xav tau xa 4 khoom ntawm no rau kuv hauv ntau (4): yog (commandout & 0x80): GPIO.output (mosipin, Muaj tseeb) lwm qhov: GPIO.output (mosipin, False) commandout << = 1 GPIO.output (clockpin, True) GPIO.output (clockpin, False) adcout = 0 # nyeem hauv ib qho me ntsis thiab 10 ADC khoom rau kuv hauv ntau yam (11): GPIO.output (clockpin, True) GPIO.output (clockpin, False) adcout <0): print "No mp3 files found!" rov mp3_files luam tawm "--WW2 Xov tooj cua ------------------------------------------ --------------------- "last_read = 0 # khaws qhov chaw kawg ntawm lub lauj kaub ntim zaum kawg_year = 0 # khaws qhov kawg ntawm txoj hauj lwm ntawm lub lauj kaub ua siab ntev = 5 # tso cai me me kom me me txav ntawm lub lauj kaub tsis ua rau muaj kev hloov pauv thaum Tseeb: trim_pot_changed = Cuav xyoo_pot_changed = Cuav rau adcnum hauv thaj tsam (2): ret = readadc (adcnum, SPICLK, SPIMOSI, SPIMISO, SPICS) yog (adcnum == 0): # nyeem lub lauj kaub rau tus xaiv xyoo kom pom nws tau txav xyoo_adjust = abs (ret - last_year) yog (xyoo_adjust> kam rau ua+10): year_pot_changed = Muaj tseeb yog (year_pot_changed): # Tus nqi rau yog tias tom qab ntawv tuaj yeem ua ua tom qab nws tsim subprocess.call (['killall', 'mpg123']) # tua txhua MP3 khiav pw tsaug zog (0.1); yog ret 50 thiab ret = 150 thiab ret = 250 thiab ret = 350 thiab ret = 450 thiab ret = 550): war_year = "1945" # txuag tus nqi ntawm lub lauj kaub rau lub sijhawm tom ntej nyob ib puag ncig lub voj last_year = ret luam tawm (" Ua si los ntawm "), luam tawm (war_year), luam tawm (" tus lej ntawm cov ntaub ntawv = "), war_dir = '/tsev/pi/xov tooj cua/WWII_News _'+war_year+'/' play_list = list_year (war_year) num_of_files = len (play_list) luam tawm num_of_files play_file = random.randint (1, num_of_files) # randomly xaiv ib qho ntawm cov ntawv ua si war_mp3 = war_dir + play_list [play_file] subprocess. Popen (['mpg123', war_mp3]) # Siv mpg123 ua tus neeg ua si rau lub suab pw (0.1); # muab ncua me ntsis ua ntej txuas ntxiv yog tias (adcnum == 1): # nyeem lub lauj kaub ntim pot_adjust = abs (ret - last_read) yog (pot_adjust> kam rau ua): trim_pot_changed = Muaj tseeb yog (trim_pot_changed): set_volume = ret / 10.24 # hloov pauv 10 ntsis adc0 (0-1024) tus nqi lauj kaub rau hauv 0-100 ntim theem set_volume = puag ncig (set_volume) # puag ncig tawm tus lej zauv tus nqi set_volume = int (set_volume) # nrum ntim ua integer # Siv tus nqi los ntawm lub lauj kaub kom xa qib mus rau amixer prog print 'Volume = {volume}%'.format (volume = set_volume) set_vol_cmd = 'sudo amixer cset numid = 1 - {volume}%> /dev /null'.format (ntim = set_volume) os.system (set_vol_cmd) # teeb ntim # txuag lub hwj chim nyeem ntawv rau lub voj tom ntej last_read = ret # Ncua tseg tom qab hloov lub ntim kom peb tsis txhob ua ntau qhov kev hloov pauv yog tias lub lauj kaub hloov sijhawm nrawm. tsaug zog (0.5)

Kauj ruam 12: Pib khau raj Software ntawm Load

Muaj ntau txoj hauv kev los ua cov lus txib ntawm Pi ntawm kev pib, tab sis kuv pom qhov no yooj yim tshaj, Qhib Crontab

sudo crontab -e

Tam sim no tsuas yog ntxiv kab no

@reboot sej /home/pi/volume/year.py &

thiab qhov ntawd yuav tsum ua qhov dag, lwm zaus koj rov pib dua Lub suab tswj kev ua haujlwm yuav ua haujlwm thiab koj yuav tsum hnov koj thawj zaug tshaj tawm.

Kauj Ruam 13: Dab Tsi Ntxiv?

Dab Tsi Ntxiv?
Dab Tsi Ntxiv?

Tam sim no kuv tab tom tsim lub PCB me me los zaum saum raspberry pi yog li kuv tuaj yeem muaj qhov chaw txhawm rau txuas lub i2S lub tshuab hluav taws xob thiab ADC nrog rau qee qhov ntsia hlau txuas rau lub lauj kaub. Qhov no yuav cia kuv ua qhov teeb tsa me ntsis zoo dua thiab yooj yim ua ob peb ntxiv rau cov phooj ywg.

Tam sim no kuv tab tom khaws qee cov ntaub ntawv tam sim no rau qhov chaw sib tw xov tooj cua, pib nrog sputnik thiab txuas ntxiv mus txog rau lub hli tsaws.

Thov qhia rau kuv paub yog tias koj muaj tswv yim lossis xav tau cov lus qhia lossis cov lus qhia txog kev tso ib leeg rau koj tus kheej.

Kos npe tawm.

Kev Sib Tw Suab Nkauj 2018
Kev Sib Tw Suab Nkauj 2018
Kev Sib Tw Suab Nkauj 2018
Kev Sib Tw Suab Nkauj 2018

Qhov khoom plig thib ob hauv Kev Sib Tw Suab 2018

Pom zoo: