Cov txheej txheem:

Arduino DIY Bluetooth Controller LED RGB Sawb: 4 Cov Kauj Ruam
Arduino DIY Bluetooth Controller LED RGB Sawb: 4 Cov Kauj Ruam

Video: Arduino DIY Bluetooth Controller LED RGB Sawb: 4 Cov Kauj Ruam

Video: Arduino DIY Bluetooth Controller LED RGB Sawb: 4 Cov Kauj Ruam
Video: how to make humidifier at home | DIY ultrasonic mist maker!! 2024, Kaum ib hlis
Anonim
Arduino DIY Bluetooth Controller LED RGB Sawb
Arduino DIY Bluetooth Controller LED RGB Sawb
Arduino DIY Bluetooth Controller LED RGB Sawb
Arduino DIY Bluetooth Controller LED RGB Sawb

Nyob zoo txhua tus, qhov no yog qhov haujlwm thib ob kuv xav qhia rau koj! Hnub no kuv yuav qhia koj li cas txuas Arduino thiab Bluetooth module thiab tom qab siv nws los tswj LED RGB Sawb.

Hauv qhov kev qhia no peb yuav siv HC-06 Bluetooth Module, vim tias nws pheej yig thiab siv tau yooj yim. (Kuv tau txais kuv li 2 $ los ntawm aliexpress)

Bluetooth module peb yuav siv niaj hnub no yog HC-06 uas paub zoo thiab pheej yig. (Kuv tau txais kuv li 2 € los ntawm aliexpress)

Peb app tseem tab tom sim txheej txheem, yog li peb txhawb koj kom xa email mus rau: [email protected] yog tias koj muaj teeb meem txuj ci lossis koj tau ntsib qee yam teeb meem. Ua tsaug ntau rau kev nkag siab!

Kauj ruam 1:

Duab
Duab
Duab
Duab
Duab
Duab
Duab
Duab

Peb yuav xav tau cov ntu no:

  • 1x Arduino Board (Kuv yuav siv Arduino NANO)
  • 1x Bluetooth Module HC-06 lossis HC-05
  • 1x 12V Meter-ntev ntawm RGB LED Sawb (Kuv siv 30LEDs/m nrog Anode ntau)
  • 1x Terminal Ntsia Hlau
  • 3 x 220Ω Resistor
  • 3x BUZ11 N-Channel Fais Fab MOSFET (lossis sib npaug)
  • Breadboard thiab jumpers
  • (Yeem tau) DC Jack thiab DC Txuas Txuas
  • Thiab tau kawg 12V Cov khoom siv hluav taws xob, Kuv siv cov khoom siv hluav taws xob sib txawv

Kauj Ruam 2: Kev Sib Txuas thiab Schematic

Kev sib txuas thiab Schematic
Kev sib txuas thiab Schematic
Kev sib txuas thiab Schematic
Kev sib txuas thiab Schematic
Kev sib txuas thiab Schematic
Kev sib txuas thiab Schematic

Cia peb tsim! Lub Circuit Court tsis nyuaj li nws yuav zoo li qhov muag pom thawj zaug.

Ua ntej, peb yuav tsum txiav txim siab yog tias peb cov LED Sawb muaj Common Anode lossis Common Cathode. Kuv muaj Anode ntau, yog li kuv txuas nrog LED Sawb lub anode rau 12V Lub Hwj Huam Muab Khoom thiab qhov seem rau cov ntsia hlau txuas, uas peb yuav txuas rau MOSFET cov txiaj ntsig tom qab.

Txhua qhov kev sib txuas tseem ceeb thiab cov phiaj xwm yog/tau qhia hauv cov duab saum toj no.

Ceev faj heev thaum txuas 12V+ tsheb nqaj hlau mus rau VIN rau Arduino board, vim tias koj tuaj yeem hlawv lub rooj tsavxwm yog tias koj txuas nws tsis raug. Tsis tas li, tsis txhob hnov qab av (GND) txhua yam

Kauj Ruam 3: Arduino Code thiab Kev Sib Txuas Lus

Arduino Code thiab Kev Sib Txuas Lus
Arduino Code thiab Kev Sib Txuas Lus

Tshaj tawm cov duab kos hauv qab no mus rau Arduino siv USB cable.

Tsis txhob hnov qab txiav tawm HC-06 module ua ntej rub tawm daim duab!

Vim li cas? HC-06's Pins Kev Sib Txuas (RX thiab TX) tab tom thaiv kev sib txuas lus ntawm Arduino thiab Computer.

Kev piav qhia Code:

  • Ua ntej, peb tshaj tawm ob peb qhov tsis tu ncua (tas li, uas tsis tuaj yeem hloov pauv tom qab) rau tag nrho peb xim (liab, ntsuab, xiav)
  • Hauv kev teeb tsa () peb pib sib txuas lus nrog 9600 tus nqi baud thiab teeb tsa txhua tus pin coj los ua OUTPUT
  • Hauv voj () yog Serial tau txais qee yam nws txheeb xyuas cov ntaub ntawv tau txais ua Integer (Tseem ceeb hauv cov kauj ruam tom ntej)
  • Yog tias nws tau txais cov kab ntawv tshiab ('\ n'), nws ua ntej txwv qhov muaj nuj nqis rau thaj tsam 0-255, vim yog PWM ntau yam thiab tom qab ntawd hloov pauv mus rau cov koob digital nrog analogWrite () txoj kev

Qhov ntawd yog nws! Peb npaj tam sim no rau qib kawg!

Kauj ruam 4: Txuas Arduino rau Android Device

Txuas Arduino rau Android Ntaus Ntawv
Txuas Arduino rau Android Ntaus Ntawv
Txuas Arduino rau Android Ntaus Ntawv
Txuas Arduino rau Android Ntaus Ntawv
Txuas Arduino rau Android Ntaus Ntawv
Txuas Arduino rau Android Ntaus Ntawv

Tam sim no rub tawm cov app hauv qab no: Ntse Bluetooth - Arduino Bluetooth Serial ⚡

LINK:

Ntse Bluetooth yog ib qho app uas tso cai rau koj siv koj lub xov tooj sib txuas lus nrog koj li Bluetooth module lossis board, nrog txoj hauv kev yooj yim tshaj plaws thiab yooj yim tshaj plaws. Nws qhib qhov rooj rau txoj hauv kev tsis txwv los tswj koj li haujlwm DIY. Ntse Bluetooth muaj ntau txoj hauv kev sib txawv yuav xa cov ntaub ntawv rau koj li cas.

Ntse Bluetooth muaj cov yam ntxwv hauv qab no:

  • Kev txuas nrawm rau koj tus qauv
  • Xa thiab tau txais cov ntaub ntawv los ntawm koj tus qauv
  • Tswj tus txais tus lej digital thiab PWM tus pin
  • Tsaus thiab Lub Teeb ntsiab lus Txawv tswj kev teeb tsa rau lub hom phiaj sib txawv
  • Niaj hnub thiab teb UI
  • Customizable nyees khawm thiab hloov
  • Siv koj li DIY RC Tsheb project nrog gamepad zoo nkauj
  • Yooj yim tswj koj cov RGB Led strips nrog cov swb
  • Txiav tawm Bluetooth thaum kaw kom txuag lub roj teeb
  • Hais kom ua kab (davhlau ya nyob twg)

Hauv qhov kev qhia no, peb tab tom siv TAB thib ob nrog coj loj, tsuas yog txaus txaus kom xa ob lub cim.

Hauv cov duab hauv qab no kuv yuav qhia koj yuav siv lub app li cas. Kuv yuav qhia koj li cas txhawm rau tshawb nrhiav cov cuab yeej nyob ze, yuav ua li cas ua ke nrog tus qauv uas peb siv, thiab yuav teeb tsa cov ntaub ntawv xa los ntawm lub app li cas. Yog tias koj xav tias tsis meej pem, ncua thiab rov qab mus rau cov kauj ruam dhau los kom txog thaum koj ua haujlwm. Txawm li cas los xij, yog tias koj tseem muaj teeb meem qhia rau kuv paub [email protected], kuv yuav teb tsis pub dhau 24 teev.:)

  1. Qhib lub app, xaub los ntawm cov lus qhia, ntaus SEARCH khawm thiab tshawb rau cov cuab yeej nyob ze
  2. Thaum koj pom lub cuab yeej, xaiv nws los ntawm txhaj rau nws
  3. Xaiv koj lub ntsiab lus uas koj nyiam (tsaus lossis teeb) thiab tuav lub pob uas koj xaiv
  4. Tos rau qhov kev txuas, yog tias nws ua tsis tau, sim rov txuas dua
  5. Tom qab ua tiav kev sib txuas, xaiv TAB thib ob los ntawm kev nyem rau nws, thiab rub cov sliders thiab tshawb xyuas seb cov hlua coj puas hloov xim lossis tsis yog.
  6. Yog tias txhua yam ua haujlwm thiab koj zoo siab nrog txoj haujlwm no, thov tawm tswv yim zoo thiab ntsuas rau kuv app, qhov no yuav pab nrog kev txhim kho ntxiv thiab qhia:)

Tsis txhob hnov qab ntsuas thiab tawm tswv yim zoo. Ua tsaug thiab pom koj ntawm kev qhia tom ntej:)

Pom zoo: