Cov txheej txheem:

Pib Koj Lub Teeb Christmas Qhia Nrog Khawm: 5 Kauj Ruam
Pib Koj Lub Teeb Christmas Qhia Nrog Khawm: 5 Kauj Ruam

Video: Pib Koj Lub Teeb Christmas Qhia Nrog Khawm: 5 Kauj Ruam

Video: Pib Koj Lub Teeb Christmas Qhia Nrog Khawm: 5 Kauj Ruam
Video: tuav wb lub neej kom ruaj khov - Mang Vang ft. Christina Xyooj [Official Audio] 2021-22 2024, Kaum ib hlis
Anonim
Pib Koj Lub Teeb Christmas Qhia Nrog Khawm
Pib Koj Lub Teeb Christmas Qhia Nrog Khawm

Thaum khiav Christmas teeb pom kev zoo ua suab paj nruag koj yuav xav pib ua yeeb yam los ntawm nias lub pob. Qhov kev qhia no tsuas yog siv rau kev ua yeeb yam uas tau tswj hwm los ntawm Falcon Pi Player (FPP) khiav ntawm Raspberry Pi. Yog tias koj tab tom khiav FPP ces koj yuav zaum siv Falcon cov tswj hwm thiab siv xLights lossis LightORama los ua ntu zus koj cov yeeb yam. Yog tias tsis muaj cov lus no txhais tau ib yam dab tsi rau koj, qhov kev qhia no yog zaum me ntsis dhau koj lub taub hau tam sim no thiab koj yuav tsum pib los ntawm kev nyeem qhov wiki no https://auschristmaslighting.com/wiki/ thiab koom nrog pab pawg Facebook zoo li hauv qab no

  • xLights:
  • Kev teeb tsa Christmas zoo tshaj plaws:
  • Falcon Pi Player:
  • Cov ntsiab lus/nthuav tswv yim sib qhia:
  • "Tsis tshwj xeeb xLights lossis LOR cuam tshuam":
  • xLights Nyiaj so koobtsheej Lub Teeb Muag:
  • Ua Koj Tus Kheej Christmas:

Kauj Ruam 1: Daim Ntawv Teev Npe

Koj yuav xav tau cov khoom hauv qab no:

  • Ib lub pob. Kuv siv qhov no nrog lub teeb ci LED nyob ib puag ncig nws: [Amazon]
  • Ib tug resistor. Zoo dua 200Ω lossis siab dua (2 ntawm no yog tias koj siv lub khawm LED) Txuj 1/4W lossis 1/8W yog qhov zoo
  • Cov xov hlau txuas. Qhov ntsuas koj yuav tsum siv nyob ntawm seb lub pob yuav nyob deb npaum li cas los ntawm koj tus Pi. Kuv siv 18awg xaim txog 10 feet ntawm kuv tus Pi thiab nws ua haujlwm tau zoo
  • Ib txoj hauv kev txuas xov tooj mus rau Pi's GPIO pins. Koj tuaj yeem siv cov hlua txuas nrog lub khob cij tawg, lossis koj tuaj yeem siv qee tus poj niam txuas zoo li kuv tau ua. Peb tsuas xav tau 3 xov hlau - Hauv av, 5V, thiab cov ntaub ntawv rau khawm. [Amazon]
  • (Tsis teb los tau) Lub qhov txuas tsis sib txuas ntawm txhua qhov kawg rau kev saib xyuas yooj yim. Kuv siv 3-tus pin marine qib txuas: [Amazon]
  • (Tsis teb los tau) Thaum tshav kub kub ntsws ntswj txuas [Amazon]

Kauj Ruam 2: Daim Kab Xev

Daim duab thaiv
Daim duab thaiv
Daim duab thaiv
Daim duab thaiv
Daim duab thaiv
Daim duab thaiv
Daim duab thaiv
Daim duab thaiv

Cov duab qhia pom daim duab thaiv kab rau lub pob uas tsis suav nrog LED, thiab khawm nrog LED. Txoj kev kuv teeb tsa daim kab xev tso cai rau koj ua haujlwm lub pob thiab lub teeb (txuas mus ntxiv) nrog tsuas yog 3 xaim.

Rau GPIO tus pin, xaiv ib qho ntawm GPIO tus pin ntawm tus pi. Siv +5V thiab Gnd pins ib yam. Tej zaum koj yuav tau txais tam sim nrog siv tus lej 3.3V, tab sis qhov hluav taws xob poob hla ob peb txhais taw ntawm cov xaim tuaj yeem ua rau lub teeb liab tsis ntseeg lossis tsis txaus los teeb lub LED.

NCO TSEG: Qhov 3-tus pin txuas yuav tsis haum los ntawm lub qhov uas koj xav tau txhawm rau lub pob nrog LED teeb lub teeb. Yog li txuas tus txuas tom qab tso lub pob rau hauv koj lub ntsej muag.

Kauj Ruam 3: Falcon Pi Player Basic Setup

NCO TSEG - FPP tau hloov kho tas li, thiab nws muaj peev xwm ua tiav uas lawv yuav txhim kho lawv cov ntawv txhawb nqa lossis tias lawv yuav suav nrog "thawb khawm kom pib" raws li qhov ua tsis tau zoo uas yuav tsum tau ua haujlwm tsawg dua.

Kuv ua raws cov vis dis aus saum toj no rau thaum pib tau txais txhua yam teeb tsa.

Kuv pom cov vis dis aus tsis txaus ntseeg thiab qeeb, yog li ntawm no yog cov ntsiab lus ntawm nws:

  • Ntshuam koj cov ntu rau fpp siv tus tswj xyuas cov ntaub ntawv
  • Tsim cov playlist nrog ntu hauv nws. Rau cov kauj ruam tom ntej cov npe yuav raug hu ua "playme"
  • Qhib cov ntaub ntawv tsis muaj dab tsi thiab ntaus cov hauv qab no:

    • #!/bin/sh
    • fpp -P playme
  • Txuag nws ua cov ntaub ntawv.sh ntawm koj lub computer
  • Mus rau tus thawj tswj ntaub ntawv hauv FPP thiab xa koj cov ntawv sau. Mus rau "Scripts" tab thiab xyuas kom tseeb tias nws nyob ntawd
  • Hauv qab xwm txheej/Tswj mus rau Cov Txheej Txheem
  • Tsim ib qho kev tshwm sim tshiab. Cov xwm txheej ID 1/1, Lub npe txheej xwm dab tsi, Cov nyhuv Ib Leeg Tsis Muaj, Cov Ntawv Txheej Txheem
  • Mus rau hauv Kev Tawm Tswv Yim/Tawm Tawm Teeb thiab nyem GPIO ua rau
  • Toggle tus pin koj khawm tau txuas rau. Yog tias nws yuav qis qis thaum koj nias lub pob ces tso qhov kev tshwm sim ntawm Qhov Kev Xaiv Poob, yog tias nws ua haujlwm siab ces tso qhov xwm txheej ntawm Rising.
  • Nyem rau Reboot khawm los ntawm kev ceeb toom nws tshwm tom qab koj ua txhua qhov kev hloov pauv

Tom qab ua tag nrho cov no, koj yuav tsum tuaj yeem nias lub pob kom tau txais koj cov yeeb yam pib. Woohoo!

Txawm li cas los xij, txoj kev no muaj qee qhov txwv. Yog tias koj nias lub pob dua thaum cov npe nkag mus, nws yog 1) yuav tsis ua dab tsi lossis 2) yuav tsoo FPP thiab tsis kam ua dab tsi nrog koj lub pob kom txog thaum koj rov pib dua. Yog li yog tias koj tsuas yog siv lub pob ua txoj hauv kev ua rau koj ua yeeb yam ntawm kev hais kom ua, cov txheej txheem saum toj no yuav yog txhua yam koj xav tau.

