Cov txheej txheem:

Kev Tswj Chaw Taws Teeb RGB Desktop Teeb: 5 Kauj Ruam
Kev Tswj Chaw Taws Teeb RGB Desktop Teeb: 5 Kauj Ruam

Video: Kev Tswj Chaw Taws Teeb RGB Desktop Teeb: 5 Kauj Ruam

Video: Kev Tswj Chaw Taws Teeb RGB Desktop Teeb: 5 Kauj Ruam
Video: txiav dav 800mm RC chaw taws teeb tswj nyom mower zoo tshaj plaws nqe kev muag khoom Tuam Tshoj 2024, Hlis ntuj nqeg
Anonim
Tswj los ntawm RGB Desktop Teeb
Tswj los ntawm RGB Desktop Teeb
Tswj los ntawm RGB Desktop Teeb
Tswj los ntawm RGB Desktop Teeb

Txoj haujlwm no qhia pom kev siv firebase ua tus neeg rau zaub mov rau kev tswj hwm thiab tswj xyuas cov teeb coj ua nyob tom qab ntawm kuv lub rooj

Khoom siv

  • ESP8266.
  • Coj Sawb WS2812B.
  • Fais fab mov nrog tsawg kawg 10W@5V ntsuas.
  • Ib qho app rau kev tswj hwm LED Strips.

Kauj Ruam 1: Tau txais cov kab hauv qhov chaw raug

Tau cov kab hauv qhov chaw raug
Tau cov kab hauv qhov chaw raug
Tau cov kab hauv qhov chaw raug
Tau cov kab hauv qhov chaw raug
Tau cov kab hauv qhov chaw raug
Tau cov kab hauv qhov chaw raug

Thawj qhov yog kom tau cov hlua LED nyob hauv qhov chaw

Kuv xaiv kuv lub khoos phis tawj qub lub rooj rau qhov haujlwm no yog li kuv tau siv qee cov nplaum nplaum thiab kho kuv li WS2812b coj kab txaij raws tom qab ntawm nws thiab txuas VCC, GND, DATA kab nrog ob peb lub xov hlau raws li pom hauv daim duab

Kauj Ruam 2: Ua Kev Sib Txuas Me

Ua Kev Sib Txuas Me Me
Ua Kev Sib Txuas Me Me

Txuas lub zog xa mus rau ESP8266 [Nco tseg* - Kuv tau siv lub rooj tsavxwm uas kuv siv rau Tsev Automation tab sis peb tsuas xav tau ESP8266]

Txuas raws li hauv qab no:

  • D5 (Pin 14) -> Cov Ntaub Ntawv Pin ntawm LED sawb
  • Txuas GND tus pin ntawm ESP8266, Lub Hwj Huam, LED Sawb.

Qhov ntawd yog rau kho vajtse, tam sim no cia dhia mus rau hauv pawg thawj coj saib.

Kauj Ruam 3: Txoj Cai Firebase thiab Database Schema

Txoj Cai Firebase thiab Database Schema
Txoj Cai Firebase thiab Database Schema
Txoj Cai Firebase thiab Database Schema
Txoj Cai Firebase thiab Database Schema

Database Schema yog qhov yooj yim.

  • (neeg siv)

    • neopixels

      • 0

        {r: 12, g: 220, b: 120}

      • 1

        {r: 112, g: 150, b: 200}

    • tus cim

      • pej xeem: {token}
      • ntiag tug: {token}

Schema no sawv cev rau cov qauv yooj yim teev cov npe ntawm Led qhov tseem ceeb

Token ntu sawv cev rau cov txheej txheem kev lees paub yooj yim uas qhov chaw pej xeem thiab ntiag tug sib phim yog tias tau lees paub qhov tseeb.

Kauj ruam 4: Code rau Teeb

Code rau Teeb
Code rau Teeb
Code rau Teeb
Code rau Teeb
Code rau Teeb
Code rau Teeb

Cov cai zoo nkauj piav qhia tus kheej.

  1. Suav nrog cov tsev qiv ntawv xav tau.
  2. Teeb lub authentication token ntawm database
  3. Muab cov ntaub ntawv pov thawj WiFI
  4. Teeb tsa lub koos pij tawj hluav taws rau neopixels hloov pauv thiab pib mloog rau kev hloov pauv hauv cov ntaub ntawv cuam tshuam los ntawm cov neeg siv khoom.
  5. Hauv lub voj txuas rau kev tshuaj xyuas cov xwm txheej thiab xa cov ntaub ntawv nkag mus rau cov haujlwm pabcuam.
  • Lub luag haujlwm pabcuam pabcuam siv cov ntaub ntawv thiab tshawb xyuas lub tshuab ntxhua khaub ncaws neopixel hloov tshiab yog ua rau:

    • Ib leeg LED
    • Qhov ntau ntawm cov lej LED
    • Tag nrho cov LEDs.

Kauj ruam 5: Autoroom App

Image
Image
Lub Autoroom App
Lub Autoroom App
Lub Autoroom App
Lub Autoroom App
Lub Autoroom App
Lub Autoroom App

Kuv tau ua ib qho app hu ua "Autoroom" hauv Flutter siv Dart Programming Language, tswj lub teeb LED.

Nov yog cov txiaj ntsig piv txwv rau qhov ntawd.

  1. Ua ntej, nkag mus nrog daim ntawv pov thawj hauv kuv rooj plaub nws yog (xritzx)
  2. Xaiv cov xim thiab ntau yam thiab ntaus hloov tshiab.
  3. Los yog tej zaum xim tag nrho cov ntau yam los ntawm kev xaiv -1.

Pom zoo: