Cov txheej txheem:

Google Trends Powered Christmas Tree: 6 Kauj Ruam (nrog Duab)
Google Trends Powered Christmas Tree: 6 Kauj Ruam (nrog Duab)

Video: Google Trends Powered Christmas Tree: 6 Kauj Ruam (nrog Duab)

Video: Google Trends Powered Christmas Tree: 6 Kauj Ruam (nrog Duab)
Video: Лучшие телевизоры 2023 года | Лучшие телевизоры OLED и QLED, которые можно купить прямо сейчас 2024, Kaum ib hlis
Anonim
Google Trends Powered Christmas Tsob Ntoo
Google Trends Powered Christmas Tsob Ntoo

Xav paub tias lub caij Christmas zoo li cas? Tshawb nrhiav nrog Google qhov kev hloov pauv no tau siv tsob ntoo Christmas! Hom kev suav nrog.

Khoom siv

- Raspberry Pi 3b+

- 8x Adafruit NeoPixel

- Khawm

- USB Hais Lus

- Xov tooj

- Cov Khoom Siv Hluav Taws Xob

- Cov Dej Ntxuav

- 3D Tshuab Luam Ntawv

- Kua nplaum

Kauj ruam 1: Project Video

Image
Image

Kauj Ruam 2: Teeb - 3D Luam

Teeb - 3D Luam
Teeb - 3D Luam
Teeb - 3D Luam
Teeb - 3D Luam

Thawj kauj ruam yog tsim lub thawv rau txhua lub teeb.

Peb tau 3D tsim qee lub thawv khoom plig (saib saum toj no) thiab luam tawm lawv nrog cov ntsiab lus pob tshab. Cov kab ntawv no zoo meej vim tias nws nthuav tawm lub teeb zoo kawg nkaus thiab muab tawm lub caij so zoo meej.

Peb tau luam tawm yim ntawm lawv, tab sis koj tuaj yeem tsim ntau npaum li koj xav tau.

Cov ntaub ntawv STL tau txuas nrog rau theem no.

Kauj Ruam 3: Teeb - Kho vajtse

Teeb - Kho vajtse
Teeb - Kho vajtse
Teeb - Kho vajtse
Teeb - Kho vajtse

Nrog cov ntim ntim tau luam tawm, peb tuaj yeem txav mus rau cov khoom siv hluav taws xob.

Peb siv Adafruit Neopixels ua lub teeb. Cov no yog qhov ci heev, txhawb ntau xim thiab muaj cov ntaub ntawv zoo.

Lawv tsis tau npaj txhij siv tawm ntawm lub npov, peb tseem yuav tsum tau muab cov xov hlau uas tsim nyog txuas rau. Nyob ntawm tus nqi ntawm lub teeb qhov no tuaj yeem siv qee lub sijhawm, lub sijhawm zoo tshaj plaws rau qee kas fes.

Nws yog ib qho tseem ceeb kom tsis txhob txuas lawv rau ib leeg tam sim no, peb yuav tsum muab lawv tso rau hauv lawv lub thawv khoom plig.

Kauj Ruam 4: Kho vajtse - Sib dhos

Kho vajtse - Sib dhos
Kho vajtse - Sib dhos
Kho vajtse - Sib dhos
Kho vajtse - Sib dhos
Kho vajtse - Sib dhos
Kho vajtse - Sib dhos

Tam sim no ob peb lub ntim thiab teeb tau npaj rau kev sib dhos.

Peb tau tso qee qhov nyob hauv lub hau ntawm txhua lub npov, cov no peb tuaj yeem siv lub voj los ntawm ib tus coj (saib saum toj no). Thaum tag nrho cov thawv thiab lub teeb tiav peb tuaj yeem muab sib dhos ua ke los tsim txoj hlua teeb.

Txuas koj txoj hlua teeb rau Raspberry Pi thiab koj tuaj yeem sim tawm lub teeb.

Thaum peb txheeb xyuas tias txhua yam ua haujlwm, peb tuaj yeem lo lub thawv thiab lub hau ua ke.

Muab qhwv qee cov yeeb nkab ntxhua khaub ncaws nyob ib ncig ntawm cov xaim ntawm txhua lub thawv khoom plig ntxiv qee qhov kev lom zem ntxiv.

Kauj ruam 5: Google Kev Sib Txuas

Google Kev Sib Txuas
Google Kev Sib Txuas

Txhawm rau muab tsob ntoo no qee qhov ua haujlwm ntxiv, peb yuav txuas nws mus rau Google Cov Qauv.

Cov lej tag nrho suav nrog hauv cov kauj ruam kawg "Tshooj Hom", tab sis kom muab cov ntsiab lus rau koj, peb tau siv Python nrog qee pob ntxiv:

  • PyTrends mus nqa cov ntaub ntawv los ntawm Google Cov Qauv
  • Neopixel los tswj NeoPixels

Thiab cov laj thawj yog raws li hauv qab no:

  • Txhua teev, khaws cov neeg nyiam ntawm lo lus tshawb nrhiav 'Christmas'
  • Peb tau rov qab tus lej ntawm 0 (tsis nrov) thiab 100 (nrov)
  • Qhov ceev ntawm lub teeb yog xam raws tus lej no

Qhov no ua rau peb tsob ntoo hloov xim sai yog tias lub sijhawm tshawb nrhiav tau nrov, thiab maj mam thaum nws tsis nrov.

Ib tsab ntawv me me, peb siv cov xov sib txawv (coj los TswjThread thiab trendDataThread) kom paub tseeb tias txhua qhov kev nqis tes ua tsis cuam tshuam rau lwm tus.

Piv txwv li, lub teeb txuas mus ntxiv thaum peb mus rau Google Cov Ntaub Ntawv Cov Ntaub Ntawv, tsis muaj xov nws yuav tos rau API hu kom tiav thiab tsuas yog tom qab ntawd txuas ntxiv.

Kauj Ruam 6: Hom Tog

Tog tog!
Tog tog!
Tog tog!
Tog tog!
Tog tog!
Tog tog!

Vim tias tsob ntoo Christmas yog qhov me me ntawm ib xyoos, kev ua ib tog neeg yog qhov xav tau.

Qhov tshwj xeeb no yuav xav tau qee yam khoom siv ntxiv, kom raug, khawm thiab hais lus USB.

Thaum txuas nrog Pi koj tuaj yeem pib nrhiav cov nkauj uas haum, peb tau xaiv rau "Nyuaj rau koj" los ntawm Otis McDonald. Peb kuj yuav tsum ntxiv qee qhov kev xav rau peb cov ntawv uas twb muaj lawm:

  • Kos yog tias khawm raug thawb
  • Yog tias ua tau, ua lub suab uas tau teev tseg thiab ua kom lub teeb hloov xim sai heev.
  • Thaum lub suab ua tiav, rov zoo li qub

Cov laj thawj no muaj nws tus kheej xov, ib yam li lwm tus thiab cov ntawv sau tseem tau txuas nrog rau theem no.

Txhua yam uas tseem tshuav los ua yog dai txhua yam hauv tsob ntoo, thiab txaus siab rau qhov pom cov ntaub ntawv jolly, thiab qhov tseem ceeb tshaj plaws yog hom tog!

Pom zoo: