Cov txheej txheem:
- Kauj ruam 1: Npaj Npaj rau Txoj Haujlwm
- Kauj ruam 2: Programming
- Kauj Ruam 3: Teeb Twitter thiab teeb tsa Boot
- Kauj ruam 4: Kho vajtse
Video: Tweetbot - Twitter Txuas Duab Lub Rooj Muag Khoom: 4 Cov Kauj Ruam (nrog Duab)
2024 Tus sau: John Day | [email protected]. Kawg hloov kho: 2024-01-30 09:27
Hauv txoj haujlwm no, peb yuav ua lub koob yees duab Raspberry Pi uas tuaj yeem siv tau hauv lub rooj muag khoom duab ntawm ob tog. Tom qab thaij duab, nws tuaj yeem tshaj tawm rau tus account Twitter uas tau xaiv rau txhua tus neeg saib tom qab. Cov ntawv qhia no yuav suav nrog cov tshuab thev naus laus zis ntawm txoj haujlwm no, yog li ntawd cov phiaj xwm, teeb tsa, thiab qee qhov thaiv. Qhov no tso cai rau koj kom hloov kho koj tus kheej lub rooj muag khoom raws li qhov chaw koj yuav teeb nws hauv thiab tus kheej nyiam.
Nov yog yam koj yuav xav tau:
Raspberry Pi 3*: $ 34.49 (Koj tuaj yeem siv lwm yam tab sis qhov kev qhia no yog ua raws 3)
HDMI Cable*: $ 6.99
Mus: $ 5.49
Keyboard: $ 12.99
8GB microSD Card*: $ 7.32
Lub Hwj Huam Muaj Peev Xwm rau Raspberry Pi*: $ 9.99
Case rau Raspberry Pi*: $ 6.98
PiCamera: $ 27.99
Tus nqi: $ 6.86
1 Pushbutton: $ 7.68
2 Txiv neej-Poj niam jumper cables: $ 4.99
Saib xyuas rau HDMI (Koj tuaj yeem siv VNC lossis SSH yog tias koj xav tau tab sis kuv yuav tsis hla qhov teeb tsa ntawm no)
Cov khoom nrog lub hnub qub (*) txhua tus tuaj yeem yuav ua ke ntawm no: $ 69.99
Koj yuav muaj feem ntau ntawm cov no twb yog koj tau siv Raspberry Pi ua ntej. Ua ntej peb pib qhia, Kuv yuav xav tias koj muaj qhov hloov tshiab kawg ntawm Raspbian ntawm koj li Raspberry Pi. Yog koj xav tau kev pab, mus ntawm no.
Kauj ruam 1: Npaj Npaj rau Txoj Haujlwm
Qhib lub davhlau ya nyob twg ntawm koj li Raspberry Pi (luv: Ctrl-Alt-T).
Khiav kab no: sudo apt-tau hloov tshiab thiab tom qab ntawd sudo apt-tau hloov kho -y uas yuav hloov kho koj cov pob tam sim no thiab teeb tsa qee qhov tshiab.
Tam sim no, peb yuav tsim cov ntaub ntawv uas peb txoj haujlwm Python yuav nyob. Yog tias koj xav ua qhov no siv GUI, mus rau koj lub desktop, nyem txoj cai, thiab nyem Tsim Tshiab - Cov Ntaub Ntawv Tsis Raug. Lub npe cov ntaub ntawv "booth.py". Txog tam sim no, tso nws tseg thiab tseg.
Yog tias koj xav ua cov kauj ruam uas siv lub davhlau ya nyob twg. Ntaus hauv cd ~/Desktop thiab tom qab ntawd sudo nano booth.py. Sau dab tsi rau nws tam sim no thiab ua Ctrl-X thiab tom qab ntawd Y thiab tom qab ntawd Enter.
Tam sim no, peb yuav tsum teeb tsa lub tsev qiv ntawv "Twython" uas peb yuav siv los tshaj tawm cov duab rau Twitter.
Ntaus hauv lub davhlau ya nyob twg: sudo pip3 nruab twython
Ib qho ntxiv, khiav sudo pip3 nruab twython -hloov kho
Tsis tas li, ua sudo raspi-teeb tsa thiab qhib lub koob yees duab. Tom qab qhov no, reboot.
Tam sim no koj tau npaj los pib qhov phiaj xwm!
Kauj ruam 2: Programming
Mus rau koj cov ntaub ntawv booth.py thiab muab cov lej txuas rau hauv nws. Hauv cov ntawv txuas nrog, txhua kab lus tau hais tawm kom koj paub tseeb tias yog dab tsi mus. Hauv theem tom ntej, peb yuav tau txais cov cim tokens rau Twitter API los ua haujlwm.
Peb yuav ua haujlwm nrog cov pins uas tau hais tseg hauv cov cai hauv cov kauj ruam yav tom ntej los xaim cov laub khawm.
Vam tias, koj nkag siab tias txoj cai ua haujlwm li cas los ntawm kuv cov lus!
Kauj Ruam 3: Teeb Twitter thiab teeb tsa Boot
Ntawm no, Kuv yuav xav tias koj muaj Twitter Account uas koj yuav siv. Yog tsis yog, tsim ib qho tam sim no.
Mus rau apps.twitter.com
Tsim App tshiab
Sau rau hauv qhov chaw xav tau, lees paub kev pom zoo, thiab txuas ntxiv mus
Txheeb nrog daim duab saum toj no kom pom tias koj pom lub vijtsam tib yam li kuv.
Mus rau Keys thiab Access Tokens
Scroll cia thiab nyem Tsim Kuv Access Tokens
Tam sim no coj 4 lub tokens uas koj pom thiab muab tso rau hauv booth.py.
ck: Tus Neeg Siv Khoom Ntshiab, cs: Tus Neeg Siv Khoom Tsis Pub Leej Twg Paub, ntawm: nkag mus rau token, ats: Nkag Mus Rau Token Secret
Peb xav kom muaj peev xwm ua qhov haujlwm thaum Raspberry Pi khau raj los ntawm kev nyem lub pob pib. Peb yuav xaim cov nyees khawm tom qab, tab sis peb yuav ua rau cov kauj ruam khau raj tam sim no. Mus rau lub davhlau ya nyob twg thiab ntaus sudo nano /etc/rc.local
Ua ntej tawm 0, ntaus python3 /home/pi/Desktop/booth.py
Txuag cov ntaub ntawv
Tam sim no koj tau ua tiav teeb tsa raspberry pi program. Nco ntsoov tias txhua yam tsuas yog ua haujlwm thaum muaj Wifi Txuas. Cia peb txav mus rau ntu kho vajtse.
Kauj ruam 4: Kho vajtse
Kuv zoo siab uas koj tau ua qhov no deb! Ua ntej, peb yuav tsum txuas lub koob yees duab rau peb Raspberry Pi. Lub vev xaib no qhia koj yuav siv lub cev li cas txuas nws. Peb kuj yuav tsum xaim lub pob uas yuav tswj txhua yam. Koj xav tau 2 tus txiv neej-poj niam txuas xov tooj, daim txiag ntoo, thiab khawm. Muab lub pob hla nruab nrab ntawm daim ntawv qhia zaub mov. Muab ob txoj hlua xaim rau ob ntawm txoj hlua ntawm ib sab ntawm lub pob (saib daim duab). Txuas tus poj niam kawg ntawm ib lub xov hlau mus rau hauv av ntawm Raspberry Pi thiab Lwm Tus rau GPIO 4. Saib daim duab kom pom qhov twg los txuas ob lub xov hlau no.
Tam sim no koj ua tiav! Nov yog qhov koj siv koj qhov kev tsim tshiab. Txuas lub raspberry pi rau lub hwj chim thiab tos kom nws qhib. Nias lub pob thiab tso tawm sai tom qab, thiab yuav muab ib daim duab thiab tso rau hauv Twitter. Yog tias koj tuav lub pob rau 3 vib nas this lossis ntau dua, Raspberry Pi yuav kaw zoo (tsis txhob cia li ntsaws nws). Sim qhov no thiab saib yog txhua yam ua haujlwm raws li tau piav qhia. Yog lawm, yog tias koj muaj lus nug lossis tswv yim, tso lawv tawm hauv cov lus.
Pom zoo:
Hloov-Hloov Cov Khoom Ua Si: Cov Khoom Ua Si Cov Khoom Ua Si Ua Tau Zoo!: 7 Cov Kauj Ruam (nrog Duab)
Hloov-Hloov Cov Khoom Ua Si: Cov Khoom Siv Hluav Taws Xob Ua Tau Zoo!: Qho khoom ua si hloov pauv qhib txoj hauv kev tshiab thiab kev daws teeb meem kom tso cai rau menyuam yaus uas muaj lub cev muaj peev xwm txwv lossis kev xiam oos qhab kev loj hlob los cuam tshuam nrog cov khoom ua si ntawm nws tus kheej. Hauv ntau qhov xwm txheej, cov menyuam yaus uas xav tau cov khoom ua si hloov pauv tsis tuaj yeem nkag mus
Abellcadabra (Lub ntsej muag lees paub lub qhov rooj kaw qhov rooj): 9 Cov Kauj Ruam
Abellcadabra (Lub ntsej muag lees paub lub Qhov Rooj Xauv Qhov System): Tso ib puag ncig thaum lub sijhawm raug cais tawm, Kuv tau sim nrhiav txoj hauv kev tua lub sijhawm los ntawm kev tsim lub ntsej muag lees paub rau lub qhov rooj tsev. Kuv npe nws Abellcadabra - uas yog ua ke ntawm Abracadabra, kab lus khawv koob nrog lub qhov rooj uas kuv tsuas yog siv lub tswb. LOL LAWD
Yuav Ua Li Cas Kho Lub Rooj Tog Zaum Lub Hwj Huam Muab Tawm Tawm ntawm Cov Pc Cov Khoom Siv Hluav Taws Xob: 6 Cov Kauj Ruam (nrog Duab)
Yuav Ua Li Cas Hloov Kho Lub Rooj Tog Zaum Lub Hwj Huam Tawm ntawm Cov Pc Cov Khoom Siv Hluav Taws Xob qub: Kuv muaj lub PC qub Lub Hwj Huam Muab tso nyob ib puag ncig.Yog li kuv tau txiav txim siab los ua lub rooj zaum kho kom raug lub zog tawm ntawm nws.Peb xav tau ntau qhov sib txawv ntawm qhov hluav taws xob rau lub zog lossis txheeb xyuas cov hluav taws xob sib txawv lossis cov phiaj xwm. Yog li nws ib txwm zoo kom muaj kev kho tau
Rov Siv Cov Khoom Siv Yas Zib Zib Zib Zib Hnab Rau Hauv Cov Chaw Muag Khoom Chaw Muag Khoom: 6 Kauj Ruam
Reuse Recycle Plastic Chewing Gum Cannister Into Solder Station Dispenser: Cov lus qhia no yuav qhia koj yuav ua li cas siv cov yas zom zom tuaj yeem ua kom khaws cov kab laug sab zoo thiab huv. Qhov no yuav ua haujlwm ntawm lwm yam khoom siv spooled thiab; Txoj hlua, Hlau, Cables
Lub Rooj Muag Khoom Loj Lub Pob Liab Loj: Teensy LC: 3 Cov Kauj Ruam (nrog Duab)
Lub Koob Yees Duab Loj Lub Pob Liab Loj: Teensy LC: Ntau xyoo dhau los, Kuv tau tsim DIY qhib huab cua Photo Booth rau phooj ywg ua tshoob. Kuv siv "lub rooj muag khoom" ntau lub sijhawm rau ntau yam xwm txheej, tab sis xav hloov kho teeb tsa rau kev teeb tsa yooj yim dua. Yeej, dSLR ntawm lub tswb, thiab ncej puab