Cov txheej txheem:

WiFi Coj Fedora Hat (ESP8266 + WS2812b): 5 Kauj Ruam (nrog Duab)
WiFi Coj Fedora Hat (ESP8266 + WS2812b): 5 Kauj Ruam (nrog Duab)

Video: WiFi Coj Fedora Hat (ESP8266 + WS2812b): 5 Kauj Ruam (nrog Duab)

Video: WiFi Coj Fedora Hat (ESP8266 + WS2812b): 5 Kauj Ruam (nrog Duab)
Video: Magic Hat - A wearable IoT Project 2024, Kaum ib hlis
Anonim
Image
Image
Yam Koj Xav Tau
Yam Koj Xav Tau

Qhov no yog qhov zoo saib zoo Lub kaus mom, Koj tuaj yeem hloov xim thiab cuam tshuam ntawm lub teeb nrog koj lub xov tooj ntse lossis lub khoos phis tawj, thiab kuv kuj sim ua kom yooj yim thiab pheej yig li sai tau. Tsis tas li nws muaj lub roj teeb rov los tau yog li koj tuaj yeem nqa qhov no nrog koj! Qhov no yog khoom plig zoo ib yam!. Yog li Cia Pib ------

Kauj Ruam 1: Yam Koj Xav Tau

Yam Koj Xav Tau
Yam Koj Xav Tau
Yam Koj Xav Tau
Yam Koj Xav Tau

Peb xav tau qee yam khoom siv thiab qee yam cuab yeej yooj yim los ua qhov no-

1) NodeMcu Lolin v3 (ESP8266 12e) [Lub hlwb ntawm lub kaus mom]

2) WS2812b [aka NeoPixel] Kuv siv 8 daim

3) 18650 li-ion roj teeb [Lub hwj chim loj]

4) tiv thaiv roj teeb thiab them nqi hluav taws xob

5) 5V boost converter module

6) Txhua yam kev hloov spdt

7) Cov xov hlau

8) tus pin headers [Txuas xov hlau mus rau ntawm mcu]

9) Qee cov xov dub thiab daim ntaub dub

10) THIAB HUAB TAIS HUAB TAIS Lub kaus mom Nws tus kheej

Cov cuab yeej-

1) Soldering hlau thiab solder

2) Pliers

3) Cutter

4) Koob

THIAB lub khoos phis tawj los teeb tsa NodeMCU

Kauj ruam 2: Schematic Daim duab

Schematic Daim duab
Schematic Daim duab

Raws li hauv daim duab hauv av thiab Vcc los ntawm Roj teeb txuas rau tp4056 module [Nco tseg- Hauv daim duab koj yuav pom tias nws yog tp4056 module tab sis qhov tseeb kuv siv tp4056 module nrog them nyiaj ntau dua, tshaj tawm, thiab luv luv luv luv luv luv] los ntawm module vcc txuas rau 5v lub zog txhawb nqa los ntawm kev hloov thiab hauv av txuas ncaj qha mus rau lub zog txhawb nqa. Los ntawm kev txhawb zog tso tawm Vcc Thiab Hauv av txuas Ob NodeMCU thiab cov coj. D1 los ntawm NodeMCU txuas rau WS2812b's Din tus pin.

Kuv pom zoo koj los tsim daim ntawv pov thawj hauv pawg thawj coj saib ua ntej.

Kauj ruam 3: Software thiab Code

Software thiab Code
Software thiab Code
Software thiab Code
Software thiab Code
Software thiab Code
Software thiab Code

Tam sim no cia ua qhov software

Hauv qhov haujlwm no kuv tau siv McLighting project, Ua tsaug rau Toblum

Download McLighting los ntawm adove

Lawv yog cov lus qhia ntxaws ntawm no -

Tab sis kuv sim piav qhia hauv cov lus yooj yim -

  • Ua ntej koj xav tau Arduino ID, rub nws los ntawm no -
  • Tom qab ntawd koj yuav tsum teeb tsa ESP8266 pawg thawj coj txhawb nqa rau arduino, mus rau qhov kev nyiam sib tham thiab nkag mus rau qhov URL hauv qab no raws li Cov Phiaj Xwm Ntxiv Manger URL
  • Tam sim no mus rau cov cuab yeej - pawg thawj coj saib xyuas thiab xaiv NodeMCU 1.0, teeb tsa CPU zaus rau 80 MHz, thiab Flash loj txog 4M (1M SPIFFS), tom qab ntawd xaiv qhov chaw com kom raug.
  • Tam sim no peb xav tau ntxiv qee lub tsev qiv ntawv -Mus rau "Sketch"> "Xws li Lub Tsev Qiv Ntawv"> "Tswj Cov Tsev Qiv Ntawv …" thiab teeb tsa cov tsev qiv ntawv hauv qab no los ntawm kev tshawb nrhiav lawv thiab teeb tsa: 1) WiFiManager los ntawm tzapu2) WebSockets los ntawm @Links20043) Adafruit NeoPixel los ntawm @adafruit4) Tsis teb los tau: PubSubClient los ntawm @knollearyDownload qhov no https://github.com/kitesurfer1404/WS2812FX lub tsev qiv ntawv thiab thauj nws hauv arduino IDE los ntawm Sketch> suav nrog Tsev qiv ntawv> Ntxiv. ZIP Library
  • Tam sim no peb yuav tsum tau hloov qee qhov kev kos duab raws li peb teeb tsa, qhib MC Teeb Pom Kev Arduino kos duab thiab mus rau cov ntsiab lus.h cov ntaub ntawv thiab tsuas yog hloov tus lej ntawm cov coj thiab cov ntaub ntawv tus lej, hauv kuv qhov xwm txheej kuv siv 8 leds thiab tus pin D1. Tsis tas li koj tuaj yeem hloov lub npe WiFi ntawm no
  • Tam sim no suav thiab xa cov duab kos mus rau ESP8266 pawg thawj coj
  • Tom qab qhov esp yuav ua qhov qhib nkag mus, txuas rau nws thiab nkag mus rau koj li ntawv pov thawj WiFi, ESP yuav txuas rau lub wifi ntawd
  • Nrhiav nws tus IP los ntawm kev txheeb xyuas Arduino IDE debug tso tawm lossis tsuas yog txheeb xyuas koj lub router lossis wifi hotspot rau cov khoom siv txuas.
  • Mus rau https:// YOUR_ESP8266_HOSTNAME_OR_IP/upload thiab upload index.htm los ntawm McLighting cov neeg siv khoom web tsim cov npe.
  • Thaum kawg Rov pib dua lub rooj tsavxwm thiab mus rau tus IP chaw nyob thiab koj yuav muaj lub chaw taws teeb sib txuas los tswj.

Kauj Ruam 4: Txuas Txhua Yam Ua Ke

Txuas Txhua Yam Ua Ke
Txuas Txhua Yam Ua Ke
Txuas Txhua Yam Ua Ke
Txuas Txhua Yam Ua Ke

Kuv siv tag nrho 8 leds thiab txuas lawv hauv cov saw nrog cov xov hlau. Lub charger, txhawb kev hloov pauv thiab hloov pauv tau muab tso rau saum lub roj teeb kom haum rau qhov chaw me me. los ntawm kev hloov pauv cov zis 2 xov hlau mus rau Vin thiab GND ntawm node mcu thiab Lwm qhov mus rau +5v thiab GND ntawm ws2812b thawj coj ntawm koob. Kuv tau ntxiv tus pin me me rau hauv qhov kawg ntawm lub teeb liab xaim thiab ntawm mcu lub zog txuas los txuas tau yooj yim hauv node mcu.

Kuv tau tso lub roj teeb thiab lub mcu nyob rau sab nraum qab ntawm lub kaus mom thiab xaws lawv nrog lub kaus mom, kuv kuj xaws lub leds nrog lub kaus mom kom lawv nyob hauv qhov chaw.

Kauj ruam 5: Tiav Kov

Tiav Kov
Tiav Kov
Tiav Kov
Tiav Kov

Tom qab koj tau tshuaj xyuas txhua yam yog Ua haujlwm tau zoo, nqa daim me me ntawm daim ntaub dub thiab xaws nws los npog sab nraub qaum ntawm lub kaus mom rau zais roj teeb thiab NodeMCU, Kuv kuj tau pleev xim leds txuas cov xov hlau nrog dub.

Hauv tus tswj lawv yog 50+ qhov ua rau txias txias thiab koj tseem tuaj yeem tswj qhov nrawm thiab ci ntawm cov coj.

Tam sim no koj muaj lub kaus mom coj txias. Muaj kev lom zem !!

Yog tias koj muaj teeb meem nug hauv cov lus, tsis txhob hnov qab pov npav qhov haujlwm no.

Pom zoo: