Cov txheej txheem:

DIY Raspberry Pi Ntse Google Calendar Clock: 4 Cov Kauj Ruam
DIY Raspberry Pi Ntse Google Calendar Clock: 4 Cov Kauj Ruam

Video: DIY Raspberry Pi Ntse Google Calendar Clock: 4 Cov Kauj Ruam

Video: DIY Raspberry Pi Ntse Google Calendar Clock: 4 Cov Kauj Ruam
Video: HUNGRY SHARK WORLD EATS YOU ALIVE 2024, Lub Xya hli ntuj
Anonim
DIY Raspberry Pi Ntse Google Calendar Moos
DIY Raspberry Pi Ntse Google Calendar Moos

Nov yog Smart moos Kuv tau ua rau Kev Sib Tw Clocks, Kuv vam tias koj nyiam nws!

Nws muaj Raspberry Pi nyob hauv nws uas tab tom ua Tus Txheej Txheem thiab Python txhawm rau nkag mus rau kuv li Google Calendar cov ntaub ntawv thiab luam tawm 10 hnub tom ntej uas koj muaj qee yam ntawm lub vijtsam.

Qhov kev pab cuam nab nab nkag mus rau cov ntaub ntawv qhia hnub, txuag nws rau hauv cov ntawv ntawm Raspberry Pi, uas Ua Haujlwm nyeem thiab tso rau ntawm lub vijtsam.

Kauj Ruam 1: Txhua Yam Xav Tau

Raspberry Pi:

www.amazon.com/Raspberry-Pi-MS-004-0000002…

(yog tias koj xav tau, koj tuaj yeem tau txais 3 B+ uas yuav nrawm dua)

Ib qho screen:

www.amazon.com/Elecrow-RPA05010R-800x480-D…

Thiab yog tias koj tsis muaj lub hwj chim muab, koj tuaj yeem pom ib qho ntawm no:

www.amazon.com/CanaKit-Raspberry-Supply-Ad…

Koj tseem yuav xav tau USB nas thiab keyboard (Nws tsis muaj teeb meem dab tsi hom lawv yog)

Kauj ruam 2: Programming

Yog tias koj muaj lub ntsuas loj dua, Kuv xav kom pom zoo siv qhov ntawd rau theem no vim tias lub vijtsam me me thiab nws nyuaj rau pom cov ntawv.

Ua ntej, koj yuav tsum tau teeb tsa Ua:

processing.org/download/

Xaiv (Khiav ntawm Pi?) Ntawm Linux daim ntawv teev npe, tom qab ntawd nyem Rub thiab ua raws cov lus qhia teeb tsa.

Thaum koj tau ua tiav, koj tuaj yeem rub tawm qhov program uas yog qhov kawg ntawm cov kauj ruam no, koj tseem tuaj yeem rub tawm qhov program nab hab sej, tom qab ntawd txav lawv mus rau hauv cov ntawv tais ceev tseg hauv tsev.

Koj yuav tsum tau siv Python 2.7 vim Python 3 tsis txhawb los ntawm Googles Python Calendar API.

Mus ntawm no thiab ua raws cov lus qhia rau teeb tsa API, (Kuv yuav qhia yuav ua li cas, tab sis tsuas yog Google tuaj yeem teeb tsa API)

developers.google.com/calendar/quickstart/…

Yog tias koj muaj txhua yam uas ua tiav, koj yuav tsum muaj peev xwm khiav qhov program nab nab tsis muaj qhov yuam kev.

Koj yuav tsum tau muab qhov no tso rau hauv ~/.config/lxsession/LXDE-pi/autostart file:

/usr/local/bin/processing-java --sketch =/home/pi/Clock.pde --run

thiab qhov no hauv /etc/rc.local cov ntaub ntawv:

nab hab sej /home/pi/Clock.py &

Thiab qhov ntawd yog txhua yam rau cov kauj ruam no!

Kauj Ruam 3: Xeem Nws

Cov kauj ruam no yooj yim zoo nkauj, tsuas yog ntsaws Pi rau hauv lub vijtsam, qhib lub zog (Tej zaum yuav muaj kev hloov pauv ntawm ib sab ntawm lub vijtsam kom qhib thiab tua lub teeb nraub qaum) thiab TADA! koj muaj Google Calendar Moos!

Yog tias nws tsis ua haujlwm, tsuas yog nug, Kuv yuav nyiam pab!

Kauj Ruam 4: Ua kom tiav

Muab qhwv
Muab qhwv

Qhov ntawd yog txhua yam! thov tsis txhob yig tau nug cov lus nug, thiab yog tias koj xav tsis thoob txog qhov xwm txheej, Kuv tsuas yog txiav kuv daim cardboard. (PS tsis txhob hnov qab pov npav hauv Kev Sib Tw Clocks!)

Pom zoo: