Cov txheej txheem:

Minecraft Creeper Ntes: 6 Kauj Ruam (nrog Duab)
Minecraft Creeper Ntes: 6 Kauj Ruam (nrog Duab)

Video: Minecraft Creeper Ntes: 6 Kauj Ruam (nrog Duab)

Video: Minecraft Creeper Ntes: 6 Kauj Ruam (nrog Duab)
Video: Lumexx hat recht #lumexx 2024, Hlis ntuj nqeg
Anonim
Image
Image
Minecraft Creeper Ntes
Minecraft Creeper Ntes
Minecraft Creeper Ntes
Minecraft Creeper Ntes

Los ntawm allwinedesignsAllwine DesignsFollow Ntxiv los ntawm tus sau:

Customizable Dowel Jig
Customizable Dowel Jig
Customizable Dowel Jig
Customizable Dowel Jig
Vajvoog ntawm Fifths MIDI Device
Vajvoog ntawm Fifths MIDI Device
Vajvoog ntawm Fifths MIDI Device
Vajvoog ntawm Fifths MIDI Device
Kev Cai Mouse Log Raws li PocketNC Jog Log (lossis tswj lub suab hu)
Kev Cai Mouse Log Raws li PocketNC Jog Log (lossis tswj lub suab hu)
Kev Cai Mouse Log Raws li PocketNC Jog Log (lossis tswj lub suab hu)
Kev Cai Mouse Log Raws li PocketNC Jog Log (lossis tswj lub suab hu)

Txog: Kuv tau ua tus tsim software kuv lub neej tag nrho, kawm computer science nrog tsom mus rau 3D duab hauv tsev kawm qib siab, yog tus kws tshaj lij rau Dreamworks Animation thiab tau qhia thev naus laus zis rau menyuam yaus thiab cov laus nyob ntawm no … Ntau Ntxiv txog allwinedesigns »

Ob peb xyoos, Kuv tau pab Cov Menyuam Lub Tsev khaws puav pheej ntawm Bozeman txhim kho cov ntaub ntawv kawm rau lawv STEAMlab. Kuv ib txwm tab tom nrhiav txoj hauv kev lom zem los koom nrog cov menyuam nrog cov khoom siv hluav taws xob thiab cov lej. Minecraft yog txoj hauv kev yooj yim kom tau txais menyuam hauv lub qhov rooj thiab muaj ntau qhov peev txheej los siv nws hauv kev lom zem thiab kev kawm. Ua ke Minecraft thiab cov khoom siv hluav taws xob yog qhov nyuaj, tab sis. Txhawm rau pab ua ke Arduino cov phiaj xwm nrog Minecraft, Kuv tau xaus tsim kuv tus kheej Minecraft mod npe SerialCraft. Lub tswv yim yog koj tuaj yeem txuas ib qho khoom siv uas siv kev sib txuas lus txuas thiab xa xov mus thiab tau txais cov lus los ntawm Minecraft siv kuv tus qauv. Feem ntau Arduinos muaj peev xwm sib txuas lus txuas ntawm USB, yog li nws yooj yim rau xaim hluav taws xob hauv Circuit Court thiab xa qee cov ntaub ntawv hla cov ntawv txuas. Kuv tsim cov khoom siv tswj hwm uas cov menyuam tuaj yeem sib sau ua ke thiab ua haujlwm los tswj lawv tus yam ntxwv, ua rau thiab teb rau Redstone cov cim, thiab ntsais LEDs kom ceeb toom lawv txog qee yam xwm txheej xws li lub neej qis lossis thaum ib tus neeg nkag nkag ze. Cov lus qhia no tsom mus rau kev ua haujlwm ntawm tus neeg nkag mus thiab siv nws ib kauj ruam ntxiv siv Adafruit Neopixels thiab laser txiav acrylic thiab plywood enclosure. Creeper Detector siv 8 LED NeoPixel stick los muab cov ntaub ntawv muaj txiaj ntsig rau koj txog cov neeg nyob ze. Thaum tag nrho cov LEDs tawm, nws txhais tau tias tsis muaj neeg nkag hauv 32 qhov thaiv. Thaum tag nrho cov LEDs nyob (lawv yuav flashing ib yam nkaus), koj nyob hauv 3 qhov thaiv qhov tawg ntawm lub creeper (lub vojvoog uas tus neeg nkag nkag yuav tsum nres, teeb nws lub fuse thiab tawg). Txhua yam nyob nruab nrab tuaj yeem muab kwv yees kwv yees deb npaum li cas tus neeg nkag los ntawm koj. Thaum 4 ntawm 8 LEDs tau teeb, koj nyob txog 16 qhov thaiv los ntawm cov neeg nkag, uas yog thaj tsam uas yog tus neeg nkag los pom koj, nws yuav tawm tsam. Cov LEDs yuav pib nyem thaum koj nyob hauv qhov tawg tawg ntawm cov neeg nkag (7 ntu). Nws tseem yog lub vojvoog uas yog tias koj tawm mus, tus neeg nkag yuav nres nws lub fuse thiab txuas ntxiv tuaj tom qab koj. Nrog rau qhov kev paub no, koj yuav tsum muaj peev xwm zam tau ib qho kev tawm tsam tsis tau xav txog lossis mus yos hav zoov nyob ze!

Hauv Cov Lus Qhia no, peb yuav hla txhua yam koj xav tau los tsim koj tus kheej Creeper Detector thiab yuav teeb tsa thiab siv SerialCraft mod uas tso cai rau koj cuam tshuam Minecraft nrog koj li Arduino cov haujlwm. Yog tias koj nyiam nws, thov txiav txim siab pov npav rau nws hauv Minecraft Contest thiab Epilog Challenge. Cia peb pib!

Kauj ruam 1: Yam Koj Yuav Tsum Tau

Yam Koj Yuav Tsum Tau
Yam Koj Yuav Tsum Tau
Yam Koj Yuav Tsum Tau
Yam Koj Yuav Tsum Tau
Yam Koj Yuav Tsum Tau
Yam Koj Yuav Tsum Tau
Yam Koj Yuav Tsum Tau
Yam Koj Yuav Tsum Tau

Kuv tau ua kuv qhov zoo tshaj plaws los txuas rau cov khoom lag luam uas kuv tau siv, tab sis qee zaum kuv pom qhov ze tshaj plaws uas kuv tuaj yeem ua tau ntawm Amazon. Qee lub sij hawm nws yog qhov zoo tshaj los khaws qee yam ntawm koj lub khw hluav taws xob hauv cheeb tsam lossis khw muag khoom kho vajtse kom tsis txhob yuav ntau dua hauv online.

- Kuv tau siv 8 LED RGBW NeoPixel lo, tab sis kuv tsis siv cov dawb (W) LED txhua li yog 8 LED RGB NeoPixel lo yuav ua. Koj tuaj yeem hloov qhov no rau ib qho RGB lossis RGBW NeoPixel cov khoom, tab sis muaj lub zog txiav txim siab uas peb yuav tham hauv kauj ruam tom ntej thiab hloov pauv tus lej uas kuv yuav taw qhia thaum peb mus txog ntawm no. Koj tuaj yeem xav xaiv ib qho uas tsis xav tau kev siv tshuaj yaj yeeb, tab sis kuv yuav qhia koj li cas kuv tau siv cov xov hlau txuas mus rau tus pas.

- Lub microcontroller thiab nws txuas USB cable. Kuv siv SparkFun's RedBoard uas yog Arduino Uno clone. Nws siv Mini B USB txuas (Kuv tsis paub yog vim li cas nws thiaj li kim ntawm Amazon, koj tuaj yeem tau txais nws ncaj qha los ntawm SparkFun ntawm no, lossis mus rau lwm txoj hauv kev ntawm Amazon, zoo li qhov no). Peb yuav siv lub tsev qiv ntawv Arduino los ua kom yooj yim rau kev sau npe, tab sis nws tsuas yog siv kev sib txuas lus yooj yim li ntawd lub tsev qiv ntawv tuaj yeem tuaj yeem xa mus ua haujlwm ntawm ib lub microcontroller uas tuaj yeem ua USB Serial. Yuav luag txhua Arduino yuav ua. Nco ntsoov tias nws muaj USB Serial (feem ntau ua, tab sis qee qhov tsis xws li thawj Trinket).

- Cov xov hlau, cov hlau txuas thiab cov laug (cov hlua hlau thiab tus thib peb txhais tes tuaj yeem pab tau, ib yam nkaus). Peb yuav muab cov xov hlau txuas rau NeoPixel lo yog li nws tuaj yeem txuas rau hauv Arduino. Cov no yuav yog qhov tsis tseem ceeb yog tias koj xaiv NeoPixel cov khoom uas twb muaj cov xov txuas lossis lub microcontroller uas los nrog NeoPixels ntawm lub nkoj (xws li Circuit Playground Express, uas kuv tau suav nrog cov cai rau yav tom ntej). Daim ntawv foos ntawm 8 LED lo yog qhov kuv tsim kuv li Creeper Detector lub thawv rau, yog li koj yuav tsum hloov kho lossis mus yam tsis muaj qhov thaiv yog tias koj mus rau lwm daim ntawv foos.

- Cov ntaub ntawv kaw. Kuv siv 1/8 "frosted acrylic, 1/8" clear acrylic thiab 1/8 "plywood uas kuv laser txiav thiab M3 tshuab ntsia hlau thiab txiv ntseej los tuav nws ua ke. Kuv kuj tau siv qee qhov #2 x 1/4 "ntoo ntsia hlau txhawm rau txhawm rau NeoPixel lo rau hauv lub thawv ntawv. koj xav kom nws ua tus kheej nkaus xwb, koj yuav tsum hloov kho!

- Tus lej Minecraft, Minecraft Forge 1.7.10 thiab SerialCraft (mod thiab Arduino tsev qiv ntawv). Creeper Detector tso siab rau SerialCraft mod, uas tsuas yog ua haujlwm ntawm Minecraft 1.7.10 nrog Minecraft Forge. Peb yuav tham txog yuav ua li cas rub tawm cov no thiab yuav teeb tsa lawv li cas hauv cov theem tom ntej.

- Arduino IDE lossis tus as khauj ntawm Arduino Tsim thiab Arduino Tsim plugin (Kuv pom zoo siv Arduino Tsim raws li koj yuav muaj peev xwm mus ncaj qha rau kuv Arduino Tsim cov duab kos thiab suav sau thiab upload nws los ntawm qhov ntawd).

Kauj ruam 2: Circuit Court

Qhov Circuit
Qhov Circuit
Qhov Circuit
Qhov Circuit
Qhov Circuit
Qhov Circuit
Qhov Circuit
Qhov Circuit

Lub Circuit Court yog qhov yooj yim heev, tsuas yog 3 xaim, NeoPixel stick thiab Arduino. Txhua Adafruit NeoPixels muaj lawv tus kheej tswj hwm uas tso cai rau ib cov ntaub ntawv xov hlau los tswj txhua tus lej ntawm cov hlua LED. Kuv txuas nws txuas tus pin 12 ntawm kuv Arduino.

Lwm ob lub xov hlau yog rau lub zog thiab hauv av. Txhawm rau lub zog NeoPixels, peb yuav xav tau 5V lub zog siv. Peb yuav tsum ua kom ntseeg tau tias peb lub zog siv hluav taws xob muaj peev xwm muab tau tam sim no txaus, txawm li cas los xij. Txhua NeoPixel tuaj yeem kos txog 60mA (80mA nrog RGBW LEDs) ntawm qhov ci ntsa iab. Nrog 8 LEDs, qhov ntawd txhais tau tias peb qhov siab tshaj tam sim no yog 480mA (640mA nrog RGBW LEDs). Arduino siv ~ 40mA tsuas yog qhib. Thaum xub thawj siab ib muag, qhov no zoo li peb yuav tsum tau siv cov khoom siv hluav taws xob sab nraud. USB tso cai rau qhov siab tshaj ntawm 500mA uas peb tuaj yeem tshaj yog tias peb teeb tsa peb cov LEDs kom siab tshaj (480+40 = 520 nrog RGB LEDs lossis 640+40 = 680 nrog RGBW LEDs). Hmoov zoo, peb yuav tsis tas yuav tig lub LEDs rau lawv qhov ci ci (qhov ci tag nrho zoo nkauj dig muag), yog li peb yuav muaj kev nyab xeeb siv 5V txoj kev tsheb nqaj hlau ntawm peb Arduino, txuas nrog ntawm USB. Qhov tseeb, siv cov xim ntsuab uas kuv tau xaiv yuav tsuas yog siv ~ 7-8mA max ib LED rau tag nrho ~ 100mA qhov siab tshaj tam sim no, zoo nyob rau hauv 500mA max yuam los ntawm USB.

Yog li, txhua yam peb yuav tsum tau ua yog txuas tus DIN tus pin ntawm NeoPixel lo rau tus pin 12 (yuav luag txhua tus pin yuav ua haujlwm, tab sis qhov no yog qhov kuv siv), tus pin 5V ntawm NeoPixel lo rau 5V ntawm Arduino, thiab tus GND tus pin ntawm NeoPixel lo rau GND ntawm Arduino. Ua ntej, peb yuav tsum tau muab peb cov xov hlau txuas rau NeoPixel lo.

Txiav cov txuas ntawm ib qho kawg ntawm koj cov xov hlau thiab hle qhov kawg. Tin txhua ntawm lawv (siv cov laug rau txhua qhov kawg). Tom qab ntawd muab ib qho me ntsis tso rau ntawm txhua daim ntaub qhwv. Ua tib zoo kov txhua lub ncoo nrog cov hlau txuas, muab qhov kawg ntawm cov xov hlau sib txuas rau lub ncoo, tom qab ntawd tshem cov hlau.

Kauj Ruam 3: Txoj Cai

Hloov kho tshiab (2/19/2018): Kuv tshaj tawm tus qauv tshiab Arduino mus rau GitHub repo uas suav nrog txhua qhov kev hloov pauv uas tsim nyog rau Creeper Detector los ua haujlwm ntawm Circuit Playground Express (nws yuav tsis ua haujlwm nrog lub thawv, tab sis nws muaj txhua cov LEDs thiab qee qhov ntsuas tau ua rau hauv lub rooj tsavxwm, yog li tsis tas yuav siv cov laug). Nws suav nrog qee qhov kev ua haujlwm ntxiv txuas rau nws cov nyees khawm thiab swb swb!

Txog tus lej tag, koj tuaj yeem mus rau kuv Arduino Tsim cov duab kos lossis GitHub chaw cia khoom. Ua raws cov lus qhia ntawm no yog tias koj tsis paub yuav ua li cas sau thiab xa cov cai. Yog tias koj xaiv siv Arduino IDE, koj yuav tsum teeb tsa lub tsev qiv ntawv SerialCraft Arduino. Ua raws cov theem hauv qab "Ntshuam Zip" ntawm no kom ua li ntawd. Yog tias koj siv Arduino Tsim Web Editor, koj tuaj yeem mus ncaj qha rau kuv daim duab duab thaum koj teeb tsa thiab koj tuaj yeem zam qhov xav tau los nruab SerialCraft lub tsev qiv ntawv.

Kuv yuav mus hla qhov chaws ua hauv qab no.

Thawj ob kab suav nrog tsev qiv ntawv. Thawj zaug, SerialCraft.h, yog lub tsev qiv ntawv uas kuv tau sau uas ua rau muaj kev sib txuas lus yooj yim nrog SerialCraft mod. Kuv yuav taug kev koj los ntawm cov yam ntxwv uas kuv siv hauv qab no, tab sis koj tuaj yeem tshawb xyuas cov piv txwv thiab qee cov ntaub ntawv uas xav tau ntawm qee qhov haujlwm hauv nws GitHub chaw cia khoom. Lub tsev qiv ntawv thib ob yog Adafruit's NeoPixel lub tsev qiv ntawv thiab muab API rau kev hloov kho LEDs ntawm NeoPixel kab txaij.

#suav nrog

#suav nrog

Kab 4-17 yog qhov hloov pauv uas tuaj yeem hloov pauv raws li koj teeb tsa. Yog tias koj siv NeoPixel sawb nrog tus lej sib txawv lossis yog tias koj txuas koj NeoPixels mus rau tus lej sib txawv, koj yuav tsum hloov pauv thawj ob lub ntsiab lus, NUMLEDS thiab PIN. Koj yuav tsum tau hloov LED_TYPE rau hom uas koj muaj, sim hloov NEO_GRBW rau NEO_RGB lossis NEO_RGBW yog tias koj muaj teeb meem. Koj tuaj yeem hloov BLOCKS_PER_LED yog tias koj xav hloov kho qhov ntau uas koj tuaj yeem pom cov neeg nkag.

// Hloov cov kev hloov pauv kom haum koj cov teeb tsa

// tus lej ntawm LEDs hauv koj kab #define NUMLEDS 8 // tus pin uas cov ntaub ntawv LED txuas nrog rau #define PIN 12 // tus lej ntawm cov thaiv uas txhua tus LED sawv cev #define BLOCKS_PER_LED 4 // Hom LED sawb koj muaj (yog koj cov LEDs tsis tig ntsuab, tom qab ntawd koj yuav tsum hloov qhov kev txiav txim ntawm GRBW) #define LED_TYPE (NEO_GRBW+NEO_KHZ800) // END hloov pauv

Kab 19-27 txhais qee qhov txiaj ntsig uas peb yuav siv tom qab. DETONATE_DIST yog qhov kev ncua deb hauv Minecraft uas tus neeg nkag nkag yuav tsum tsis txav mus, teeb nws lub fuse thiab tawg. SAFE_DIST yog lub voos kheej -kheej tawg ntawm tus neeg nkag. Hloov cov txiaj ntsig no yuav cuam tshuam rau tus cwj pwm ntawm LEDs, tab sis kuv pom zoo kom khaws lawv li lawv yog thaum lawv cuam tshuam tus cwj pwm hauv Minecraft. MAX_DIST yog qhov nrug deb tshaj plaws uas peb yuav taug qab cov neeg nkag mus, uas yog raws tus naj npawb ntawm LEDs peb NeoPixel sawb muaj thiab BLOCKS_PER_LED tas li peb tau hais tseg saum toj no.

// Cov no yog cov txiaj ntsig uas yuav siv hauv peb qhov kev suav rau LED ci ci

// nrug tus neeg nkag nkag yuav pib tawg #define DETONATE_DIST 3 // nrug peb muaj kev nyab xeeb los ntawm cov neeg tawg paj tawg (koj yuav raug puas tsuaj yog tias koj nyob nrug deb li no) #define SAFE_DIST 7 // nrug deb tshaj plaws uas peb taug qab tus creeper #define MAX_DIST (NUMLEDS*BLOCKS_PER_LED)

Kab 29-36 txhais qee qhov kev hloov pauv uas peb yuav siv thoob plaws hauv txoj haujlwm. Sc qhov sib txawv yog qhov khoom siv SerialCraft uas muab qhov yooj yim rau siv los sib tham nrog SerialCraft Minecraft mod. Koj yuav pom tias peb siv nws li cas hauv qab no. dist yog qhov sib txawv uas peb yuav teeb tsa mus rau qhov ze tshaj plaws thaum peb tau txais cov lus creeper nrug los ntawm SerialCraft mod. strip yog Adafruit_NeoPixel cov khoom uas muab txoj hauv kev los tswj NeoPixel strips.

// Nov yog SerialCraft khoom siv rau kev sib tham nrog SerialCraft Minecraft mod

SerialCraft sc; // nrug ntawm creeper int dist = 100; // Pib ua ib kab ntawm LEDs, koj yuav xav tau hloov qhov thib peb Adafruit_NeoPixel sawb = Adafruit_NeoPixel (NUMLEDS, PIN, LED_TYPE);

Kab 38-47 yog peb teeb tsa muaj nuj nqi. Txhua Arduino cov ntawv yuav tsum muaj ib qho. Nws tau ua haujlwm ib zaug thaum Arduino tau siv hluav taws xob, yog li nws yog qhov chaw zoo rau pib qhov txawv txav. Peb hu rau teeb tsa () txheej txheem ntawm peb cov khoom SerialCraft los pib qhov chaw nres nkoj Serial rau tib tus nqi baud raws li tau teeb tsa hauv SerialCraft mod (115200). Tom qab ntawd peb hu rau registerCreeperDistanceCallback txoj kev yog li peb tuaj yeem teb cov lus tsis txaus ntseeg uas xa tuaj rau peb los ntawm SerialCraft mod. Peb yuav hu xov tooj mus rau sc.loop () txoj hauv kev me ntsis ntxiv. Hauv txoj hauv kev voj, nws tshuaj xyuas seb peb puas tau txais cov lus los ntawm SerialCraft mod lossis ua rau muaj xwm txheej dab tsi xws li nias lub pob, thiab hu rau lub luag haujlwm uas peb tau sau npe los daws nws. Txhua yam peb tab tom ua yog nrhiav qhov ze tshaj plaws ntawm cov neeg nyob ze, yog li nws tsuas yog ua haujlwm uas peb tau sau npe. Koj yuav pom hauv qab no, txhua yam peb ua hauv txoj haujlwm ntawd tau teeb tsa peb qhov sib txawv, uas peb yuav siv thaum hloov kho cov LEDs. Thaum kawg, peb pib peb cov hlua LED thiab tig tag nrho cov LED tawm los ntawm kev siv strip.begin () thiab strip.show ().

teeb tsa tsis muaj dab tsi () {// initialize SerialCraft sc.setup (); // cuv npe tus neeg nkag rov qab nyob deb kom tau txais qhov kev ncua deb mus rau tus neeg nkag ze ze tshaj plaws sc.registerCreeperDistanceCallback (creeper); // initialize LED strip strip.begin (); strip.show (); }

Kab 49-80 txhais lub voj kev ua haujlwm. Lub voj muaj nuj nqi yog qhov uas txhua qhov khawv koob tshwm sim. Lub voj muaj nuj nqi hu ua ntau zaus. Thaum twg los xij lub voj ua haujlwm tiav, nws tsuas yog pib rov qab rau saum toj dua. Hauv nws, peb siv qhov sib txawv sib txawv thiab peb qhov ruaj khov nyob rau sab saum toj ntawm cov ntawv los txiav txim seb lub xeev ntawm txhua LED yuav tsum yog dab tsi.

Nyob rau sab saum toj ntawm kev ua haujlwm voj peb txhais ob peb yam sib txawv.

// ranges ntawm 0 thaum> = MAX_DIST deb ntawm cov neeg tawg paj tawg lub vojvoog mus rau NUMLEDS*BLOCKS_PER_LED thaum nyob saum cov creeper

int blocksFromCreeperToMax = txwv (MAX_DIST+DETONATE_DIST-dist, 0, MAX_DIST); int curLED = blocksFromCreeperToMax/BLOCKS_PER_LED; // ranges ntawm 0 txog NUMLEDS-1 int curLEDLevel = (blocksFromCreeperToMax%BLOCKS_PER_LED+1); // ranges ntawm 1 txog BLOCKS_PER_LED

Txij li thaum peb tab tom teeb pom kev zoo LEDs raws li peb nyob ze rau tus neeg nkag, peb yuav tsum tau hloov pauv peb qhov sib txawv deb. Peb txhais cov blockFromCreeperToMax los sawv cev rau cov lej ntawm cov neeg nkag los ntawm qhov deb tshaj plaws uas peb saib xyuas. Thaum peb nyob saum tus neeg nkag (lossis theej, tsawg dua lossis sib npaug rau DETONATE_DIST deb ntawm tus neeg nkag), blocksFromCreeperToMax yuav yog MAX_DIST. Thaum peb nyob deb dhau MAX_DIST deb ntawm cov neeg nkag, blockFromCreeperToMax yuav yog 0. Qhov sib txawv no yuav muaj txiaj ntsig thaum peb teeb peb cov LEDs raws li nws loj dua, ntau LEDs peb lub teeb.

curLED yog sab saum toj tshaj plaws LED uas yuav tau taws. Txhua 4 qhov thaiv uas peb txav mus rau tus neeg nkag nkag yuav teeb lub LED ntxiv (tus lej tuaj yeem hloov pauv nyob rau sab saum toj ntawm cov ntawv nrog BLOCKS_PER_LED sib txawv). Peb hloov kho qhov ci ntawm sab saum toj feem ntau LED yog li peb tuaj yeem pom kev hloov pauv nyob deb mus rau ib qho thaiv. curLEDLevel yog qhov sib txawv uas peb yuav siv los xam cov kev hloov pauv ci ci. Nws txawv ntawm 1 txog 4 (lossis yam BLOCKS_PER_LED tau txhais raws li).

Peb yuav siv cov kev hloov pauv no thaum rov hla txhua qhov LED:

rau (uint16_t i = 0; i <strip.numPixels (); i ++) {if (i <= curLED) {// ci tshaj plaws thaum nyob hauv cov neeg tawg paj lub qhov hluav taws xob tawg, tawm thaum creeper yog NUMLEDS*BLOCKS_PER_LED deb ntab siv = (ntab) blocksFromCreeperToMax /MAX_DIST; yog (kuv == curLED) {// kawg LED lit // ua lub teeb ci kawg thaum peb mus txog tom ntej LED ntab lastIntensity = (ntab) curLEDLevel/BLOCKS_PER_LED; siv *= qhov siab kawg; } yog (deb <SAFE_DIST) {siv * *(millis ()/75)%2; } siv = pow (siv tau, 2.2); // gamma nkhaus, ua rau LED ci ntsa iab zoo saib rau peb lub qhov muag thaum qhov ci ci tiag tiag tsis yog kab txaij.setPixelColor (i, strip. Color (10*siv, 70*siv tau, 10*siv tau, 0)); } lwm {strip.setPixelColor (i, strip. Color (0, 0, 0, 0))); }}

Yog tias tam sim no LED uas peb tab tom kho dua yog tsawg dua lossis sib npaug rau qhov sib txawv curLED, tom qab ntawd peb paub tias nws yuav tsum tau nyob thiab peb yuav tsum suav nws qhov ci. Txwv tsis pub, tua nws. Peb siv qhov sib txawv sib txawv uas yuav muaj tus nqi nruab nrab ntawm 0 thiab 1 los sawv cev qhov ci ntawm peb cov LED. Thaum teeb cov xim kawg ntawm LED, peb yuav sib zog ntxiv qhov xim nrog (10, 70, 10), xim ntsuab. Peb siv cov blockFromCreeperToMax sib txawv kom tau ib feem pua los ntawm kev faib los ntawm MAX_DIST, yog li cov LEDs yuav ci tshaj plaws thaum peb nyob ze rau cov neeg nkag. Yog tias peb tab tom suav qhov ci ci ntawm curLED, tom qab ntawd peb hloov nws qhov ci ci rau txhua qhov thaiv ntawm qhov deb tus neeg nkag los ntawm koj mus rau BLOCKS_PER_LED teeb tsa. Qhov no yog qhov hloov pauv maj mam, tab sis nws tuaj yeem siv los saib yog tias tus neeg nkag nkag los ze dua lossis nyob deb dua ntawm cov qoob loo zoo dua li 4 ntu nws yuav siv rau ntxiv LED kom pom kev. Tom qab ntawd peb txheeb xyuas yog tias peb nyob hauv qhov tawg tawg ntawm cov neeg nkag thiab ntsais yog tias peb yog. Qhov kev qhia (millis ()/75)%2 yuav rov ntsuas dua 0 rau 75 milliseconds thiab tom qab ntawd 1 rau 75 milliseconds, yog li sib ntxiv peb qhov kev siv los ntawm qhov kev hais tawm yuav ua rau LEDs ntsais.

Qhov hloov pauv zaum kawg rau qhov siv (siv = pow (siv tau, 2.2)), yog kev hloov kho hu ua gamma kho. Tib neeg lub qhov muag pom lub teeb nyob rau hauv txoj kev uas tsis yog kab. Peb tuaj yeem pom ntau qhov gradations ntawm lub teeb ci ntau dua li peb tuaj yeem ua lub teeb ci, yog li thaum peb nqis qis qhov ci ntawm lub teeb ci peb nqis qis dua ntau dua thaum lub teeb tau dim kom pom zoo li peb tab tom nqis hauv kab zam rau tib neeg qhov muag. Ib qho kev cuam tshuam ntawm qhov kev hloov pauv no yog peb siv qis zog vim tias peb cov pixels kawg muaj ntau dua nyob rau hauv dimmer (qis zog) ntau dua li qhov ci dua (ntau zog).

Ob txoj kab kawg ntawm peb txoj haujlwm ua haujlwm hloov kho cov LEDs rau qhov muaj txiaj ntsig peb tsuas yog teeb tsa thiab tom qab ntawd hu rau txhua tus neeg tuav haujlwm uas yuav tsum tau hu los ntawm SerialCraft (qhov no yog qhov ua haujlwm nyob deb, yog tias peb tau txais cov lus tsis txaus ntseeg los ntawm SerialCraft mod).

strip.show ();

sc.loop ();

Cov kab kawg ntawm peb tsab ntawv yog qhov ua haujlwm nkag, qhov uas peb khaws qhov deb mus rau tus neeg nkag ze tshaj plaws thaum SerialCraft mod xa lus rau peb nrog cov ntaub ntawv ntawd.

void creeper (int d) {dist = d; }

Tam sim no koj tsuas yog yuav tsum tau sau ua ke thiab upload cov cai!

Kauj ruam 4: Cov ntaub ntawv kaw

Cov ntaub ntawv kaw
Cov ntaub ntawv kaw
Cov ntaub ntawv kaw
Cov ntaub ntawv kaw
Cov ntaub ntawv kaw
Cov ntaub ntawv kaw

Kuv laser txiav txhua daim ntawm kuv lub thawv ntawv, uas suav nrog ib lub paj ntoo acrylic frosted, ib qho ntshiab acrylic creeper, 6 daim plywood, nrog lub kaum plaub lub qhov loj ntawm cov acrylic creepers thiab qhov nyob rau hauv lub ces kaum rau qhov txuas thiab 1 daim plywood rau sab nraub qaum uas muaj lub qhov ntsaws qhov taub thiab ib lub qhov loj rau cov xov hlau tawm los. Txuas cov xov hlau los ntawm NeoPixel lo kom peb tuaj yeem txuas nws hauv peb lub thawv. Ob daim ntawv PDF hauv qab no tuaj yeem siv los txiav laser txhua daim uas kuv tau piav qhia.

NeoPixel lo tau teeb tsa rau sab nraub qaum ntawm plywood siv #2 ntoo ntsia hlau thiab nylon spacers. Acrylic creepers raug teeb rau hauv ob qho ntawm cov plywood nrog cov qhov square. Ua ntej yuav ua li no, xyuas kom koj nco qab tias cov hlau xaim mus rau lub ncoo twg ntawm tus pas.

Acrylic creepers yog qhov loj me 1 puas ntawm ib nti loj dua qhov uas muab kom haum zoo nrog cov plywood. Kuv siv tus tuav ntawm cov hlua hlau xaim txhawm rau tso siab rau ntawm txhua lub ces kaum thiab ua haujlwm los ntawm txoj kev ib puag ncig tag nrho cov neeg nkag mus kom tau txais qhov haum. Ib qho ntxiv, acrylic laser pdf suav nrog cov ntoo nkag hauv ib daim me me ntawm lub ntsej muag tag nrho ntawm lub qhov rooj nrog lub qhov khawm kom koj tuaj yeem zam kom tsis txhob muaj qhov nruj nrog qhov me me acrylic creeper.

Cov dej khov acrylic faib lub teeb los ntawm ib tus neeg LEDs thiab cov ntshiab acrylic qhia pom cov ntoo nkag tau zoo dua, yog li ob qho ua ke zoo dua rau kuv dua li ntawm tus kheej. Thaum cov neeg nkag nkag nyob hauv qhov chaw, sib sau tag nrho koj daim plywood ua ke thiab txuas lawv ua ke nrog M3 tshuab ntsia hlau thiab txiv ntseej. Tom qab ntawd rov txuas cov xov hlau mus rau 5V, GND thiab tus pin 12.

Kauj Ruam 5: Minecraft Forge thiab SerialCraft Mod

Minecraft Forge thiab SerialCraft Mod
Minecraft Forge thiab SerialCraft Mod
Minecraft Forge thiab SerialCraft Mod
Minecraft Forge thiab SerialCraft Mod
Minecraft Forge thiab SerialCraft Mod
Minecraft Forge thiab SerialCraft Mod

Pib los ntawm kev tsim tus account Minecraft, tom qab ntawd rub tawm thiab teeb tsa Minecraft tus thov kev pab.

Koj yuav xav tau Minecraft Forge rau version 1.7.10 txhawm rau tuaj yeem teeb tsa SerialCraft mod. Mus rau 1.7.10 Minecraft Forge nplooj ntawv rub tawm. Minecraft Forge qhov chaw muaj ntau qhov kev tshaj tawm uas nrhiav kom koj nyem qhov tsis raug thiab coj koj mus rau lwm qhov. Ua raws cov duab saum toj no kom ntseeg tau tias koj nyob ntawm txoj kev raug! Koj yuav xav nyem qhov Installer khawm hauv qab Pom Zoo 1.7.10 version (lossis qhov tseeb, Kuv tsis paub tseeb qhov txawv). Koj yuav raug coj mus rau nplooj ntawv nrog tus chij nyob rau sab saum toj ntawm nplooj ntawv uas hais tias "Cov ntsiab lus hauv qab kab ntawv no yog kev tshaj tawm. Tom qab suav suav, nyem khawm Hla mus rau sab xis kom pib koj Forge rub tawm." Nco ntsoov tias koj tos rau suav suav thiab tom qab ntawv nyem khawm Hla mus pib rub tawm.

Ob npaug nias lub installer tom qab nws ua tiav rub tawm. Tawm qhov kev kuaj tsis raug (Install Client thiab txoj hauv kev uas nws qhia meej), tom qab ntawv nyem OK. Nws yuav nruab Minecraft Forge. Thaum nws ua tiav koj yuav tuaj yeem pib Minecraft Launcher, tab sis yuav muaj qhov kev xaiv ntxiv los xaiv 1.7.10 version Forge (saib daim duab saum toj no).

Tam sim no peb yuav tsum teeb tsa SerialCraft mod rau koj phau ntawv teev npe mods. Rub tawm qhov tseeb version ntawm SerialCraft mod ntawm no. Koj tseem yuav xav tau lub tsev qiv ntawv jssc. Unzip ob cov ntaub ntawv, uas yuav tsum tso koj nrog ob.jar cov ntaub ntawv. Koj yuav tsum tau muab cov ntawv ntawd tso rau hauv koj daim ntawv mods. Ntawm Windows, koj yuav tsum muaj peev xwm mus rau Run los ntawm cov ntawv qhia zaub mov pib thiab nkag rau %appdata %\. Minecraft mods ua ntej nyem Run. Ntawm Mac, koj tuaj yeem mus rau Tsev/Tsev qiv ntawv/Kev Pab Txhawb/minecraft/mods. Tee ob.jar cov ntaub ntawv rau hauv daim nplaub tshev uas koj nyuam qhuav qhib. Tam sim no khiav Minecraft thiab tso tawm 1.7.10 Forge version. Koj yuav tsum muaj peev xwm nyem rau Mods thiab pom SerialCraft teev rau ntawm sab laug.

Kauj Ruam 6: Siv SerialCraft Mod

Siv SerialCraft Mod
Siv SerialCraft Mod

Tam sim no koj tau teeb tsa SerialCraft mod, koj yuav tsum nkag mus rau lub ntiaj teb thiab pib siv nws. Tsim lub ntiaj teb tshiab lossis qhib ib qho ntawm koj lub ntiaj teb uas tau txais kev cawmdim (yog tias koj xav ua si ntawm ntau daim ntawv qhia, koj yuav tsum tau ua kom ntseeg tau tias lub server thiab txhua tus neeg siv khoom uas txuas rau nws muaj SerialCraft mod teeb tsa). Xyuas kom tseeb tias koj tus Ntiv Taw Creeper txuas nrog koj lub khoos phis tawj, tom qab ntawd nias tus yuam sij K. Nws yuav tsum coj los sib tham zoo li cov duab saum toj no (ntawm Windows, tsis yog /dev/tty.usbserial… nws yuav tsum hais qee yam xws li COM1). Yog tias tsis muaj dab tsi tshwm sim, xyuas kom koj txuas nrog Creeper Detector. Nyem rau Txuas Txuas, tom qab ntawd nyem Escape. Yog tias koj cov lej tau suav ua ke thiab muab tso kom raug, koj li Creeper Detector yuav tsum zoo mus! Yog tias Creeper nyob hauv 32 qhov thaiv, nws yuav tsum teeb. Zoo siab tua tsiaj!

Yog tias koj nyiam qhov Qhia Ntawv no, thov txiav txim siab pov npav rau nws hauv Minecraft Contest thiab Epliog Challenge!

Minecraft sib tw 2018
Minecraft sib tw 2018
Minecraft sib tw 2018
Minecraft sib tw 2018

Qhov khoom plig thib ob hauv Minecraft Challenge 2018

Pom zoo: