Cov txheej txheem:

Frosty SPyman: 8 Kauj Ruam (nrog Duab)
Frosty SPyman: 8 Kauj Ruam (nrog Duab)

Video: Frosty SPyman: 8 Kauj Ruam (nrog Duab)

Video: Frosty SPyman: 8 Kauj Ruam (nrog Duab)
Video: tos koj hauv nruab dab - nuj xeem - nkauj tawm tshiab fullMV 2021 2024, Kaum ib hlis
Anonim
Frosty tus SPyman
Frosty tus SPyman

Frosty SPyman yog snowman ntawm lub txee uas muaj cov vis dis aus nyob thiab txav ntawm nws tus kheej! Tam sim no Santa tuaj yeem 100% paub tseeb tias tib neeg tau zoo.

Kauj ruam 1: Video thiab Paj huam

Image
Image

Twas hmo ua ntej Christmas, thiab tag nrho hauv tsev

Tsis muaj tsiaj txhu tau nplawm, tsis yog nas.

Cov khoom plig tau teeb tsa ntawm lawv qhov chaw ze ntawm tsob ntoo, Thiab lub teeb tau siv los ntawm Teensy.

Sab saum toj ntawm lub tsho tiv no tau teeb tsa zoo li, Muaj taws tswm ciab hlawv, tso ib lub ci ci.

Nyob rau sab saum toj ntawm qhov chaw ntawd snowman tau zaum, Saib xyuas qhov khoom plig zoo li tus tsev nyob.

Tom qab ntawd los ntawm qhov tsis muaj tus tub sab tau tshwm sim, Nws nqa thiab tsis ntim khoom plig, Thiab tom qab ntawd nws tau pom meej, Tus snowman tau saib, Yog li ntawd nws pib hloov siab lees txim.

Frosty SPyman tau sawv tiv thaiv zoo heev, Kev ntshai ntawm tsev neeg thaum kawg raug tshem tawm."

Kauj Ruam 2: Sib sau Cov Khoom thiab Tsim Lub Nkoj

Sib sau ua ntu thiab tsim lub kaw lus
Sib sau ua ntu thiab tsim lub kaw lus
Sib sau ua ntu thiab tsim lub kaw lus
Sib sau ua ntu thiab tsim lub kaw lus
Sib sau ua ntu thiab tsim lub kaw lus
Sib sau ua ntu thiab tsim lub kaw lus

Kuv tau mus rau Hobby Lobby thiab tau txais ntau yam khoom. Ib tus yog snowman uas yog los ntawm Elf ntawm Txee, nrog cov ceg dai thiab lub taub hau. Qhov thib ob, Kuv tau txais "daus" thiab sau cov snowman nrog nws. Thaum kawg, Kuv khaws cov ncuav qab zib puag ncig uas tsuas yog loj txaus rau Raspberry Pi kom haum rau sab hauv. Kuv xuas 2 lub qhov rau hauv tin, ib qho rau Raspberry Pi Lub Koob Yees Duab Module thiab ib qho rau lub hwj huam qaum kom haum los ntawm. Kuv kuj muab lub qhov tso rau hauv lub hau kom cov servo tuaj yeem tig lub snowman.

Txuas mus rau DFRobot cov khoom lag luam:

  • Raspberry Pi 3
  • Raspberry Pi Lub Koob Yees Duab Module

Kauj ruam 3: Teeb tsa Pi

Teeb tsa Pi
Teeb tsa Pi

DFRobot ncav tes rau kuv thiab xa lawv Raspberry Pi 3 thiab Raspberry Pi Lub Koob Yees Duab Module. Yog li tom qab kuv qhib lub thawv kuv tau txais txoj haujlwm los teeb tsa daim npav SD. Ua ntej kuv tau mus rau Raspberry Pi Downloads nplooj ntawv thiab rub tawm qhov tshiab tshaj plaws ntawm Raspbian. Tom qab ntawd kuv rho tawm cov ntawv thiab muab tso rau hauv cov npe yooj yim. Koj tsis tuaj yeem tsuas yog luam/muab cov ntawv.img tso rau hauv SD daim npav, koj yuav tsum "hlawv nws" mus rau daim npav. Koj tuaj yeem rub tawm cov khoom siv hluav taws xob zoo li Etcher.io kom yooj yim hloov OS cov duab. Tom qab cov ntaub ntawv.img nyob ntawm kuv daim npav SD kuv tso nws rau hauv Raspberry Pi thiab muab lub zog rau nws. Tom qab kwv yees li 50 vib nas this kuv tshem lub qaum thiab tshem daim npav SD. Tom ntej no kuv muab daim npav SD rov qab rau hauv kuv lub PC thiab mus rau phau ntawv "khau raj". Kuv tau qhib phau ntawv sau tseg thiab khaws nws ua cov ntaub ntawv tsis muaj npe hu ua "ssh" nrog TSIS txuas ntxiv. Kuj tseem muaj cov ntawv kuv ntxiv hu ua "wpa_supplicant.conf" thiab muab cov ntawv no tso rau hauv:

network = {

sib =

psk = np

}

Tom qab ntawd kuv tau khaws thiab tshem daim npav thiab muab rov qab rau hauv Raspberry Pi 3. Qhov no yuav tsum tam sim no tso cai rau siv SSH thiab txuas rau WiFi.

Kauj Ruam 4: Npaj Lub Koob Yees Duab Npaj

Npaj Lub Koob Yees Duab Npaj
Npaj Lub Koob Yees Duab Npaj

Los ntawm lub neej ntawd, lub koob yees duab tau xiam ntawm Pi, yog li koj yuav tsum qhib lub davhlau ya nyob twg hom sudo raspi-teeb tsa los coj cov ntawv qhia zaub mov. Mus rau "kev xaiv cuam tshuam" thiab tom qab ntawd qhib lub koob yees duab. Tam sim no tsuas yog xaiv "Ua tiav" thiab ntxig cov hlua kab ntawm lub koob yees duab hloov mus rau thaj tsam raug ntawm Pi.

Kauj ruam 5: Txhim Kho Software

Muaj ntau qhov software sib txawv uas tuaj yeem rub tawm cov vis dis aus, xws li vlc thiab tsab ntawv tsa suab, tab sis kuv txiav txim siab siv mjpeg-streamer vim nws qis qis thiab txhim kho yooj yim. Raws li cov lus qhia ntawm lub xaib, ua git clone https://github.com/jacksonliam/mjpg-streamer.git rau hauv daim nplaub tshev, tom qab ntawv ntaus sudo apt-tau nruab cmake libjpeg8-dev txhawm rau teeb tsa cov tsev qiv ntawv xav tau. Hloov koj phau ntawv teev npe rau hauv daim nplaub tshev uas koj rub tawm thiab tom qab ntawd ntaus ua raws los ntawm sudo ua nruab los ua ke software. Thaum kawg nkag mus rau export LD_LIBRARY_PATH =. thiab kom khiav nws hom./mjpg_streamer -o "output_http.so -w./www" -i "input_raspicam.so" Koj tuaj yeem nkag mus rau kwj los ntawm kev mus rau https://: 8080/stream.html txhawm rau saib cov kwj deg.

Kauj Ruam 6: Cov Khoom Siv Hluav Taws Xob

Cov Electronics
Cov Electronics
Cov Electronics
Cov Electronics
Cov Electronics
Cov Electronics

Siv PWM chav kawm los ntawm GPIO lub tsev qiv ntawv tuaj yeem muaj txiaj ntsig, tab sis nws tuaj yeem ua rau muaj teeb meem ntau thaum siv nrog servos. Servo motors xav tau lub sijhawm tseeb, uas SoC tsis tuaj yeem muab. Yog li kuv txiav txim siab siv Adafruit PCA9685, I2C tswj, 16 channel PWM module. Lub tsev qiv ntawv tuaj yeem pom ntawm no.

Kauj Ruam 7: Txoj Cai

Cov cai yog yooj yim zoo nkauj. Txhua yam nws ua yog siv subprocess. Popen lub tsev qiv ntawv los khiav-j.webp

Kauj Ruam 8: Siv Frosty SPyman

Kuv teeb kuv tus snowman hauv chav nyob ntawm kuv lub tsev kom tiv thaiv tsob ntoo thiab lwm yam kev dai kom zoo nkauj. Txhawm rau saib cov kwj tawm yooj yim mus rau https://: 8080 thiab tom qab ntawd nyem khawm kwj.

Pom zoo: