Orodha ya maudhui:

Kipindi cha chumba cha kusoma: Hatua 7
Kipindi cha chumba cha kusoma: Hatua 7

Video: Kipindi cha chumba cha kusoma: Hatua 7

Video: Kipindi cha chumba cha kusoma: Hatua 7
Video: UKIZIONA DALILI HIZI MAMA MJAMZITO BASI UTAJIFUNGUA MTOTO WA KIUME 2024, Novemba
Anonim
Kipindi cha Kusomea Chumba
Kipindi cha Kusomea Chumba
Kipindi cha Kusomea Chumba
Kipindi cha Kusomea Chumba
Kipindi cha Kusomea Chumba
Kipindi cha Kusomea Chumba

Maagizo ya jinsi ya kuunda kipima muda kwa chumba cha kujifunzia.

Hatua ya 1: Video ya Mwingiliano

drive.google.com/file/d/12z5zQR52AXILX2AGb3EplfbmZWANZiCl/view?usp=drivesdk

Hatua ya 2: Taarifa ya Shida

Mara nyingi, vyumba vya kusoma huchukuliwa kila wakati. Hii hutokea kwa sababu watu wanapenda kukaa ndani ya chumba kwa muda mrefu zaidi kuliko wanahitaji. Tumebuni kipima muda ambacho kinamruhusu kila mtu jumla ya masaa 2 na watu wanaosubiri uwezo wa kuomba chumba kuwa kikundi kinachofuata. Matumizi ya RGB kwenye Neopixels itaonyesha muda uliobaki.

Hatua ya 3: Muhtasari wa Jinsi Inavyofanya Kazi

Kipima muda kina sehemu zilizokatwa na mkataji wa laser, vifungo 3, 1 LED, 1 potentiometer.

Neopixels na potentiometer imeunganishwa kwa NodeMCU. NodeMCU imewekwa kushughulikia tena umbali ambao potentiometer imegeuzwa kubadilisha kiwango cha LED zilizo kwenye mkanda wa Neopixel wa duara. Kitufe cha Ombi kinasimamisha kazi ya Anza, Simama, na Weka kazi ya wakati. Rangi ya LED kwenye kipima saa ndani ya chumba ni rangi ile ile ya LED iliyowashwa kando ya sanduku. Neopixel kando ya sanduku inawakilisha onyesho kwenye kushawishi ya jengo kujua ni chumba gani kinachukuliwa na ni muda gani umesalia. 2 LED zinaagizwa kwa kila chumba, LED moja inawakilisha ikiwa chumba kimechukuliwa na vioo vingine vilivyoongozwa rangi ya taa za LED kwenye kipima muda (kijani ni muda zaidi, halafu manjano, halafu nyekundu kwa muda kidogo).

Hatua ya 4: Orodha ya Vifaa na Zana

-Futa Acrylic

-MicroUSB Cable

www.digikey.com/product-detail/en/stewart-…

-Bodi ya mkate

www.amazon.com/gp/product/B01EV6LJ7G/ref=o…

-Potentiometer

www.alliedelec.com/honeywell-380c32500/701…

-3 vifungo

www.digikey.com/product-detail/en/te-conne…

-NodeMCU

www.amazon.com/gp/product/B07CB4P2XY/ref=o…

- Vipande 2 vya Neopikseli

www.amazon.com/Lighting-Modules-NeoPixel-W…

-Wasimamizi

www.digikey.com/product-detail/en/te-conne…

- waya

www.digikey.com/product-detail/en/sparkfun…

-1 LED

www.mouser.com/ProductDetail/Cree-Inc/C512…

-Gundi ya Moto Gundi

www.walmart.com/ip/AdTech-Hi-Temp-Mini-Hot …….

Vipande Velcro Vigumu

www.amazon.com/VELCRO-Brand-90076-Fastener ……

Hatua ya 5: Anza Kujenga na Ubao wa Mkate

Anza Kujenga na Ubao wa Mkate
Anza Kujenga na Ubao wa Mkate

Pini ya kati hadi A0 kwenye Potentiometer

Vin kwa Nguvu kwenye pete ya Neopixel

3v3 kwa upande mmoja wa Potentiometer

Viwanja vyote kwa Ardhi kwenye NodeMCU

D1 Kuomba Kitufe

D2 Kuomba LED

D3 ili Kuanza Kitufe

D4 kwa Button Stop

D5 kupinga kipengee cha Ingizo la Neopikisi kwenye pete

D6 kupinga kipande cha mkato wa Ingizo la Neopikseli

Hatua ya 6: Kuanzisha Msimbo

Hii ndio nambari ya kuhakikisha kuwa mradi wako unafanya kazi hadi sasa. Kipima muda kinapaswa kuwa sekunde kadhaa kwa kila LED kwenye Gonga la Neopixel. Mara tu unapojua inafanya kazi hadi wakati huu, unachohitaji kufanya ni kubadilisha wakati ikiwa taarifa ziko chini kwa anuwai yako maalum. Nitaweka '#Badilisha wakati' kwa kila wakati ikiwa taarifa ambazo unahitaji kubadilisha kwa mgao wako wa wakati.

Kujaribu Nambari:

kuagiza utime

muda wa kuagiza

kutoka kwa kuingiza mashine ADC

kuagiza mashine

kuagiza neopixel

adc = ADC (0)

pini = mashine. Pini (14, mashine. Pini. JINSI)

np = neopikseli. NeoPixel (pini, 12)

pin2 = mashine. Pini (12, mashine. Pini. OUT)

np2 = neopikseli. NeoPixel (pin2, 8)

l1 = mashine. Pini (4, mashine. Pin. OUT)

b1 = mashine. Pini (5, mashine. Pin. IN, mashine. Pin. PULL_UP)

b3 = mashine. Pini (2, mashine. Pin. IN, mashine. Pin. PULL_UP)

b2 = mashine. Pini (0, mashine. Pin. IN, mashine. Pin. PULL_UP)

l1.thamani (0)

def tglled (): # toggle 'ombi' kazi ya LED

ikiwa l1.thamani () == 0:

l1.thamani (1)

mwingine:

l1.thamani (0)

x = 0

b1temp1 = 0

b1temp2 = 0

t = 0

b2temp1 = 0

b2temp2 = 0

b3temp1 = 0

b3temp2 = 0

s = 0

wakati Kweli:

# Hiki ni kitufe kinachogeuza LED ya 'ombi'

b1temp2 = b1.thamani ()

ikiwa b1temp1 na sio b1temp2:

kubatizwa ()

saa. kulala (0.05)

b1temp1 = b1temp2

# Hii ni gridi ya taifa

np2 [0] = np [11]

ikiwa l1.thamani () == 1:

np2 [1] = (30, 0, 0)

mwingine:

np2 [1] = (0, 0, 30)

np2. andika ()

# Hapa ndipo tunachagua ni muda gani tunahitaji

ikiwa t == 0:

kwa mimi katika anuwai (-1, 12):

ikiwa (l1.thamani () == 0):

ikiwa (adc.read ()> = (85.34 * (i + 1))):

np = (0, 0, 0)

np [11] = (0, 0, 30)

s = (i + 1)

mwingine:

np = (0, 0, 30)

np. andika ()

mwingine:

np = (0, 0, 0)

andika ()

# Hiki ni kitufe cha kuanza kipima muda

ikiwa (l1.value () == 0) na (t == 0):

b2temp2 = b2.thamani ()

ikiwa b2temp1 na sio b2temp2:

x + = 1

t + = (s * 100)

saa. kulala (0.05)

b2temp1 = b2temp2

# Kitufe hiki kinamaliza kipima muda

ikiwa (l1.thamani () == 0):

b3temp2 = b3.thamani ()

ikiwa b3temp1 na sio b3temp2:

x = 0

t = 0

saa. kulala (0.05)

b3temp1 = b3temp2

# Hiki ndicho kipima muda

ikiwa x> 0:

t + = 1

ikiwa (t> 0) na (t <= 100): #Badilisha wakati

np [0] = (5, 30, 0)

np [1] = (5, 30, 0)

np [2] = (5, 30, 0)

np [3] = (5, 30, 0)

np [4] = (5, 30, 0)

np [5] = (5, 30, 0)

np [6] = (5, 30, 0)

np [7] = (5, 30, 0)

np [8] = (5, 30, 0)

np [9] = (5, 30, 0)

np [10] = (5, 30, 0)

np [11] = (5, 30, 0)

np. andika ()

ikiwa (t> 100) na (t <= 200): #Badilisha wakati

np [0] = (0, 0, 0)

np [1] = (10, 30, 0)

np [2] = (10, 30, 0)

np [3] = (10, 30, 0)

np [4] = (10, 30, 0)

np [5] = (10, 30, 0)

np [6] = (10, 30, 0)

np [7] = (10, 30, 0)

np [8] = (10, 30, 0)

np [9] = (10, 30, 0)

np [10] = (10, 30, 0)

np [11] = (10, 30, 0)

np. andika ()

ikiwa (t> 200) na (t <= 300): #Badilisha wakati

np [0] = (0, 0, 0)

np [1] = (0, 0, 0)

np [2] = (15, 30, 0)

np [3] = (15, 30, 0)

np [4] = (15, 30, 0)

np [5] = (15, 30, 0)

np [6] = (15, 30, 0)

np [7] = (15, 30, 0)

np [8] = (15, 30, 0)

np [9] = (15, 30, 0)

np [10] = (15, 30, 0)

np [11] = (15, 30, 0)

andika ()

ikiwa (t> 300) na (t <= 400): #Badilisha wakati

np [0] = (0, 0, 0)

np [1] = (0, 0, 0)

np [2] = (0, 0, 0)

np [3] = (20, 30, 0)

np [4] = (20, 30, 0)

np [5] = (20, 30, 0)

np [6] = (20, 30, 0)

np [7] = (20, 30, 0)

np [8] = (20, 30, 0)

np [9] = (20, 30, 0)

np [10] = (20, 30, 0)

np [11] = (20, 30, 0)

andika ()

ikiwa (t> 400) na (t <= 500): #Badilisha wakati

np [0] = (0, 0, 0)

np [1] = (0, 0, 0)

np [2] = (0, 0, 0)

np [3] = (0, 0, 0)

np [4] = (25, 30, 0)

np [5] = (25, 30, 0)

np [6] = (25, 30, 0)

np [7] = (25, 30, 0)

np [8] = (25, 30, 0)

np [9] = (25, 30, 0)

np [10] = (25, 30, 0)

np [11] = (25, 30, 0)

np. andika ()

ikiwa (t> 500) na (t <= 600): #Badilisha wakati

np [0] = (0, 0, 0)

np [1] = (0, 0, 0)

np [2] = (0, 0, 0)

np [3] = (0, 0, 0)

np [4] = (0, 0, 0)

np [5] = (30, 30, 0)

np [6] = (30, 30, 0)

np [7] = (30, 30, 0)

np [8] = (30, 30, 0)

np [9] = (30, 30, 0)

np [10] = (30, 30, 0)

np [11] = (30, 30, 0)

np. andika ()

ikiwa (t> 600) na (t <= 700): #Badilisha wakati

np [0] = (0, 0, 0)

np [1] = (0, 0, 0)

np [2] = (0, 0, 0)

np [3] = (0, 0, 0)

np [4] = (0, 0, 0)

np [5] = (0, 0, 0)

np [6] = (30, 25, 0)

np [7] = (30, 25, 0)

np [8] = (30, 25, 0)

np [9] = (30, 25, 0)

np [10] = (30, 25, 0)

np [11] = (30, 25, 0)

np. andika ()

ikiwa (t> 700) na (t <= 800): #Badilisha wakati

np [0] = (0, 0, 0)

np [1] = (0, 0, 0)

np [2] = (0, 0, 0)

np [3] = (0, 0, 0)

np [4] = (0, 0, 0)

np [5] = (0, 0, 0)

np [6] = (0, 0, 0)

np [7] = (30, 20, 0)

np [8] = (30, 20, 0)

np [9] = (30, 20, 0)

np [10] = (30, 20, 0)

np [11] = (30, 20, 0)

andika ()

ikiwa (t> 800) na (t <= 900): #Badilisha wakati

np [0] = (0, 0, 0)

np [1] = (0, 0, 0)

np [2] = (0, 0, 0)

np [3] = (0, 0, 0)

np [4] = (0, 0, 0)

np [5] = (0, 0, 0)

np [6] = (0, 0, 0)

np [7] = (0, 0, 0)

np [8] = (30, 15, 0)

np [9] = (30, 15, 0)

np [10] = (30, 15, 0)

np [11] = (30, 15, 0)

np. andika ()

ikiwa (t> 900) na (t <= 1000): #Badilisha wakati

np [0] = (0, 0, 0)

np [1] = (0, 0, 0)

np [2] = (0, 0, 0)

np [3] = (0, 0, 0)

np [4] = (0, 0, 0)

np [5] = (0, 0, 0)

np [6] = (0, 0, 0)

np [7] = (0, 0, 0)

np [8] = (0, 0, 0)

np [9] = (30, 10, 0)

np [10] = (30, 10, 0)

np [11] = (30, 10, 0)

np. andika ()

ikiwa (t> 1000) na (t <= 1100): #Badilisha wakati

np [0] = (0, 0, 0)

np [1] = (0, 0, 0)

np [2] = (0, 0, 0)

np [3] = (0, 0, 0)

np [4] = (0, 0, 0)

np [5] = (0, 0, 0)

np [6] = (0, 0, 0)

np [7] = (0, 0, 0)

np [8] = (0, 0, 0)

np [9] = (0, 0, 0)

np [10] = (30, 5, 0)

np [11] = (30, 5, 0)

np. andika ()

ikiwa (t> 1100) na (t <= 1200): #Badilisha wakati

np [0] = (0, 0, 0)

np [1] = (0, 0, 0)

np [2] = (0, 0, 0)

np [3] = (0, 0, 0)

np [4] = (0, 0, 0)

np [5] = (0, 0, 0)

np [6] = (0, 0, 0)

np [7] = (0, 0, 0)

np [8] = (0, 0, 0)

np [9] = (0, 0, 0)

np [10] = (0, 0, 0)

np [11] = (30, 0, 0)

np. andika ()

ikiwa t> = 1300: #Badilisha wakati

t = 0

x = 0

Hatua ya 7: Kumaliza Kugusa

Sasa, ukifika hapa, unapaswa kuwa na nambari ya kufanya kazi iliyopakiwa kwenye NodeMCU na sehemu zote zimefungwa kwenye ubao wa mkate. Mara tu ukijaribu nambari na ukata vipande vyovyote ulivyo navyo kwa nje, i.e.kaseti ya kukata laser, unaweza sasa kuziba waya kwa NodeMCU. Uuzaji ni wa hiari lakini inaweza kuifanya iwe salama zaidi na ndogo kwa casing yako. Hapa kuna sehemu za kukata laser ambazo tumetengeneza.

Ilipendekeza: