Cov txheej txheem:
- Kauj Ruam 1: Txuas Koj Cov Qauv
- Kauj ruam 2: Teeb Koj Lub Software
- Kauj ruam 3: Upload Code
- Kauj ruam 4: Txuas rau Koj App thiab Khiav Cov Cai
Video: Siv Bluetooth 4.0 HC -08 Module los Tswj Chaw Nyob LEDs - kev qhia Arduino Uno: 4 Cov Kauj Ruam (nrog Duab)
2024 Tus sau: John Day | [email protected]. Kawg hloov kho: 2024-01-30 09:30
Koj puas tau delved rau kev sib txuas lus modules tseem nrog Arduino? Bluetooth qhib lub ntiaj teb kev muaj peev xwm rau koj cov phiaj xwm Arduino thiab siv internet ntawm yam khoom. Ntawm no peb yuav pib nrog tus menyuam kauj ruam thiab kawm paub tswj hwm qhov chaw nyob LEDs nrog lub smartphone app siv HC08 Bluetooth module. Tom qab ntawv, koj yuav paub nrog lub xov tooj smartphone app koj tuaj yeem siv los tswj hwm lwm cov qauv nrog Bluetooth.
Dab tsi koj yuav xav tau rau qhov kev qhia no:
Kho vajtse:
-Arduino UAS
LED RING 16 X 5050 RGB WS2812
-Dupont cov xov hlau
-Txiv neej Headers
-HC-08 Bluetooth module
Software:
-Arduino IDE
-Piv txwv code
-NeoPixel Library
-Android thov tswj lub nplhaib (Kuv siv Serial Bluetooth Terminal rau qhov kev qhia no)
Cov Cuab Yeej:
-Soldering hlau
Cov txiaj ntsig ntawm kev siv BLE HC-08 tus qauv siv BLE (Bluetooth Tsawg Zog) raws tu qauv. Qhov sib txawv tseem ceeb ntawm Bluetooth thiab BLE yog kev siv hluav taws xob. Bluetooth siv lub zog ntau dua li BLE tab sis tuaj yeem lis ntau cov ntaub ntawv. BLE yog qhov tsim nyog rau kev xa cov ntaub ntawv me me ntawm cov cuab yeej nyob ze. BLE tsawg zog-tshaib plab, yog li cov cuab yeej siv cov txheej txheem no tuaj yeem ua haujlwm tau ntau xyoo nrog lub roj teeb me me; zoo meej rau IoT!
Kauj Ruam 1: Txuas Koj Cov Qauv
Nov yog yam koj xav tau txuas:
HC-08> Arduino Uno
TXD> RXD
RXD> TXD
GND> GND
3V3> 3V3
LED Ntiv Nplhaib> Arduino Uno
DIN> Pin 6
GND> GND
VCC> 5V
Kauj ruam 2: Teeb Koj Lub Software
- Rub tawm Arduino IDE yog tias koj tsis tau nyob ntawm www.arduino.cc/en/Main/Software)
-
Nruab NeoPixel lub tsev qiv ntawv
- Rub tawm Adafruit NeoPixel Libraryas a.zip file (https://github.com/adafruit/Adafruit_NeoPixel)
- Hauv Arduino IDE, mus rau Sketch> suav nrog Tsev qiv ntawv> Ntxiv.zip tsev qiv ntawv
- Ntshuam Adafruit NeoPixel Library
- Xaiv cov ntawv uas koj nyuam qhuav rub tawm. Koj yuav tsum pom tias lub tsev qiv ntawv tau ntxiv ua tiav.
-
Rub tawm daim ntawv thov Bluetooth ntawm koj lub smartphone. Koj tuaj yeem siv ntau daim ntawv thov Bluetooth los tswj hwm HC-08 tus qauv. Txawm li cas los xij, tsis yog txhua qhov sib xws nrog BLE raws tu qauv, yog li yog tias koj xav siv lwm lub app txheeb xyuas nws qhov sib xws ua ntej.
Peb siv Serial Bluetooth Terminal rub tawm los ntawm Google Play Store
Kauj ruam 3: Upload Code
Txuas koj Arduino Uno rau lub khoos phis tawj thiab txheeb xyuas tias koj muaj lub rooj tsav xwm raug thiab qhov chaw nres nkoj xaiv nyob hauv Cov Cuab Yeej tab.
Rub qhov piv txwv no.
NCO TSEG: Thaum koj upload koj cov cai, tsis txhob txuas Arduino RX tus pin. Yog tias nws txuas nrog thaum rub tawm, cov cai yuav tsis ua haujlwm. Tom qab rub tawm koj yuav tsum txuas nws dua rau LED ua haujlwm.
Kev piav qhia txoj cai
Txoj cai tau teeb tsa rau hauv rooj plaub, ntxiv lossis tshem tawm ntau npaum li koj xav tau. Xaiv lawv nrog cov ntawv koj tuaj yeem nkag mus rau koj li Bluetooth app. Cov xwm txheej hauv peb cov cai raug cais nrog cov ntawv loj. Thaum koj ntaus rooj plaub rau hauv app, nws yuav hloov LED cov xim rau nws cov lej sib xws hauv IDE.
Piv txwv li, yog tias koj ntaus 'A' rau hauv koj lub app, koj lub LED yuav tsum hloov mus rau ntsuab (0, 255, 0)
Koj tuaj yeem hloov lub teeb ci LED los ntawm kev kho qhov RGB qhov tseem ceeb hauv kab lus. RGB tus nqi ntau ntawm 0 txog 255.
Yuav ua li cas-los kho tus kheej LED teeb
Koj tuaj yeem ua qhov no los ntawm kev luam cov cai uas tau hais tseg hauv cov thawv hauv daim duab saum toj no (cov cai no tshwm nyob ze rau hauv qab ntawm qhov piv txwv piv txwv) thiab hloov 'colorSet (strip. Color' …. Code hauv qhov xwm txheej nrog nws. 'I' yuav ua tus LED koj xav hloov. 'c' yuav yog tus lej xim. Koj yuav tsum tau ntxiv rov qab rau hauv strip. Color (rau hauv 'c' tus nqi qhov chaw nrog rau RGB code.
Piv txwv:
strip.setPixelColor (3, strip. Color (255, 127, 0));
Qhov no yuav tig qhov thib 3 LED rau cov xim txiv kab ntxwv.
Hauv qhov piv txwv tus lej no, peb tau muab cov piv txwv piv rau cov xim sib txawv LED rau ib tus neeg LEDs. Tam sim no koj tuaj yeem yooj yim hloov tus kheej LEDs.
Kauj ruam 4: Txuas rau Koj App thiab Khiav Cov Cai
Khiav cov cai! Nco ntsoov tias koj khaws RX kev sib txuas thaum rub tawm.
Tam sim no, qhib koj lub app thiab mus rau Bluetooth Devices kom pom koj tus qauv. Thaum txuas nrog, nyem rau ntawm lub cim sib txuas nyob ze lub thoob khib nyiab lub cim, thiab ntaus lub npe lub npe, hauv peb tus lej piv txwv, peb siv rooj plaub A-E, thiab saib lub teeb ci LED!
Tam sim no koj tau muaj kev paub siv daim ntawv thov Bluetooth thiab siv qhov chaw nyob RGB LED teeb, yog li koj tuaj yeem suav nrog ob qho no rau hauv koj cov phiaj xwm. Mus ntxiv thiab ua si nrog sijhawm thiab ncua kev ua haujlwm. Txaus siab rau!
Pom zoo:
Phab Ntsa Mount rau IPad Raws Li Tsev Automation Tswj Vaj Huam Sib Luag, Siv Servo Tswj Cov Hlau nplaum los Qhib Screen: 4 Cov Kauj Ruam (nrog Duab)
Phab Ntsa Mount rau IPad Raws Li Tsev Automation Tswj Vaj Huam Sib Luag, Siv Servo Tswj Cov Hlau nplaum los Qhib Screen: Tsis ntev los no kuv tau siv sijhawm qee lub sijhawm siv khoom hauv thiab ib puag ncig kuv lub tsev. Kuv tab tom siv Domoticz ua kuv daim ntawv thov Tsev Automation, saib www.domoticz.com kom paub meej. Hauv kuv tshawb nrhiav daim ntawv thov daim ntawv qhia uas qhia tag nrho Domoticz cov ntaub ntawv tog
Chaw Ua Si Chaw Taws Teeb Chaw Tswj Hluav Taws Xob Wireless 3D Luam Tsheb: 7 Cov Kauj Ruam (nrog Duab)
Chaw Ua Si Chaw Taws Teeb Chaw Tswj Hluav Taws Xob Wireless 3D Luam Tsheb: Leej twg tsis nyiam twv txiaj? Sib tw thiab Sib ntaus hauv Ntiaj Teb Virtual ntawm Chaw Ua Si thiab Xbox !! Yog li, coj qhov kev lom zem rau lub neej tiag tiag Kuv tau ua Cov Lus Qhia no uas kuv yuav qhia koj li cas koj tuaj yeem siv ib qho Chaw Ua Si Chaw Taws Teeb Chaw Taws Teeb (Wired
Siv Cortana thiab Arduino los tswj RGB Leds lossis Ledstrips Nrog Koj Lub Suab!: 4 Cov Kauj Ruam (nrog Duab)
Siv Cortana thiab Arduino los tswj RGB Leds lossis Ledstrips Nrog Koj Lub Suab!: Hauv cov lus qhia no kuv yuav qhia koj li cas koj tuaj yeem tswj koj li RGB coj lossis coj sawb nrog koj lub suab. Qhov no yog ua tiav los ntawm CoRGB app uas tuaj yeem siv tau dawb hauv lub qhov rais app khw. Cov app no yog ib feem ntawm kuv qhov haujlwm CortanaRoom. Thaum koj ua tiav wit
Yuav Ua Li Cas Tswj Cov Khoom Siv Hauv Tsev Nrog TV Chaw Taws Teeb Nrog Timer Ua Haujlwm: 7 Cov Kauj Ruam (nrog Duab)
Yuav Ua Li Cas Tswj Cov Khoom Siv Hauv Tsev Nrog TV Chaw Taws Teeb Nrog Lub Sijhawm Ua Haujlwm: Txawm tias tom qab 25 xyoo ntawm nws qhov kev qhia rau cov neeg siv khoom lag luam, kev sib txuas lus infrared tseem muaj feem cuam tshuam nyob rau hnub tsis ntev los no. Txawm hais tias nws yog koj li 55 nti 4K TV lossis koj lub suab lub tsheb, txhua yam xav tau IR chaw taws teeb tswj los teb rau peb
Tswj Cov Khoom Siv Los Ntawm Arduino Nrog Cov Neeg Siv Khoom Hloov: 8 Cov Kauj Ruam (nrog Duab)
Kev Tswj Cov Khoom Siv Los Ntawm Arduino Nrog Kev Siv Hluav Taws Xob: Lub Arduino tuaj yeem siv los tswj cov cuab yeej los ntawm kev siv cov khoom siv yooj yim hloov pauv hloov chaw