Yog tias koj xav tau qee yam ntxiv, txuas ntxiv mus rau kauj ruam tom ntej

Kauj Ruam 4: Tsab Ntawv Zoo Tshaj Plaws

Hauv qab no yog tsab ntawv uas kuv kawg tuaj txog ntawm. Koj tuaj yeem saib cov ntawv ntawm Github ntawm no: [Gist. Github]

  • Yog tias ib tus neeg nias lub pob thaum lub sijhawm "hmo ntuj" nws yuav ua si Tiger Rag (kuv Zaj Nkauj 1) thiab tom qab ntawd mus rau qhov ua ntu zus tos uas loops tsis kawg.
  • Yog tias lub pob raug nias thaum Tiger Rag tab tom ua si nws pib kuv zaj nkauj thib ob, Hallelujah, thiab tom qab ntawd yuav mus rau qhov tos ib txwm tsis muaj hnub kawg.
  • Tab sis yog tias ib tus neeg nias lub khawm thaum nruab hnub lossis yav tsaus ntuj heev nws yuav ua si Tiger Rag ib zaug thiab tom qab ntawd kaw txhua lub teeb.

Qhov no tso cai rau khawm ua haujlwm txhua lub sijhawm ntawm hnub tab sis lub teeb tsis tas yuav tsum nyob txhua lub sijhawm. Nws tseem tso cai rau ua ntau zaj nkauj los ntawm 1 khawm los ntawm kev txheeb xyuas cov nkauj twg uas tam sim no tab tom ua, xaus zaj nkauj ntawd, thiab ua nkauj "tom ntej" nkauj.

Koj tuaj yeem nrhiav cov peev txheej ntxiv rau kev sau ntawv hauv FPP ntawm no: https://github.com/FalconChristmas/fpp-scriptsFor qhov nyuaj dua qhov kev xav tsuas yog google "bash script _" qhov chaw qis dua yog qhov koj tab tom sim ua. Koj tuaj yeem sim koj cov ntawv sau siv FPP Plhaub (username fpp password falcon) Cov lus txib yooj yim yog raws li hauv qab no.

Them sai sai rau cov peev txheej !!

  • Peev -P yuav ua cov npe nkauj ib zaug, cov ntawv me -p yuav rov ua dua.
  • fpp -v 66 Teem ntim rau 66%
  • fpp -c nres Nres qhov yeeb yam tam sim ntawd
  • fpp -C nres Qhov no yuav tsum nres ua kom zoo nkauj
  • fpp -p thisPlaylistName Plays thisPlaylistName rov ua dua (yog li zaj nkauj intro ua si ib zaug, tom qab ntawd Cov khoom tseem ceeb yuav rov ua dua tas li.
  • fpp -P thisPlaylistName Plays thisPlaylistName ib zaug
  • eventScript "$ {MEDIADIR}/scripts/$ {thisScriptVariable}" Khiav ib tsab ntawv. Hauv rooj plaub ntawm sab laug nws ua haujlwm rau yog tias koj muaj koj lub npe sau ntawv khaws cia rau hauv qhov sib txawv qhov chaw saum toj no, zoo li qhov no ScriptVariable = "PlayTheSong.sh"

ButtonSuperScript.sh

#!/bin/sh
###########################################################
#Yuav tsum khiav yog tias lub pob nyem.
#Koj yuav tsum muaj ob qhov playlists rau txhua zaj nkauj - ib qho nrog
# tsuas yog nkauj raws li "Thawj zaug ua si" thiab tsis muaj ib yam tseem ceeb,
# thiab lwm qhov nrog zaj nkauj ua ntej ua si thiab koj tos
# ntu raws li "Qhov tseem ceeb" ntu. (Yam tsawg kawg yog koj xav tau
# ua qhov tseeb uas kuv ua)
#
#Piv txwv, yog tias koj zaj nkauj yog Tiger Rag, koj yuav tsum muaj
# playlists "TigerRag", "TigerRagStandby", thiab "Standby"
#
###########################################################
# Playlists kom khiav yog nws nyob nruab nrab ntawm 6 thiab 11
NightSong1 = "TigerRagStandby"
NightSong2 = "HallelujahStandby"
NightStandby = "Standby"
# Cov playlists kom khiav thaum nruab hnub lossis tom qab 11
DaySong1 = "TigerRag"
DaySong2 = "Hallelujah"
DayStandby = "Standby"
#Nyob thiab tawm sijhawm hauv 24 teev. Yog tias koj xav tau feeb, hmoov zoo
Nyob rau hauv = 17
Sijhawm = 23
###########################################################
# Kev txiav txim siab ntawm tsab ntawv. #
###########################################################
# Tau txais peb cov xwm txheej tam sim no (IDLE = 0, PLAYING = 1, Nres Tsis Txaus Siab = 2)
STATUS = $ (fpp -s | txiav -d ',' -f2)
#Tau txais cov npe ua si thiab txiav rau 7 tsab ntawv
PLAYLIST = $ (fpp -s | txiav -d ',' -f4 | txiav -c1-7)
#Qhov no yuav yog "ob qho tib si" yog tias nws tab tom ua nkauj, thiab "ua ntu zus" yog tias nws nyob tos
#siv los txiav txim siab yog tias Standby ib txwm ua haujlwm
STANDBYSTRING = $ (fpp -s | txiav -d ',' -f5)
#Thawj 7 tsab ntawv ntawm cov npe ntawm cov playlists rau kev sib piv
#Tsuas yog 7 tus ntawv thiaj li "Song1Standby" thiab "Song1" zoo ib yam
#Ok yog li nws yuav tsum yog thawj x ntawv thiab x yuav tsum yog lub npe nkauj luv tshaj uas koj muaj
StandbyPlaylist = $ (ncha $ NightStandby | txiav -c1-7)
Nkauj 1Playlist = $ (ncho $ NightSong1 | txiav -c1-7)
Song2Playlist = $ (ncha $ NightSong2 | txiav -c1-7)
Pib = ""
#Tau txais cov sijhawm tam sim no hauv sijhawm ua tub rog
CurrentHour = $ (hnub tim +"%H")
#Luam tawm cov xwm txheej ntawm qee yam - "ncha" zoo li "luam tawm" hauv ntau hom lus
#Pab tau rau kev ntsuas yog tias ntau yam txiav los yog suav kom raug
ncha CurrentHour yog $ CurrentHour
echo Running playlist yog: $ PLAYLIST
ncha Song2Playlist yog: $ Song2Playlist
Echo Status yog: $ STATUS
#Teeb tsa lub ntim rau 80% thaum hmo ntuj, 100% lwm yam
#Yog li yog tias kuv tsaug zog nws tsis nrov li
#if [$ CurrentHour -lt $ OffHour -a $ CurrentHour -ge 11]; ces
# fpp -v 100
#lwm
# fpp -v 80
#fi ib
# Txheeb xyuas tias peb tau txais qee yam muaj txiaj ntsig
yog [-z "$ {STATUS}"]; ces
ncha "Yuam kev nrog xwm txheej tus nqi"> & 2
tawm 1
fi ua
# Ua raws li qhov xwm txheej tam sim no
rooj plaub $ {STATUS} hauv
# IDLE
0)
#Hmo ntuj - ua si Nkauj 1 nrog tos
yog tias [$ CurrentHour-lt $ OffHour-a $ CurrentHour-ge $ OnHour]; ces
echo Ua Si NightSong1
fpp -c nres
fpp -p "$ {NightSong1}" $ {STARTITEM}
#Day lub sijhawm lossis lig heev - ua nkauj 1 zaug ib zaug ces tua teeb
lwm tus
echo Ua Si DaySong1
fpp -c nres
fpp -P "$ {DaySong1}" $ {STARTITEM}
fi ua
;;
# PLAYING lossis STOPPING GRACEFULLY (zoo nkauj tshwm sim yog tias khawm nias thaum lub sijhawm teev npe ua tiav)
1 | 2)
#Standby tab tom khiav - qhov no ua haujlwm vim kev tos yog kuv ib leeg tsis yog xov xwm sib txuas
yog ["$ STANDBYSTRING" == "ntu"]; ces
#Hmo ntuj - ua si Nkauj 1 nrog tos
yog tias [$ CurrentHour-lt $ OffHour-a $ CurrentHour-ge $ OnHour]; ces
ncha Ua Si NightSong1 rau hmo ntuj
fpp -c nres
fpp -p "$ {NightSong1}"
#Day sijhawm lossis lig tiag tiag - ua si khaub ncaws ib zaug ces tua teeb
lwm tus
echo PlayingDaySong1 los ntawm kev ua si
fpp -c nres
fpp -P "$ {DaySong1}"
fi ua
#Txhawm rau txhawb ntau zaj nkauj, theej ntu no thiab hloov "Song2Playlist" hauv ntu kawg rau Nkauj#Playlist
#Nkauj 1 tab tom khiav
elif ["$ PLAYLIST" == "$ Song1Playlist"]; tom qab ntawd
#Hmo ntuj - ua si Hallelujah nrog tos
yog tias [$ CurrentHour-lt $ OffHour-a $ CurrentHour-ge $ OnHour]; ces
ncha Ua Si HallelujahStandby los ntawm Tiger Rag tab tom ua haujlwm
fpp -c nres
fpp -p "$ {NightSong2}"
#Day lub sijhawm lossis lig heev - ua si Nkauj2 ib zaug ces tua teeb
lwm tus
ncha Ua Si Hallelujah ib zaug los ntawm Tiger Rag tab tom khiav
fpp -c nres
fpp -P "$ {DaySong2}"
fi ua
#LAST SONG YOG RUNNING - PLAY STANDBY
elif ["$ PLAYLIST" == "$ Song2Playlist"]; tom qab ntawd
#Lub sijhawm tsaus ntuj - ua si tos ntawm lub voj
yog tias [$ CurrentHour-lt $ OffHour-a $ CurrentHour-ge $ OnHour]; ces
ncha Ua si standby ntawm rov ua dua
fpp -c nres
fpp -p "$ {NightStandby}"
#Day sijhawm lossis lig heev - ua si tos ib zaug
lwm tus
echo Ua Si Standby Ib zaug
fpp -c nres
fpp -P "$ {DayStandby}"
fi ua
lwm tus
ncha Vim qee qhov laj thawj kawg qhov ua tiav.
fpp -c nres
fpp -P "$ {DaySong1}"
fi ua
;;
esac ua

saib rawButtonSuperScript.sh tuav nrog ❤ los ntawm GitHub

Kauj Ruam 5: (Tsis teb los tau) Lub ntsej muag rau lub khawm

Kuv tau nkag mus rau lub tshuab txiav laser ntawm Clemson los ntawm Makerspace, yog li kuv tau kos sai sai tsim tus qauv los txiav+etch. Muaj qhov nyob hauv nruab nrab rau kuv lub pob, cov lus hais tias "Push Me" hauv Christmas font, thiab daus daus ib puag ncig lub pob. Kuv tau pleev xim rau qee cov ntoo dawb thiab tom qab ntawd npog nws hauv daim kab xev (kom lub tshuab txiav laser tsis hlawv qhov chaw kuv tsis xav tau etched). Cov ntaub ntawv kuv siv tau txuas nrog.

Pom zoo: