Cov txheej txheem:
- Kauj ruam 1: Yam Koj Yuav Tsum Tau
- Kauj Ruam 2: Tau Txais Cov Npog Npog thiab Spotify URI's
- Kauj Ruam 3: Sau Spotify URI's Nrog TagWriter
- Kauj Ruam 4: Siv Automate los Pib Ua Si Suab Nkauj los ntawm Smartphone Kov
- Kauj ruam 5: Cov lus ceeb toom
Video: Albums Nrog NFC Cim kom Tuaj Ua Si Spotify Music ntawm Chromecast: 5 Kauj Ruam
2024 Tus sau: John Day | [email protected]. Kawg hloov kho: 2024-01-30 09:26
Txoj haujlwm no tau pib nrog lub tswv yim los ua ib qho album collage ntawm kuv cov neeg ua yeeb yam tshaj plaws ntawm Spotify. Tom qab qee qhov ua si nrog Spotify API hauv Python, Kuv xav tias nws yuav zoo los txuas cov nkauj npog no rau lawv Spotify URI's thiab pib ua si los ntawm kev kov lawv nrog kuv lub xov tooj. Lub tshuab siv tshuab tso cai rau cia li ua si kov cov albums ntawm Chromecast ntaus ntawv.
Kauj ruam 1: Yam Koj Yuav Tsum Tau
- NFC cim npe: Muaj ntau daim ntawv teev npe tau raws li koj muaj albums koj xav tso tawm. (Zoo dua yuav qee yam ntxiv uas koj tuaj yeem tsis muaj ntau NFC cim npe hauv tsev) Kuv yuav kuv li ntawm AliExpress (100 cim npe txog 10 $).
- Ib lub xov tooj hauv xov tooj nrog NFC
- NFC TagWriter los ntawm NXP, daim ntawv thov Android dawb NFC sau ntawv
- Automate, daim ntawv thov Android siv tshuab pub dawb los siv ua haujlwm
-
Ib tus account Spotify. Txoj haujlwm no tau sau los siv nrog Spotify: a Spotify URI (Uniform Resource Identifiers for sharing and locating artists, albums, searches, playlists and songs within the Spotify library) is written on a NFC tag and later on read by Automate to start playing suab paj nruag ntawm Spotify (thiab tejzaum nws pov rau koj Chromecast).
- (Yeem Xaiv) Lub Chromecast ntaus ntawv. Yog tias koj tsis muaj lub cuab yeej los pov rau, cov nkauj yuav yooj yim pib ua si ntawm koj lub smartphone.
- (Tsis teb los tau) Album npog: koj tuaj yeem siv daim npog npog uas koj twb muaj hauv tsev lawm. Kuv tsis muaj daim npog npog li txhua yam kuv lub suab paj nruag tau ntws los ntawm Spotify yog li kuv rub cov nkauj npog nrog Python tsab ntawv los ntawm kauj ruam 2a thiab luam tawm lawv li cov duab tsis pom kev ntawm 10 cm x 10 cm.
Kauj Ruam 2: Tau Txais Cov Npog Npog thiab Spotify URI's
Muaj ob txoj hauv kev koj tuaj yeem tau txais daim npog album thiab Spotify URI's:
- Kauj Ruam 2a piav qhia yuav ua li cas koj thiaj tuaj yeem rub tawm daim npog npog ntawm koj cov kws ua yeeb yam saum toj kawg nkaus hauv Spotify siv Python tsab ntawv uas kuv tau sau. Tsab ntawv no tseem yuav tsim cov ntaub ntawv.csv tsim nyog nrog rau tag nrho cov Spotify URI rau cov nkauj hauv Spotify. Qhov no.csv cov ntaub ntawv xav tau hauv qib 3 txhawm rau sau NFC cim npe.
- Kauj ruam 2b piav qhia yuav ua li cas koj tuaj yeem tau txais daim npog thiab Spotify URI tus kheej tsis tas siv Python sau ntawv thiab txhim kho Python pob. Cov kauj ruam no yooj yim dua tab sis ua haujlwm ntau yog tias koj yuav tsum rub tawm ntau daim npog npog ntawm tus kheej, tshawb rau txhua URI koj tus kheej thiab luam thiab dhau mus rau hauv cov ntaub ntawv.csv tsim nyog.
Kauj Ruam 2a: Tau rub tawm cov nkauj npog thiab Spotify URI's nrog tsab ntawv Python
Hauv qib 10 album npog ntawm txhua ntawm koj 60 tus neeg ua yeeb yam tshaj plaws ntawm Spotify tau txiav tawm ncaj qha los ntawm Python tsab ntawv kuv tau sau. Thaum xub thawj Python pob Spotipy yuav tsum tau teeb tsa ntawm koj lub PC. Ntawm cov kab ke nrog pip teeb tsa qhov no tuaj yeem ua tiav los ntawm:
$ pip nruab spotipy
Python tsab ntawv tuaj yeem pom ntawm kuv Github li album_covers_and_URIs.py Koj khiav cov ntawv los ntawm lub davhlau ya nyob twg lossis hais kom sai li:
$ python albums_and_URIs.py
Thawj thawj zaug koj khiav tsab ntawv txuas yuav raug qhib hauv koj lub browser ua ntej los muab cov ntawv nkag mus nyeem koj li Spotify "tus neeg siv saum toj" txheeb cais. Tom qab muab daim ntawv thov nkag mus, koj tau hais qhia rau qhov txuas pib nrog https://example.com/… Luam tag nrho qhov txuas thiab muab nws tso rau hauv lub davhlau ya nyob twg lossis hais kom sai kom muab tsab ntawv tso cai tsim nyog. Hauv qab no qhov program rub tawm 10 daim npog rau ib tus kws kos duab rau hauv daim nplaub tshev Npog/ <artist_name/ Nws yog rau koj los txiav txim siab cov album twg koj xav luam tawm rau koj cov collage thiab koj xav muab pov tseg. Kuv luam kuv li 10 cm x 10 cm cov duab tsis pom ntawm qhov kev pabcuam luam duab online rau txog 0.10 EUR ib leeg. Dhau li npog npog, kuj tseem muaj cov ntaub ntawv.csv tsim muaj tag nrho Spotify URI's ntawm cov nkauj rub tawm. Cov ntaub ntawv.csv no muaj npe TagWriter_mass_encoding.csv thiab twb tau tsim los siv rau hauv TagWriter daim ntawv thov kom yooj yim sau ntau daim ntawv NFC. Nws tau pom zoo kom tshem tawm txhua kab ntawm cov nkauj uas koj tsis tau luam tawm thiab tsis xav sau NFC lossis rau. Yog tias muaj daim npog npog uas koj tau luam tawm uas tsis tau rub los ntawm Python tsab ntawv, saib cov kauj ruam 2b txhawm rau ntxiv Spotify URI rau tus kheej rau hauv.csv cov ntaub ntawv.
Kauj Ruam 2b: Rub tus kheej npog album npog thiab nrhiav Spotify URI's
Yog tias koj tsis xav siv Python tsab ntawv los rub tawm cov nkauj npog ntawm koj cov kws ua yeeb yam saum toj kawg nkaus ntawm Spotify, ua raws cov theem no. Nrog kev tshawb nrhiav Google yooj yim koj tuaj yeem pom txhua daim npog uas koj xav luam tawm. Kuv luam kuv li 10 cm x 10 cm cov duab tsis pom ntawm qhov kev pabcuam luam duab online rau txog 0.10 EUR ib leeg. Koj kuj yuav tsum tau tshawb nrhiav rau txhua lub album Spotify URI. Qhov no tau ua tiav hauv Spotify desktop app raws li tuaj yeem pom hauv lub vijtsam luam tawm. Xaiv cov nkauj xaiv thiab mus qhia> 'Luam Spotify URI'. Spotify URI yuav tsum tau ntxiv rau.csv cov ntaub ntawv uas tau tsim tshwj xeeb rau TagWriter app uas peb yuav siv los sau yooj yim ntau NFC cim npe. Tus qauv nrog qee qhov piv txwv cov ntaub ntawv tau nthuav tawm hauv lub screenshot thiab tuaj yeem rub tawm ntawm kuv nplooj Github li Tagwriter_mass_encoding.csv. Nco ntsoov sau rau hauv tus qauv no nrog koj Spotify URI's thiab cov lus piav qhia muaj txiaj ntsig. Thaum npaj txhij, khaws cov ntawv no dua ua cov ntaub ntawv.csv.
Thaum koj tau luam koj daim npog album, tso ib daim NFC tag rau tom qab ntawm txhua daim npog album. Nws yog qhov zoo tshaj los tso cov cim npe NFC ntawm tib txoj haujlwm ntawm cov nkauj kom txhawm rau nyeem cov ntawv yooj yim dua.
Kauj Ruam 3: Sau Spotify URI's Nrog TagWriter
Tagwriter_mass_encoding.csv cov ntaub ntawv yuav raug siv ua cov ntaub ntawv rau NFC TagWriter los ntawm NXP hauv app. Thov teeb tsa daim ntawv thov no ntawm koj lub xov tooj NFC hauv xov tooj ntawm Google Play Store. Cov ntaub ntawv Tagwriter_mass_encoding.csv yuav tsum muab khaws cia rau hauv koj lub smartphone rau daim ntawv thov nkag mus rau nws. Txhawm rau sau cov NFC cim npe los ntawm cov ntawv.csv ua raws cov kauj ruam tom ntej:
- Hauv lub vijtsam hauv tsev ntawm TagWriter app xaiv 'Sau Cov Ntawv"
- Xaiv "Sau los ntawm CSV"
- Mus rau koj cov ntaub ntawv.csv thiab xaiv nws los ntawm LONG nias cov ntawv
- Ntawm sab xis saum toj koj pom Dataset index (1/6). Qhov no txhais tau tias daim ntawv thov nyeem 6 nkag rau hauv.csv cov ntaub ntawv (saib cov duab hauv kauj ruam 2b rau 6 nkag hauv tus qauv). Xaiv "Sau"
- Hauv qhov screen tom ntej koj pom cov ntsiab lus ntawm cov khoom tam sim no. Hauv lub vijtsam qhov no yog "spotify: album: 32MqLe …" uas sib haum rau thawj zaug nkag rau hauv kuv Cov Ntawv Sau Tag_mass_encoding.csv. Cov ntawv no muaj cov lus piav qhia Dawb Lies: BIG TV yog li cov ntsiab lus no yuav tsum tau sau rau hauv daim ntawv ntawm daim ntawv npog no.
- Nqa koj lub xov tooj mus rau NFC lossis sau lub spotify URI rau daim ntawv. Thaum daim ntawv pom los ntawm koj li NFC nti, nws yuav raug sau cia. NFC nti ntawm koj lub xov tooj ntawm tes yuav tsum nyob ze rau lub nti txhawm rau ua qhov no. Yog tias qhov no tsis tshwm sim yooj yim, ua Google tshawb nrhiav kom pom qhov tseeb ntawm NFC nti ntawm koj lub cuab yeej.
Kauj Ruam 4: Siv Automate los Pib Ua Si Suab Nkauj los ntawm Smartphone Kov
Automate yog lub tshuab siv tshuab zoo ib yam li Tasker tab sis nws siv cov txheej txheem kev nkag mus tau yooj yim dua thiab muaj ib qho dawb kiag li. Kuv twb tau sau qhov ntws rau txoj haujlwm no yog li koj tsuas yog yuav tsum tau xa cov dej ntws mus rau hauv app thiab hloov qee qhov chaw rau koj teeb tsa. Cov dej ntws tuaj yeem rub tawm los ntawm hauv Automate app los ntawm kev xaiv lub zej zog lub cim nyob rau sab xis saum toj thiab tshawb rau "Spotify album los ntawm NFC lossis Chromecast". Daim duab ntws tau nthuav tawm hauv lub screenshot saum toj no. Koj yuav tsum tau hloov qee qhov thaiv rau koj li Chromecast thiab Spotify app teeb tsa:
- Sab saud sab laug tsis sib xws: hauv Lus Askiv version ntawm Spotify app cov khoom siv tau nthuav tawm hauv qab cov ntawv sau npe "Devices Available". Yog tias koj lub app yog lwm yam lus, hloov tus nqi ntawm qhov thaiv no.
- Cov thaiv tom ntej: Ntawm no lub npe ntawm koj lub cuab yeej Chromecast tau khaws cia. Yog tias koj li txawv ntawm "Chav Nyob", hloov tus nqi ntawm qhov thaiv no.
- Yog tias koj muaj Android ntaus ntawv qeeb: sim hloov lub sijhawm ncua sijhawm ncua txhawm rau kom tau txais kev nyem sib cuam tshuam raug.
- Yog tias koj tsuas xav ua suab paj nruag ntawm koj lub cuab yeej thiab tsis pov rau Chromecast: tshem tawm cov kab ntws tawm los ntawm hauv qab "Ncua Sijhawm 3s" thaiv.
Thaum khiav cov dej no hauv keeb kwm yav dhau, koj yuav tsum tuaj yeem ua cov nkauj ntawm koj lub smartphone lossis Chromecast los ntawm kev yooj yim kov lub npog album ntawm NFC tag qhov chaw. Yog tias qee yam tsis ua haujlwm raug, saib Cov Logs ntawm Automate ntws.
Kauj ruam 5: Cov lus ceeb toom
- Kuv tso kwv yees li 45 daim npog hauv daim duab loj (100 cm x 60 cm). Tawm tsam kuv qhov kev cia siab NFC cov ntawv tau nyeem yooj yim tom qab lub khob iav me me.
- Spotify URI cov npe ntawm cov npe kuj tseem txhawb nqa los ntawm Automate ntws. Koj tuaj yeem nrhiav Spotify URI ntawm koj cov playlists uas koj nyiam thiab sau lawv rau ntawm TAG ib yam nkaus li cov kauj ruam dhau los.
- Spotify API tsis tso cai nug tus neeg siv cov nkauj ntau tshaj plaws. Yog vim li cas ua ntej tshaj plaws cov kws ua yeeb yam tau nug thiab tom qab ntawd npog cov album ntawm 10 saum toj kawg nkaus albums ntawm tus kws kos duab ntawd tau rub tawm.
Pom zoo:
Ua kom muaj kev sib nrug deb ntawm lub dav hlau tooj liab thiab Cov Cim Cim: 3 Kauj Ruam
Ua kom pom kev deb ntawm lub dav hlau tooj liab thiab Cov Cim Cim: Kuv yog tus nyiam ua haujlwm thiab kuv tsim Cov Ntawv Luam Circuit Court (PCB) rau kuv cov blog thiab Youtube Videos. Kuv xaj kuv li PCB online los ntawm LionCircuits. Nws yog lub tuam txhab Indian thiab lawv muaj lub tshuab siv tshuab rau kev tsim khoom. Nws cia li tshuaj xyuas koj Ger
"Ntiaj Teb Yooj Yim" Neuralizer-build (Txiv neej hauv Cov Cim Cim Dub): 10 Kauj Ruam (nrog Duab)
"Ntiaj Teb Yooj Yim" Neuralizer-tsim (Txiv neej hauv Cov Cim Cim Dub): Koj puas yuav mus rau kev hnav khaub ncaws hauv ob peb hnub xwb, tab sis tseem tsis muaj khaub ncaws? Tom qab ntawv qhov kev tsim no yog rau koj! Nrog looj tsom iav dub thiab looj tsom iav dub, qhov kev txhawb nqa no ua tiav koj Cov Txiv Neej hauv Cov ris tsho dub. Nws yog raws qhov yooj yim tshaj plaws tau hluav taws xob Circuit
Tus Qauv Cim Cim Tsim los ntawm Arduino Servo Motors: 5 Kauj Ruam
Tus Qauv Caij Nyoog Tsim los ntawm Arduino Servo Motors: Nrog rau cov lus qhia no Kuv yuav qhia koj yuav tsim Clock li cas siv Arduino Nano thiab Servo motors. Txhawm rau ua qhov no koj yuav xav tau cov khoom hauv qab no
LCD Invaders: Qhov Chaw Invaders Zoo Li Kev Ua Si ntawm 16x2 LCD Cov Cim Cim: 7 Kauj Ruam
LCD Invaders: Qhov Chaw Invaders Zoo Li Kev Ua Si ntawm 16x2 LCD Cov Cim Cim: Tsis tas yuav tsum qhia txog zaj dab neeg "Space Invaders" kev ua si. Qhov ntxim nyiam tshaj plaws ntawm txoj haujlwm no yog tias nws siv cov ntawv nyeem rau cov duab tso tawm. Nws tau ua tiav los ntawm kev siv 8 tus cim tshwj xeeb.Koj tuaj yeem rub tawm tiav Arduino
Yuav Ua Li Cas Saib Starwars Nrog Khoos Phis Tawj Cov Cim ntawm Cov Lus Hais Kom Ua: 3 Kauj Ruam
Yuav Ua Li Cas Saib Starwars Nrog Khoos Phis Tawj Cov Cim ntawm Command Prompt: Qhov no tsuas yog kev dag ntxias kuv tau kawm thiaj li kuv txiav txim siab tshaj tawm qhov no. Koj tuaj yeem saib feem ntau pib ntawm thawj zaj yeeb yaj kiab Starwars, uas yog ntu IV los ntawm kev hais kom ua los ntawm qee tus txiv leej tub. Nws zoo nkauj heev. DISCLAIMER: Kuv tsis tau txais credit rau t