Cov txheej txheem:
- Kauj Ruam 1: Nqa Raspberry Pi
- Kauj Ruam 2: Qhib Python 3 (IDLE)
- Kauj Ruam 3: Ntshuam SenseHat rau Python
- Kauj Ruam 4: Tso Cov Lus
- Kauj Ruam 5: Yeem Tsis Zoo
Video: Yuav Qhia Li Cas Cov Lus ntawm SenseHat: 5 Kauj Ruam
2024 Tus sau: John Day | [email protected]. Kawg hloov kho: 2024-01-30 09:28
Nyob zoo, hnub no kuv yuav qhia koj yuav ua li cas tso saib cov lus ntawm Raspberry Pi SenseHat.
Kauj Ruam 1: Nqa Raspberry Pi
Ua ntej peb ua ib qho coding ntawm Raspberry Pi, peb yuav tsum txuas cov xov hlau zoo rau nws. Txuas lub HDMI cable rau hauv HDMI chaw nres nkoj, ntsaws lub zog, thiab txuas cov keyboard thiab nas rau nws. Yog tias koj xav tau, koj tuaj yeem txuas tus ethernet cable rau nws yog tias koj xav txuas rau Is Taws Nem. Txuas nws mus rau tus saib, thiab voila! Koj tuaj yeem nkag mus rau Raspberry Pi.
Kauj Ruam 2: Qhib Python 3 (IDLE)
Nyob rau sab laug saum toj kawg nkaus ntawm koj lub vijtsam, koj yuav tsum pom lub cim duab geometric raspberry. Nyem rau ntawm qhov ntawd, thiab qee qhov kev xaiv yuav los. Koj yuav tsum pom "Programming". Nyem rau qhov ntawd, thiab tom qab ntawd nyem rau "Python 3 (IDLE). Lub qhov rai yuav tsum qhib hu ua" Python 3.5.3 Plhaub
Kauj Ruam 3: Ntshuam SenseHat rau Python
Nyob rau sab laug sab saum toj ntawm lub qhov rais, ntaus (raws nraim li tau nyeem):
los ntawm sense_hat ntshuam SenseHat
Yog tias koj ua nws raug, qhov "los ntawm" thiab "ntshuam" yuav tsum yog txiv kab ntxwv. Nias nkag mus, thiab ntaus:
kev nkag siab = SenseHat ()
Nco ntsoov tias koj siv cov kab ntawv. Lawv qhia lub ntsiab lus txib.
Kauj Ruam 4: Tso Cov Lus
Nias sau ob zaug, tom qab ntawd ntaus:
sense.show_message ("Koj cov lus ntawm no")
Qhov ntawd yuav tsum yog nws! Koj cov lus yuav tsum tau tshwm ntawm lub vijtsam!
Kauj Ruam 5: Yeem Tsis Zoo
Yog tias koj xav tau txais qhov zoo nkauj ntxiv, koj tuaj yeem hloov qhov nrawm, xim ntawv, thiab xim tom qab ntawm cov lus.
Txhawm rau hloov cov ntawv nrawm, sau cov lus txib zoo li no:
sense.show_message ("koj cov lus ntawm no", text_speed = random#)
1 yog lub nrawm nrawm.
Txhawm rau hloov cov xim ntawm koj cov ntawv lossis keeb kwm yav dhau, koj yuav tsum teeb tsa RGB hloov pauv ua ntej. RGB hloov pauv yog xim, thiab koj teeb lawv zoo li no:
r = (255, 0, 0) cov
Thawj tus lej yog tus nqi liab, ntsuab thib ob, thiab xiav thib peb. Tom qab teeb tsa qhov hloov pauv, sau cov lus txib zoo li no:
sense.show_message ("koj cov lus ntawm no", text_colour = sib txawv, back_colour = sib txawv)
Koj tuaj yeem ua ke ib qho ntawm cov lus txib no kom hloov pauv koj cov lus.
Pom zoo:
Yuav Ua Li Cas Thiaj Li Siv Soldering (Cov Lus Qhia Cuab Yeej & Cov Lus Qhia): 4 Cov Kauj Ruam
Yuav Ua Li Cas Thiaj Li Siv Soldering (Cov Lus Qhia Cuab Yeej & Cov Cuab Yeej): Hav guys! Kuv vam tias koj twb nyiam kuv cov lus qhia yav dhau los " Arduino MIDI Controller DIY " thiab koj tau npaj rau qhov tshiab, raws li ib txwm kuv tab tom kawm qhia kom qhia koj yuav ua li cas thiaj ua tau qee yam khoom siv hluav taws xob txias, thiab tham txog
Kuv Me Me Whoop: Daim Ntawv Qhia Whoop + Cov Lus Qhia thiab Cov Lus Qhia: 8 Kauj Ruam
Kuv Me Me Whoop: Daim Ntawv Qhia Whoop + Cov Lus Qhia thiab Cov Lus Qhia: Kev Ceeb Toom: Tam sim no koj tab tom nkag mus rau kuv thawj qhov kev qhia, thiab koj yuav ntsib ntau yam kev ruam thiab tsis muaj phiaj xwm thiab/lossis txuj ci. Paub txog qhov no yog kuv tus kheej Tiny Whoop teeb tsa uas kuv siv txhua hnub, yog li kuv xav tias kuv yuav qhia nws. Nws yog phooj ywg mus ncig (tsis muaj
Yuav Ua Li Cas Tau Txais Cov Daws Teeb Meem Tawm ntawm Cov Lus Qhia: 4 Cov Kauj Ruam
Yuav Ua Li Cas Kom Tau Cov Duab Daws Teeb Meem Tawm ntawm Cov Lus Qhia: Koj puas tau txaus siab rau daim duab qhia no thiab xav khaws daim ntawv daws teeb meem siab ntawm nws? Qhov zoo me me no tau yooj yim hla
Yuav Ua Li Cas Tsim Lo Lus Ntawm Cov Lus Qhia: 9 Kauj Ruam
Yuav Ua Li Cas Tsim Lo Lus Ntawm Cov Lus Qhia: Ntawm cov lus qhia no, Kuv yuav qhia kuv "tsis pub leej twg paub" ntawm lo lus tsim ntawm cov lus qhia Kuv tau ua qhov no kom xaus rau txhua tus neeg uas tau thov ntawm cov lus hais yuav ua li cas thiaj tsim cov lus, zoo li ntau tus neeg xav paub yuav ua li cas ua cov ntawv monospace tab sis
Kaw Cov Suab rau Yeeb Yaj Kiab thiab Animations: Ob peb Cov Lus Qhia Ceev thiab Cov Lus Qhia: 8 Kauj Ruam
Kaw Cov Suab rau Yeeb Yaj Kiab thiab Animations: Ob peb Cov Lus Qhia Ceev thiab Ua Ntej: Yog tias koj yog tus kws kos duab, lossis tsuas yog menyuam yaus uas nyiam ua qee zaum ua cov yeeb yaj kiab rau youtube, tej zaum koj yuav muaj ob peb qhov teeb meem nrog kaw lub suab. Tsis muaj teeb meem li cas visually zoo cov vis dis aus lossis cov animation yuav yog, yog tias cov neeg saib nws tuaj yeem